From 2c456d0153f318e47618e9eab0a964785cb02cdd Mon Sep 17 00:00:00 2001 From: Charlotte McElwain Date: Sat, 7 Oct 2023 17:51:45 -0700 Subject: [PATCH] https://github.com/gfx-rs/wgpu/pull/2171 --- nannou_wgpu/src/render_pass.rs | 8 ++++---- nannou_wgpu/src/render_pipeline_builder.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nannou_wgpu/src/render_pass.rs b/nannou_wgpu/src/render_pass.rs index 00a44409b..d69f2597e 100644 --- a/nannou_wgpu/src/render_pass.rs +++ b/nannou_wgpu/src/render_pass.rs @@ -3,7 +3,7 @@ use crate::{self as wgpu, Color, LoadOp}; /// A builder type to simplify the process of creating a render pass descriptor. #[derive(Debug, Default)] pub struct Builder<'a> { - color_attachments: Vec>, + color_attachments: Vec>>, depth_stencil_attachment: Option>, } @@ -168,7 +168,7 @@ impl<'a> Builder<'a> { { let builder = ColorAttachmentDescriptorBuilder::new(attachment); let descriptor = color_builder(builder).descriptor; - self.color_attachments.push(descriptor); + self.color_attachments.push(Some(descriptor)); self } @@ -196,7 +196,7 @@ impl<'a> Builder<'a> { pub fn into_inner( self, ) -> ( - Vec>, + Vec>>, Option>, ) { let Builder { @@ -211,7 +211,7 @@ impl<'a> Builder<'a> { let (color_attachments, depth_stencil_attachment) = self.into_inner(); let descriptor = wgpu::RenderPassDescriptor { label: Some("nannou_render_pass"), - color_attachments: &color_attachments.into_iter().map(|x| Some(x)).collect(), + color_attachments: &color_attachments, depth_stencil_attachment, }; encoder.begin_render_pass(&descriptor) diff --git a/nannou_wgpu/src/render_pipeline_builder.rs b/nannou_wgpu/src/render_pipeline_builder.rs index cf9d97169..58dd35548 100644 --- a/nannou_wgpu/src/render_pipeline_builder.rs +++ b/nannou_wgpu/src/render_pipeline_builder.rs @@ -52,7 +52,7 @@ impl<'a> RenderPipelineBuilder<'a> { front_face: Self::DEFAULT_FRONT_FACE, cull_mode: Self::DEFAULT_CULL_MODE, polygon_mode: Self::DEFAULT_POLYGON_MODE, - clamp_depth: Self::DEFAULT_CLAMP_DEPTH, + unclipped_depth: Self::DEFAULT_UNCLIPPED_DEPTH, conservative: false, }; @@ -101,7 +101,7 @@ impl<'a> RenderPipelineBuilder<'a> { slope_scale: Self::DEFAULT_DEPTH_BIAS_SLOPE_SCALE, clamp: Self::DEFAULT_DEPTH_BIAS_CLAMP, }; - pub const DEFAULT_CLAMP_DEPTH: bool = false; + pub const DEFAULT_UNCLIPPED_DEPTH: bool = false; pub const DEFAULT_DEPTH_STENCIL: wgpu::DepthStencilState = wgpu::DepthStencilState { format: Self::DEFAULT_DEPTH_FORMAT, depth_write_enabled: Self::DEFAULT_DEPTH_WRITE_ENABLED,