vello_sparse_shaders: Flatten fragment shader arguments#1620
Merged
Conversation
743b8cd to
1cdb7c0
Compare
4552815 to
bf7590f
Compare
1cdb7c0 to
d3413f8
Compare
bf7590f to
07ef807
Compare
grebmeg
approved these changes
May 19, 2026
Collaborator
grebmeg
left a comment
There was a problem hiding this comment.
I guess this is also causing buggy behaviour in older Adreno drivers? Could you please share a bit more detail about the issue and include it in the file-level doc? Actually, I just realised that since we have two gwsl shaders, it might make more sense to create an additional README file with descriptions of those bugs.
07ef807 to
4c5c9ac
Compare
LaurenzV
pushed a commit
to LaurenzV/vello
that referenced
this pull request
May 22, 2026
…inebender#1659) Drafted as a follow-up to [this comment](linebender#1619 (comment)). Some old Adreno GPU drivers silently downgrades the precision of struct values in fragment shaders to 16 bits, regardless of the precision the shader requested. The last few commits flattened the existing fragment shaders to dodge the bug; this commit prevents the workaround from silently regressing. `assert_no_structs_in_fragment_shader` parses the WGSL with naga, walks the call graph reachable from the `@fragment` entry point, and rejects any function argument, return value, local variable, `Compose`, or `ZeroValue` of struct type. Struct-typed uniform globals and vertex IO structs are unaffected because their fields are only ever read as scalars/vectors inside the fragment shader. The lint runs both at build time (from `compile_wgsl_shader`, which the build script invokes for every shipped WGSL) and as a unit test (`every_shipped_shader_passes_the_lint`) that runs in CI. See linebender#1604 linebender#1619 linebender#1620 for context. Generated with AI assistance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a continuation to #1619 and builds on top of it. With this PR in place, Vello Hybrid runs on Google Pixel 5 and Redmi Note 11 without any problems!