Skip to content

[DirectX] Handle RawBuffer correctly in DXILResourceAccess #173316

@bogner

Description

@bogner

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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Active

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions