We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This section should contain an expanded description of the proposal, if the title is not sufficient.
The globallycoherent keyword would be a useful addition to be supported in the hlsl generator.
globallycoherent
Adding an attribute to tag specify a StructuredBuffer should be marked globallycoherent.
StructuredBuffer
None
Here's how I expect code generation would change with this proposal.
C# Code
[AutoConstructor] [EmbeddedBytecode(DispatchAxis.XY)] public partial struct SampleShader : IComputeShader { [GloballyCoherent] ReadWriteBuffer<int> buffer; public void Execute() { ... } }
Generated HLSL
cbuffer _ : register(b0) { uint __x; uint __y; uint __z; } globallycoherent RWStructuredBuffer<int> sampleBuffer : register(u0); [NumThreads(__GroupSize__get_X, __GroupSize__get_Y, __GroupSize__get_Z)] void Execute(uint3 ThreadIds : SV_DispatchThreadID) { if (ThreadIds.x < __x && ThreadIds.y < __y && ThreadIds.z < __z) { ... } }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Description (optional)
This section should contain an expanded description
of the proposal, if the title is not sufficient.
Rationale
The
globallycoherent
keyword would be a useful addition to be supported in the hlsl generator.Proposed API
Adding an attribute to tag specify a
StructuredBuffer
should be markedgloballycoherent
.Drawbacks
None
Alternatives
None
Other thoughts
Here's how I expect code generation would change with this proposal.
C# Code
Generated HLSL
The text was updated successfully, but these errors were encountered: