Skip to content

Commit

Permalink
Only pass DXC_ARG_SKIP_VALIDATION if there is a validator to use later
Browse files Browse the repository at this point in the history
  • Loading branch information
DouglasDwyer committed Nov 28, 2024
1 parent 9868e0b commit 99480ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ gpu-descriptor = "0.3"
bit-set = "0.8"
gpu-allocator = { version = "0.27", default-features = false }
range-alloc = "0.1"
mach-dxcompiler-rs = { version = "0.1.0", default-features = false }
mach-dxcompiler-rs = { version = "0.1.1", default-features = false }
windows-core = { version = "0.58", default-features = false }

# Gles dependencies
Expand Down
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 @@ -300,9 +300,12 @@ pub(super) fn compile_dxc(
windows::core::w!("2018"), // Use HLSL 2018, Naga doesn't supported 2021 yet.
windows::core::w!("-no-warnings"),
Dxc::DXC_ARG_ENABLE_STRICTNESS,
Dxc::DXC_ARG_SKIP_VALIDATION, // Disable implicit validation to work around bugs when dxil.dll isn't in the local directory.
]);

if dxc_container.validator.is_some() {
compile_args.push(Dxc::DXC_ARG_SKIP_VALIDATION); // Disable implicit validation to work around bugs when dxil.dll isn't in the local directory.)
}

if device
.private_caps
.instance_flags
Expand Down

0 comments on commit 99480ed

Please sign in to comment.