wgpu: Removed Descriptors::pipelines, we don't need 3 pipelines

This commit is contained in:
Nathan Adams 2022-09-07 03:33:30 +02:00
parent 8b6c6f8a62
commit 7e013183a7
2 changed files with 4 additions and 16 deletions

View File

@ -403,7 +403,7 @@ impl<T: RenderTarget> WgpuRenderBackend<T> {
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<T: RenderTarget> WgpuRenderBackend<T> {
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<T: RenderTarget + 'static> RenderBackend for WgpuRenderBackend<T> {
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<T: RenderTarget + 'static> RenderBackend for WgpuRenderBackend<T> {
.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,

View File

@ -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,