Fix interactions between 'volatile' and the Vulkan memory model
Last year we changed 'volatile' to also act as 'coherent', but when I resolved the memory model changes against that change I missed handling volatile in a couple places that we check for coherent. There was also a place in post-processing that acted as if the volatile memory access flag has a literal number associated with it, when it doesn't.
This commit is contained in:
2
SPIRV/SpvPostProcess.cpp
Executable file → Normal file
2
SPIRV/SpvPostProcess.cpp
Executable file → Normal file
@@ -260,8 +260,6 @@ void Builder::postProcess(Instruction& inst)
|
||||
assert(memoryAccess & MemoryAccessAlignedMask);
|
||||
// Compute the index of the alignment operand.
|
||||
int alignmentIdx = 2;
|
||||
if (memoryAccess & MemoryAccessVolatileMask)
|
||||
alignmentIdx++;
|
||||
if (inst.getOpCode() == OpStore)
|
||||
alignmentIdx++;
|
||||
// Merge new and old (mis)alignment
|
||||
|
||||
Reference in New Issue
Block a user