-
Notifications
You must be signed in to change notification settings - Fork 948
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
wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12 #4116
Conversation
8b5f328
to
6cfd34e
Compare
This is a pretty big portability hazard. If we wanted to do this, we would need to surface it as a feature that users can enable, knowing they are opting into behavior that is not portable to D3D. I would personally prefer if this was just fixed in naga, but a feature would be an acceptable interim solution. |
Marked the PR as draft to reflect that Connor requested some changes to be made before it can be merged. |
da0c51d
to
b002299
Compare
Looks ready once the merge conflict in wgpu-types/src/lib.rs is resolved. |
This error only exists due to an issue with naga's HLSL support: gfx-rs/naga#1945 The WGPU spec itself allows vertex shader outputs that are not consumed by the fragment shader. Until the issue is fixed, we can allow unconsumed outputs on all platforms other than DX11/DX12.
b002299
to
c31d0bc
Compare
I fixed the merge conflict - I had to pick a different id for the feature |
…x-rs#4116) * wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12 This error only exists due to an issue with naga's HLSL support: gfx-rs/naga#1945 The WGPU spec itself allows vertex shader outputs that are not consumed by the fragment shader. Until the issue is fixed, we can allow unconsumed outputs on all platforms other than DX11/DX12. * Add Features::SHADER_UNUSED_VERTEX_OUTPUT to allow disabling check * Pick an unused feature id
…x-rs#4116) * wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12 This error only exists due to an issue with naga's HLSL support: gfx-rs/naga#1945 The WGPU spec itself allows vertex shader outputs that are not consumed by the fragment shader. Until the issue is fixed, we can allow unconsumed outputs on all platforms other than DX11/DX12. * Add Features::SHADER_UNUSED_VERTEX_OUTPUT to allow disabling check * Pick an unused feature id
Would it be possible to get this backported to the v0.17 branch, please? And perhaps get a new release with it in somewhat soon-ish? |
…x-rs#4116) * wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12 This error only exists due to an issue with naga's HLSL support: gfx-rs/naga#1945 The WGPU spec itself allows vertex shader outputs that are not consumed by the fragment shader. Until the issue is fixed, we can allow unconsumed outputs on all platforms other than DX11/DX12. * Add Features::SHADER_UNUSED_VERTEX_OUTPUT to allow disabling check * Pick an unused feature id
/// - Metal | ||
/// - OpenGL | ||
const SHADER_UNUSED_VERTEX_OUTPUT = 1 << 54; | ||
|
||
// 54..59 available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed, this line did not get updated.
…x-rs#4116) * wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12 This error only exists due to an issue with naga's HLSL support: gfx-rs/naga#1945 The WGPU spec itself allows vertex shader outputs that are not consumed by the fragment shader. Until the issue is fixed, we can allow unconsumed outputs on all platforms other than DX11/DX12. * Add Features::SHADER_UNUSED_VERTEX_OUTPUT to allow disabling check * Pick an unused feature id
Checklist
cargo clippy
.cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
Description
This error only exists due to an issue with naga's HLSL support:
The WGPU spec itself allows vertex shader outputs that are not consumed by the fragment shader.
Until the issue is fixed, we can allow unconsumed outputs on all platforms other than DX11/DX12.
Testing
Run a program with an unconsumed shader output on a non-DX backend, and note the lack of error.