From 85becef23e43486ba37e9779cb729e737ebb366b Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 26 Aug 2020 15:35:45 -0400 Subject: [PATCH] [rs] Update wgpu with DepthComparison component and better shader validation --- wgpu/Cargo.toml | 4 ++-- wgpu/examples/shadow/main.rs | 2 +- wgpu/src/backend/web.rs | 3 +++ wgpu/src/macros.rs | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index f811731274..7dabb60c15 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -26,14 +26,14 @@ vulkan-portability = ["wgc/gfx-backend-vulkan"] package = "wgpu-core" #version = "0.6" git = "https://github.com/gfx-rs/wgpu" -rev = "0bb6bb8647a652e82c795fdc27a282e131d7cba3" +rev = "bba82724a84e22dd23cd341a06be6909a3511370" features = ["raw-window-handle"] [dependencies.wgt] package = "wgpu-types" #version = "0.6" git = "https://github.com/gfx-rs/wgpu" -rev = "0bb6bb8647a652e82c795fdc27a282e131d7cba3" +rev = "bba82724a84e22dd23cd341a06be6909a3511370" [dependencies] arrayvec = "0.5" diff --git a/wgpu/examples/shadow/main.rs b/wgpu/examples/shadow/main.rs index 4d802bd345..919e1cb529 100644 --- a/wgpu/examples/shadow/main.rs +++ b/wgpu/examples/shadow/main.rs @@ -548,7 +548,7 @@ impl framework::Example for Example { visibility: wgpu::ShaderStage::FRAGMENT, ty: wgpu::BindingType::SampledTexture { multisampled: false, - component_type: wgpu::TextureComponentType::Float, + component_type: wgpu::TextureComponentType::DepthComparison, dimension: wgpu::TextureViewDimension::D2Array, }, count: None, diff --git a/wgpu/src/backend/web.rs b/wgpu/src/backend/web.rs index 08ed70da15..804abe000c 100644 --- a/wgpu/src/backend/web.rs +++ b/wgpu/src/backend/web.rs @@ -331,6 +331,9 @@ fn map_texture_component_type( wgt::TextureComponentType::Float => web_sys::GpuTextureComponentType::Float, wgt::TextureComponentType::Sint => web_sys::GpuTextureComponentType::Sint, wgt::TextureComponentType::Uint => web_sys::GpuTextureComponentType::Uint, + wgt::TextureComponentType::DepthComparison => { + panic!("depth-comparison is not supported here yet") + } } } diff --git a/wgpu/src/macros.rs b/wgpu/src/macros.rs index b01f834c9c..9e6b087658 100644 --- a/wgpu/src/macros.rs +++ b/wgpu/src/macros.rs @@ -47,6 +47,9 @@ fn test_vertex_attr_array() { #[macro_export] macro_rules! include_spirv { ($($token:tt)*) => { - $crate::util::make_spirv(include_bytes!($($token)*)) + { + log::info!("including '{}'", $($token)*); + $crate::util::make_spirv(include_bytes!($($token)*)) + } }; }