You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SPIR-V] Incorrect ignoring globallycoherent with ResourceDescriptorHeap approach #7740
Description
I think the latest DXC incorrectly handles globallycoherent with combination ResourceDescriptorHeap. Resulting SPIR-V does not contain Coherent keyword.
❌ No compilation warnings or errors. The SPIR-V neck by neck:
Expected
Coherent should present somewhere in SPIR-V output when using descriptor indexing + ResourceDescriptorHeap strategy. Without it it's impossible to use modern approach with the following features:
changed the title [-][SPIR-V] globallycoherent with ResourceDescriptorHeap approach[/-][+][SPIR-V] Incorrect ignoring globallycoherent with ResourceDescriptorHeap approach[/+]on Sep 10, 2025
As you can see it's inspired glslangValidator approach. My suggestion is to add globallycoherent variants into existing codegen of DXC. This will allow to use ResourceDescriptorHeap naturally.
I encountered this today too. I think another limitation with the current design is the inability to use image format attributes like [[vk::image_format("rgba8")]] in conjunction with ResourceDescriptorHeap directly...
The globallycoherent bit seems possible, but I'll need to figure out how to correctly pass the attribute to the implicit cast, which for now only takes the type of the variable.
But since we create a single resource per heap load, it should be OK.
For the other attribute, I'll need to look into them. Might be the same story.
Activity
[-][SPIR-V] globallycoherent with ResourceDescriptorHeap approach[/-][+][SPIR-V] Incorrect ignoring globallycoherent with ResourceDescriptorHeap approach[/+]Goshido commentedon Sep 11, 2025
I found workaround to mitigate the issue for DXC
94abfe972ad839185965f670329bcf33cd7bccbd.As you can see it's inspired
glslangValidatorapproach. My suggestion is to addgloballycoherentvariants into existing codegen of DXC. This will allow to useResourceDescriptorHeapnaturally.More complex example also works
vntec commentedon Dec 1, 2025
I encountered this today too. I think another limitation with the current design is the inability to use image format attributes like
[[vk::image_format("rgba8")]]in conjunction withResourceDescriptorHeapdirectly...Keenuts commentedon Dec 15, 2025
The
globallycoherentbit seems possible, but I'll need to figure out how to correctly pass the attribute to the implicit cast, which for now only takes the type of the variable.But since we create a single resource per heap load, it should be OK.
For the other attribute, I'll need to look into them. Might be the same story.
SteveUrquhart commentedon Mar 18, 2026
Nathan Gauër (@Keenuts) , any updates on this bug? We're also interested in this.
[SPIRV] Allow globallycoherent on DescriptorHeap accesses (microsoft#…
[SPIRV] Allow globallycoherent on DescriptorHeap accesses (microsoft#…
[SPIRV] Allow globallycoherent on DescriptorHeap accesses (microsoft#…
[SPIRV] Allow globallycoherent on DescriptorHeap accesses (#7740) (#8513
alsepkow commentedon Sep 12, 2026
Resolved by PR 8513
Goshido commentedon Sep 16, 2026
Tested in version
b9e9f840b3ed530a7f67010ee899a02a613d3586. No issues. Thx guys! 👍