Skip to content

[HLSL] Add support for Root Signature versions #126557

@inbelic

Description

@inbelic

As introduced here, we now need a way to specify and handle the various root signature versions in the front-end so that we can generate the correct LLVM IR metadata that complies with what the backend expects.

This change requires that we add a new flag to the compiler to let the user manually specify a root signature version, update the clang attribute to retain the version info, update some validations in the parser that is version dependent and to correctly emit the version as part of the root signature pair metadata.

This change is dependent on #126569, #119014 and #119011

AC:

  • Update Options.td to allow for the -hlsl-rootsig-ver flag to let users specify the flag
  • Use AdditionalMembers of HLSLRootSignatureAttr to store the version enum
  • Update the instantiation in SemaHLSL to set the version
  • Update the parsing/semantic analysis of the relevant flags to validate based on the version
  • Update the metadata generation of the root signature function pair to include the version
  • Add new unit tests for the new version specific validation diagnostics
  • Update previous tests to account for the new attribute

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.clang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'clang: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