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

Fix dx12 shader validation errors when dxil.dll isn't available in the local scope. #3434

Merged
merged 5 commits into from
Feb 2, 2023

Conversation

Elabajaba
Copy link
Contributor

@Elabajaba Elabajaba commented Jan 28, 2023

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
Fixes #3433

Description
When using a custom path for dxil.dll that isn't in the local scope, dxcompiler's automatic validation will silently fail. This makes it so that if dxil.dll has a custom path, then we disable automatic validation and do manual validation post compilation instead.

Testing
Tested against hello-triangle with a custom dxil.dll path and no dxil.dll in the wgpu folder.

@daxpedda
Copy link
Contributor

Wouldn't it be better to completely disable implicit validation and do it explicitly only?
I think it would simplify the code a lot.

@Elabajaba
Copy link
Contributor Author

Wouldn't it be better to completely disable implicit validation and do it explicitly only?
I think it would simplify the code a lot.

Probably, it might even be faster as well.

wgpu-hal/src/dx12/shader_compilation.rs Outdated Show resolved Hide resolved
wgpu-hal/src/dx12/shader_compilation.rs Show resolved Hide resolved
@cwfitzgerald cwfitzgerald added the PR: needs back-porting PR with a fix that needs to land on crates label Feb 1, 2023
@cwfitzgerald cwfitzgerald merged commit 7826092 into gfx-rs:master Feb 2, 2023
cwfitzgerald pushed a commit to cwfitzgerald/wgpu that referenced this pull request Feb 9, 2023
…e local scope. (gfx-rs#3434)

* Fix dx12 shader validation errors when dxil.dll isn't available in the local scope.

* changelog

* clippy

* always explicitly validate shaders to simplify code

* destructor ordering
cwfitzgerald pushed a commit that referenced this pull request Feb 9, 2023
…e local scope. (#3434)

* Fix dx12 shader validation errors when dxil.dll isn't available in the local scope.

* changelog

* clippy

* always explicitly validate shaders to simplify code

* destructor ordering
@cwfitzgerald cwfitzgerald removed the PR: needs back-porting PR with a fix that needs to land on crates label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DXC compiler fails with custom paths
3 participants