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

The d3d12 backend silently falls back to FXC if loading DXC fails #6568

Open
nical opened this issue Nov 19, 2024 · 5 comments
Open

The d3d12 backend silently falls back to FXC if loading DXC fails #6568

nical opened this issue Nov 19, 2024 · 5 comments

Comments

@nical
Copy link
Contributor

nical commented Nov 19, 2024

I think that this behavior is desirable for most people (prioritizing having something running in as many situations as possible), but it's likely not the behavior that Firefox needs (it should be a hard error), so we may want to add some way to optionally specify that DXC is required and to fail if it isn't available.

@nical
Copy link
Contributor Author

nical commented Nov 19, 2024

Relevant part of the code:

match dxc_container {

@Elabajaba
Copy link
Contributor

I never liked the automatic fallback but it was requested when I implemented support for DXC over returning an error.

IMO automatically falling back to FXC doesn't really make sense for a lot of cases where you explicitly request DXC as you end up with miscompilations if you use shader model 6.0+ features, or if you just have code that FXC doesn't like.

@teoxoy
Copy link
Member

teoxoy commented Nov 22, 2024

Something else we need to do is avoid creating an adapter if it doesn't support SM6. This will fail later when the driver receives DXIL and can't deal with it.

} else {
break Direct3D12::D3D_SHADER_MODEL_5_1;
}
} {
Direct3D12::D3D_SHADER_MODEL_5_1 => naga::back::hlsl::ShaderModel::V5_1,

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Nov 22, 2024

Such an adapter shouldn't exist, DXIL support was required in launch of dx12 iirc

@teoxoy
Copy link
Member

teoxoy commented Nov 25, 2024

DXIL & SM6 are part of WDDM 2.1, D3D12 was initially released with WDDM 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

4 participants