Skip to content

[HLSL] Document HLSL resource IR representation and lowering #68006

@bogner

Description

@bogner

We need a documented plan for how we're handling resource lowering from HLSL to DXIL. This should include details about how we represent HLSL resources in clang, how they appear in LLVM IR, and how we lower those to metadata and operations in DXIL.

My approach to this plan is to leverage TargetExtType in LLVM in order to simplify the ad-hoc metadata based approach we have so far.

This will replace the stubbed out docs at https://clang.llvm.org/docs/HLSL/HLSLIRReference.html that mention @uavs metadata but don't have any detail about what information is captured there, and don't mention the other resource types at all.

Acceptance Criteria

  • clang's HLSLIRReference should be updated to reflect the TargetExtType approach
  • clang's ResourceTypes should discuss how resources are lowered.
  • A new DXILResources document should describe how resources work in LLVM IR
  • This document should describe all resource types
  • designs should consider SPIR-V where possible

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Support

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions