Skip to content

[HLSL] Implement Load method and operator[] on structured buffers #112977

Closed
@hekota

Description

@hekota

Introduce clang builtins (or use existing ones from RWBuffer) to implement Load method and read-only or read/write indexing operator on structured buffers.

Applieds to:

StructuredBuffer
RWStructuredBuffer
RasterizerOrderedStructuredBuffer

The buildings would be lowered to appropriate LLVM DirectX intrinsic during clang codegen.
Depends on #106188.

Docs:
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/structuredbuffer-load
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/sm5-object-structuredbuffer-operatorindex

AC:

  • Load methods and read-only or read/write indexing operators work on structured buffers

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions