__restrict causes slow execution with MSAA with Metal #2600
FilippoLeon
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I ran into a bug where updating glslangvalidator would decorate a struct with restrict and in turn would make spirv-cross add the __restrict keyword to my shader input variables. All nice and sensible so far.
But... Metal really does not like it and adding this keyword tanks the FPS of my app, but only if the shader ran with MSAA.
I opened a discussion with apple about this, because in my opinion, this is clearly a bug. But was wondering if anybody has idea about the why.
To me this makes no sense. If somebody else can reproduce the problem or if Apple confirms the bug (I doubt it), I suggest that spirv-cross should not add __restrict to input readonly buffers.
I started discussing it here because thought this was a change in MoltenVK:
KhronosGroup/MoltenVK#2688
Beta Was this translation helpful? Give feedback.
All reactions