-
Notifications
You must be signed in to change notification settings - Fork 931
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
[spv-out] decorate non-uniform image/sampler access chains #4766
Conversation
Tested this and it fixed the issue on windows+amd+vulkan for me, and didn't regress linux (radv)+amd+vulkan. |
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.
I'm confused - the patch doesn't match the commit message or the discussion.
The code looks like it has always been decorating the results of OpAccessChain
, just not for binding arrays in the Handle
address space.
The discussion suggests that both the pointer and the result of the load need to be decorated, but we are not decorating the result of the load / sample at all, as far as I can see.
Can't we do better at helping ourselves understand what's going on the next time we have to look at this?
The code originally decorated all access chains, c3e35df changed it so that it only happened for storage and uniform buffers since I thought that decorating the image/sampler access chains was not necessary. We now know this was necessary and is what this PR is reverting.
Since c3e35df we decorate the load result of image/sampler binding arrays (the load result being an image/sampler); this is part of the VUID requirement. The results of texture load/sampling operations don't have to be decorated. |
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.
Okay, I understand this better now. But please update the commit message.
How should the commit message be updated? |
@teoxoy Here's my suggestion (summary line and detailed explanation):
The important difference is that this message doesn't mention load results, which this PR has no effect on (and which Naga has never decorated as far as I can tell). |
…nUniform`, not just buffer binding arrays. Apply the `NonUniform` decoration to the results of all access chains rooted in binding arrays that use non-uniform values as indices, regardless of the binding array's element type and address space. Previously, Naga only decorated non-uniform access chains for binding arrays of buffers.
e1982d5
to
2aa8671
Compare
See #4762 (comment).
Fixes #4762.
Reverts c3e35df#diff-42823a07fbb2862baa61487d0fe17c6ba02e2db32560e884875449114897d975L1459-R1480.