Skip to content

[HLSL] Generate AST for Root Signatures #119011

@inbelic

Description

@inbelic

This issue handles "plugging-in" the root signature parser into the generation of the AST node. It consists of initializing an HLSLRootSignatureAttr with the parsed HLSLRootElements.

Root signatures are defined as a list of "root elements" and so the in-memory representation will retain this form.

This is dependent on #120472.

AC:

  • Define HLSLRootSignatureAttr in Attr.td
  • Use AdditionalMembers to hold an ArrayRef of HLSLRootElements
  • Define handleHLSLRootSignature in SemaHLSL.h
  • Implement handleHLSLRootSignature in SemaHLSL.cpp to simply invoke the parser and construct the Root Elements on the ASTContext, then set the AdditionalMembers to refence that
  • Add test of a practical root signature example generated AST with ast-dump in AST/HLSL/RootSignatures-AST.hlsl

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