From de5907d93822d78d1238f25fb897c22c8b8a0809 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Thu, 6 May 2021 11:45:02 -0400 Subject: [PATCH] Explicitly list output spirv capabilities --- wgpu-core/src/device/mod.rs | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 1ed178410e..7f6bc35b0d 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -332,8 +332,25 @@ impl Device { //Note: we don't adjust the coordinate space, because `NDC_Y_UP` is required. spv::Options { lang_version: (1, 0), - // doesn't matter, the preferred path is via a naga::Module - capabilities: None, + //TODO: can be `None` once `spirv` is published + capabilities: Some( + [ + spv::Capability::Shader, + spv::Capability::DerivativeControl, + spv::Capability::InterpolationFunction, + spv::Capability::Matrix, + spv::Capability::ImageQuery, + spv::Capability::Sampled1D, + spv::Capability::Image1D, + spv::Capability::SampledCubeArray, + spv::Capability::ImageCubeArray, + spv::Capability::ImageMSArray, + spv::Capability::StorageImageExtendedFormats, + ] + .iter() + .cloned() + .collect(), + ), flags, } }; @@ -715,8 +732,8 @@ impl Device { format_features, framebuffer_attachment: hal::image::FramebufferAttachment { usage, - format, view_caps, + format, }, full_range: TextureSelector { levels: 0..desc.mip_level_count as hal::image::Level,