Skip to content

[DirectX] Fix DXIL part header version encoding #89952

@llvm-beanz

Description

@llvm-beanz

Today we are encoding the DXIL version in the DXIL part's program header backwards. Compiling a shader targeting lib_6_8 with DXC then disassembling it with obj2yaml prints:

      DXILMajorVersion: 8
      DXILMinorVersion: 1

This probably means we're crossing the ordering of the fields somewhere in our handling.

We also need to set the DXIL version from the triple sub-architecture. Right now during DXIL header generation we are not setting the version. See here where we set the shader model version but we don't set the DXIL version.

Acceptance Criteria

  • Updated obj2yaml tests verifying correct reproduction of major and minor versions.
  • Updated llc -> obj2yaml testing verifying correct code generation from llc.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions