-
Notifications
You must be signed in to change notification settings - Fork 244
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
added memory barrier intrinsics to spirv-std #769
added memory barrier intrinsics to spirv-std #769
Conversation
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.
Nice. Could you add some function-level docs for each of the barrier functions? Could describe it on a high-level and then maybe reference the GLSL/HLSL functions (as you do internally in the function body, but in the docs) and link to more details about them?
44aa3c7
to
6101569
Compare
Additionally, please add some compiletests! |
Linking to related issue #696 |
constants could not be validated in tests because of the limited output
I added compile tests for all intrinsics but I was not able to validate the constants, they are probably defined outside of the scope.
As you can see in the example above |
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.
Ah, sorry, should have been more clear - I mostly wanted compiletests to make sure it just compiles/validates, rather than disassembling - just a compiletest (without --disassemble-xyz
) is fine. How it is now is perfectly OK too, though!
Review-request @hrydgard to make sure the names here are OK, and no more are needed to solve your use cases.
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.
Looks great.
There is one problem regarding the tests; the |
Hmm. You should not need to add the capabilities to |
72c0522
to
2699d0a
Compare
Oh sorry about that, I could have figured that out myself. I was thrown off a bit by the features above that were only used by |
Yeah, in that case there were complications, which, should probably also happen here, but I'm way too tired :c and how it is now is totally fine |
Added memory barrier intrinsics to get feature parity with GLSL and HLSL. Currently adding barriers is quite verbose and most used usecases are covered with these intrinsics. I used the DXC to compile the hlsl equivalents to SPIR-V.