From 7e013183a7b2fab7c39d1ae7f34daf7df8a60e24 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Wed, 7 Sep 2022 03:33:30 +0200 Subject: [PATCH] wgpu: Removed Descriptors::pipelines, we don't need 3 pipelines --- render/wgpu/src/backend.rs | 8 ++++---- render/wgpu/src/descriptors.rs | 12 ------------ 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/render/wgpu/src/backend.rs b/render/wgpu/src/backend.rs index e4c443a59..22691ec93 100644 --- a/render/wgpu/src/backend.rs +++ b/render/wgpu/src/backend.rs @@ -403,7 +403,7 @@ impl WgpuRenderBackend { self.descriptors .device .create_bind_group(&wgpu::BindGroupDescriptor { - layout: &self.descriptors.pipelines.gradient_layout, + layout: &self.descriptors.onscreen.pipelines.gradient_layout, entries: &[ wgpu::BindGroupEntry { binding: 0, @@ -478,7 +478,7 @@ impl WgpuRenderBackend { self.descriptors .device .create_bind_group(&wgpu::BindGroupDescriptor { - layout: &self.descriptors.pipelines.bitmap_layout, + layout: &self.descriptors.onscreen.pipelines.bitmap_layout, entries: &[ wgpu::BindGroupEntry { binding: 0, @@ -614,7 +614,7 @@ impl RenderBackend for WgpuRenderBackend { self.descriptors .device .create_bind_group(&wgpu::BindGroupDescriptor { - layout: &self.descriptors.pipelines.bitmap_layout, + layout: &self.descriptors.onscreen.pipelines.bitmap_layout, entries: &[ wgpu::BindGroupEntry { binding: 0, @@ -855,7 +855,7 @@ impl RenderBackend for WgpuRenderBackend { .descriptors .device .create_bind_group(&wgpu::BindGroupDescriptor { - layout: &self.descriptors.pipelines.bitmap_layout, + layout: &self.descriptors.onscreen.pipelines.bitmap_layout, entries: &[ wgpu::BindGroupEntry { binding: 0, diff --git a/render/wgpu/src/descriptors.rs b/render/wgpu/src/descriptors.rs index 4b59a1799..4e4a61cc2 100644 --- a/render/wgpu/src/descriptors.rs +++ b/render/wgpu/src/descriptors.rs @@ -67,7 +67,6 @@ pub struct Descriptors { pub queue: wgpu::Queue, pub globals_layout: wgpu::BindGroupLayout, pub uniform_buffers_layout: wgpu::BindGroupLayout, - pub pipelines: Pipelines, pub bitmap_samplers: BitmapSamplers, pub msaa_sample_count: u32, pub onscreen: DescriptorsTargetData, @@ -158,16 +157,6 @@ impl Descriptors { &uniform_buffers_layout, ); - let pipelines = Pipelines::new( - &device, - surface_format, - frame_buffer_format, - msaa_sample_count, - bitmap_samplers.layout(), - &globals_layout, - &uniform_buffers_layout, - ); - Self { device, info, @@ -177,7 +166,6 @@ impl Descriptors { queue, globals_layout, uniform_buffers_layout, - pipelines, bitmap_samplers, msaa_sample_count, onscreen,