RawBufferLoad and Store are used in DXIL for both Raw and Structured buffers, but the rules for indexing are slightly different between the two. For raw loads and stores, the entire address must be in the Index operand, and the ElementOffset should be undef, whereas for structured loads and stores Index should point to the beginning of one of the structures and ElementOffset points into the object.
We need to do a couple of things:
- Update DXILResourceAccess to incorporate GEPs into the
Index operand for raw accesses
- Update the DXILResource.rst docs to reflect the rules depending on the buffer type
- Update DXILOpLowering to reject
ElementOffset for raw accesses.