diff --git a/Cargo.toml b/Cargo.toml index da83280da4..0685325fa0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,14 +28,14 @@ vulkan = ["wgc/gfx-backend-vulkan"] package = "wgpu-core" version = "0.5" git = "https://github.com/gfx-rs/wgpu" -rev = "3a6cdeec945b6e2795c5ad544101b273c3887037" +rev = "fbc2c87de61b0e7bab2583ddf305742e3cbf85e8" features = ["raw-window-handle"] [dependencies.wgt] package = "wgpu-types" version = "0.5" git = "https://github.com/gfx-rs/wgpu" -rev = "3a6cdeec945b6e2795c5ad544101b273c3887037" +rev = "fbc2c87de61b0e7bab2583ddf305742e3cbf85e8" [dependencies] arrayvec = "0.5" diff --git a/examples/shadow/main.rs b/examples/shadow/main.rs index 2b2cfd424b..76df23c431 100644 --- a/examples/shadow/main.rs +++ b/examples/shadow/main.rs @@ -752,10 +752,12 @@ impl framework::Example for Example { attachment: &light.target_view, depth_load_op: wgpu::LoadOp::Clear, depth_store_op: wgpu::StoreOp::Store, + depth_read_only: false, stencil_load_op: wgpu::LoadOp::Clear, stencil_store_op: wgpu::StoreOp::Store, clear_depth: 1.0, clear_stencil: 0, + stencil_read_only: false, }), }); pass.set_pipeline(&self.shadow_pass.pipeline); @@ -788,10 +790,12 @@ impl framework::Example for Example { attachment: &self.forward_depth, depth_load_op: wgpu::LoadOp::Clear, depth_store_op: wgpu::StoreOp::Store, + depth_read_only: false, stencil_load_op: wgpu::LoadOp::Clear, stencil_store_op: wgpu::StoreOp::Store, clear_depth: 1.0, clear_stencil: 0, + stencil_read_only: false, }), }); pass.set_pipeline(&self.forward_pass.pipeline); diff --git a/src/backend/direct.rs b/src/backend/direct.rs index c3dc0c5854..d00b1bd781 100644 --- a/src/backend/direct.rs +++ b/src/backend/direct.rs @@ -684,11 +684,21 @@ impl crate::Context for Context { fn swap_chain_get_next_texture( &self, swap_chain: &Self::SwapChainId, - ) -> (Option, SwapChainStatus, Self::SwapChainOutputDetail) { - let wgc::swap_chain::SwapChainOutput { status, view_id } = + ) -> ( + Option, + SwapChainStatus, + Self::SwapChainOutputDetail, + ) { + let wgc::swap_chain::SwapChainOutput { status, view_id } = gfx_select!(*swap_chain => self.swap_chain_get_next_texture(*swap_chain, PhantomData)); - (view_id, status, SwapChainOutputDetail { swap_chain_id: *swap_chain }) + ( + view_id, + status, + SwapChainOutputDetail { + swap_chain_id: *swap_chain, + }, + ) } fn swap_chain_present(&self, view: &Self::TextureViewId, detail: &Self::SwapChainOutputDetail) { @@ -845,10 +855,12 @@ impl crate::Context for Context { attachment: dsa.attachment.id, depth_load_op: dsa.depth_load_op, depth_store_op: dsa.depth_store_op, + depth_read_only: dsa.depth_read_only, clear_depth: dsa.clear_depth, stencil_load_op: dsa.stencil_load_op, stencil_store_op: dsa.stencil_store_op, clear_stencil: dsa.clear_stencil, + stencil_read_only: dsa.depth_read_only, } }); diff --git a/src/backend/web.rs b/src/backend/web.rs index 7ec3b49112..c5fb4b05c2 100644 --- a/src/backend/web.rs +++ b/src/backend/web.rs @@ -1102,10 +1102,18 @@ impl crate::Context for Context { fn swap_chain_get_next_texture( &self, swap_chain: &Self::SwapChainId, - ) -> (Option, SwapChainStatus, Self::SwapChainOutputDetail) { + ) -> ( + Option, + SwapChainStatus, + Self::SwapChainOutputDetail, + ) { // TODO: Should we pass a descriptor here? // Or is the default view always correct? - (Some(Sendable(swap_chain.0.get_current_texture().create_view())), SwapChainStatus::Good, ()) + ( + Some(Sendable(swap_chain.0.get_current_texture().create_view())), + SwapChainStatus::Good, + (), + ) } fn swap_chain_present( diff --git a/src/lib.rs b/src/lib.rs index f491834f93..f1370e84e0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,8 +23,8 @@ pub use wgt::{ DeviceDescriptor, DynamicOffset, Extensions, Extent3d, FilterMode, FrontFace, IndexFormat, InputStepMode, Limits, LoadOp, Origin3d, PowerPreference, PresentMode, PrimitiveTopology, RasterizationStateDescriptor, ShaderLocation, ShaderStage, StencilOperation, - StencilStateFaceDescriptor, StoreOp, SwapChainDescriptor, SwapChainStatus, TextureAspect, - TextureComponentType, TextureDataLayout, TextureDimension, TextureFormat, TextureUsage, + StencilStateFaceDescriptor, StoreOp, SwapChainDescriptor, SwapChainStatus, TextureAspect, + TextureComponentType, TextureDataLayout, TextureDimension, TextureFormat, TextureUsage, TextureViewDimension, VertexAttributeDescriptor, VertexFormat, BIND_BUFFER_ALIGNMENT, }; @@ -217,7 +217,11 @@ trait Context: Sized { fn swap_chain_get_next_texture( &self, swap_chain: &Self::SwapChainId, - ) -> (Option, SwapChainStatus, Self::SwapChainOutputDetail); + ) -> ( + Option, + SwapChainStatus, + Self::SwapChainOutputDetail, + ); fn swap_chain_present(&self, view: &Self::TextureViewId, detail: &Self::SwapChainOutputDetail); fn texture_create_view( &self,