From 9501ccc6b0321986f8737532e2e020ff7cd64216 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Sat, 4 Nov 2023 20:53:48 +0100 Subject: [PATCH] Use HLSL 2018 (#4629) --- wgpu-hal/src/dx12/shader_compilation.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wgpu-hal/src/dx12/shader_compilation.rs b/wgpu-hal/src/dx12/shader_compilation.rs index 430c734267..a034f54a7f 100644 --- a/wgpu-hal/src/dx12/shader_compilation.rs +++ b/wgpu-hal/src/dx12/shader_compilation.rs @@ -142,9 +142,12 @@ mod dxc { log::Level, ) { profiling::scope!("compile_dxc"); - let mut compile_flags = arrayvec::ArrayVec::<&str, 4>::new_const(); + let mut compile_flags = arrayvec::ArrayVec::<&str, 6>::new_const(); compile_flags.push("-Ges"); // d3dcompiler::D3DCOMPILE_ENABLE_STRICTNESS compile_flags.push("-Vd"); // Disable implicit validation to work around bugs when dxil.dll isn't in the local directory. + compile_flags.push("-HV"); // Use HLSL 2018, Naga doesn't supported 2021 yet. + compile_flags.push("2018"); + if device .private_caps .instance_flags