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

Feature request: disable uniformity analysis on shader creation #3135

Open
raphlinus opened this issue Oct 22, 2022 · 1 comment
Open

Feature request: disable uniformity analysis on shader creation #3135

raphlinus opened this issue Oct 22, 2022 · 1 comment
Labels
area: naga processing Passes over IR in the middle area: validation Issues related to validation, diagnostics, and error handling help required We need community help to make this happen. naga Shader Translator type: enhancement New feature or request

Comments

@raphlinus
Copy link
Contributor

Uniformity analysis of WGSL is too strict and fails to accept some valid shaders, including the coarse rasterization stage of piet-gpu. This is captured in an upstream WGSL bug and mitigations are being discussed. One such mitigation is to opt-out of the analysis.

I'd like a flag to disable uniformity analysis at shader creation time. That flag already exists in the naga API as ValidationFlags, but that's currently hardcoded to all() in wgpu-core's Device::create_shader_module() method, so basically what I'm asking is for that to be plumbed through.

The feature can be a temporary stopgap, and should probably be marked as such, until the issue is resolved upstream.

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request help required We need community help to make this happen. area: validation Issues related to validation, diagnostics, and error handling labels Oct 23, 2022
@ErichDonGubler
Copy link
Member

ErichDonGubler commented Mar 30, 2024

@raphlinus: Would implementing the WGSL diagnostic filter management per #5320 satisfy this particular request? That's not the same as your request to expose this on the API side, but if you're willing to add diagnostic directives in shader source, this might be a standards-supported way to do this.

@ErichDonGubler ErichDonGubler added naga Shader Translator area: naga processing Passes over IR in the middle labels Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga processing Passes over IR in the middle area: validation Issues related to validation, diagnostics, and error handling help required We need community help to make this happen. naga Shader Translator type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants