Skip to content

[DirectX] Use an allowlist for DXIL-compatible module metadata #164473

@inbelic

Description

@inbelic

At the moment there is no filter to remove any module metadata that is unrecognized by the LLVM 3.7 DXIL validator.

This results in clang producing invalid DXIL whenever a new type of module metadata is generated. To prevent this proactively we should create an allowlist that will filter out any unrecognized metadata during the DXILTranslateMetadata pass.

Please see #164472 for additional context.

From comments:

It appears the only known llvm metadata is llvm.ident and llvm.module.flags (debug is separate). All others would cause a validation error.

This is from here and here/here.

AC:

  • Investigate and find all the module metadata that the DXIL validator is expecting to deal with (2 from above)
  • Create the allowlist from this and add it to the DXILTranslateMetadata
  • Ensure that there is sufficient testing of all metadata on the allowlist so that any upstream updates to produce invalid DXIL is detected

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Active

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions