Description
When a heap buffer alias pointer is re-derived in emitDescriptorHeapBufferPointer (SpirvEmitter.cpp), the new SpirvInstruction does not copy the RasterizerOrdered flag set on the original pointer in emitDescriptorHeapBufferAccess. Accesses through a local RasterizerOrderedStructuredBuffer or RasterizerOrderedByteAddressBuffer alias therefore do not cause SpirvBuilder to emit the required begin/end invocation interlock. This is a silent correctness bug.
Fix
Add bufferDataPtr->setRasterizerOrdered(isRasterizerOrderedView(decl->getType())) after restoring the storage class and layout rule on the re-derived pointer.
References
Description
When a heap buffer alias pointer is re-derived in
emitDescriptorHeapBufferPointer(SpirvEmitter.cpp), the newSpirvInstructiondoes not copy theRasterizerOrderedflag set on the original pointer inemitDescriptorHeapBufferAccess. Accesses through a localRasterizerOrderedStructuredBufferorRasterizerOrderedByteAddressBufferalias therefore do not causeSpirvBuilderto emit the required begin/end invocation interlock. This is a silent correctness bug.Fix
Add
bufferDataPtr->setRasterizerOrdered(isRasterizerOrderedView(decl->getType()))after restoring the storage class and layout rule on the re-derived pointer.References