Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport using HLSL 2018 to v0.18 #4661

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion wgpu-hal/src/dx12/shader_compilation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,12 @@
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();

Check warning on line 145 in wgpu-hal/src/dx12/shader_compilation.rs

View check run for this annotation

Codecov / codecov/patch

wgpu-hal/src/dx12/shader_compilation.rs#L145

Added line #L145 was not covered by tests
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");

Check warning on line 150 in wgpu-hal/src/dx12/shader_compilation.rs

View check run for this annotation

Codecov / codecov/patch

wgpu-hal/src/dx12/shader_compilation.rs#L148-L150

Added lines #L148 - L150 were not covered by tests
if device
.private_caps
.instance_flags
Expand Down