From ba03d5fb04a0b3cb39c4e3a25bcd97c3c7c6b262 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Fri, 11 Aug 2023 16:09:00 +0200 Subject: [PATCH 1/3] DX12 set `Features::VERTEX_WRITABLE_STORAGE` based on the right FL --- wgpu-hal/src/dx12/adapter.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wgpu-hal/src/dx12/adapter.rs b/wgpu-hal/src/dx12/adapter.rs index da81252abd..c5916b213a 100644 --- a/wgpu-hal/src/dx12/adapter.rs +++ b/wgpu-hal/src/dx12/adapter.rs @@ -242,7 +242,6 @@ impl super::Adapter { | wgt::Features::ADDRESS_MODE_CLAMP_TO_BORDER | wgt::Features::ADDRESS_MODE_CLAMP_TO_ZERO | wgt::Features::POLYGON_MODE_LINE - | wgt::Features::VERTEX_WRITABLE_STORAGE | wgt::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | wgt::Features::TIMESTAMP_QUERY | wgt::Features::TIMESTAMP_QUERY_INSIDE_PASSES @@ -258,6 +257,10 @@ impl super::Adapter { // write the results there, and issue a bunch of copy commands. //| wgt::Features::PIPELINE_STATISTICS_QUERY + if max_feature_level >= d3d12::FeatureLevel::L11_1 { + features |= wgt::Features::VERTEX_WRITABLE_STORAGE; + } + features.set( wgt::Features::CONSERVATIVE_RASTERIZATION, options.ConservativeRasterizationTier From 9edd982d5b0bbd850f1fba9ab58d08569b3aa73a Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Fri, 11 Aug 2023 16:11:03 +0200 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f9e677018..712ac1d843 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,7 @@ By @Valaphee in [#3402](https://github.com/gfx-rs/wgpu/pull/3402) #### DX12 - DX12 doesn't support `Features::POLYGON_MODE_POINT``. By @teoxoy in [#4032](https://github.com/gfx-rs/wgpu/pull/4032). +- Set `Features::VERTEX_WRITABLE_STORAGE` based on the right feature level. By @teoxoy in [#4033](https://github.com/gfx-rs/wgpu/pull/4033). ### Documentation From 84b8e1c2b644ff7c480e84ce7d33baadb1753340 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Thu, 17 Aug 2023 16:59:43 +0200 Subject: [PATCH 3/3] cast to u32 --- wgpu-hal/src/dx12/adapter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-hal/src/dx12/adapter.rs b/wgpu-hal/src/dx12/adapter.rs index c5916b213a..18873b9d6c 100644 --- a/wgpu-hal/src/dx12/adapter.rs +++ b/wgpu-hal/src/dx12/adapter.rs @@ -257,7 +257,7 @@ impl super::Adapter { // write the results there, and issue a bunch of copy commands. //| wgt::Features::PIPELINE_STATISTICS_QUERY - if max_feature_level >= d3d12::FeatureLevel::L11_1 { + if max_feature_level as u32 >= d3d12::FeatureLevel::L11_1 as u32 { features |= wgt::Features::VERTEX_WRITABLE_STORAGE; }