Skip to content

[workstream] DXIL Shader Flags #57

@damyanp

Description

@damyanp

DXIL output contains various flags that tell the runtime about what optional features the shader might be using - for example, wave operations, doubles, 64-bit integers.

All shader flags specified in DXC output along with conditions that set each of them is catalogued here.

Support for appropriately setting the same set of flags in the clang-based HLSL Shader compiler needs to be implemented by enhancing the existing ShaderFlagsAnalysis pass in DXILShaderFlags.cpp. The existing Module pass needs to be extended to walk all constituent functions to collect shader flags for the candidate function. Results of the analysis pass is a map of shader functions to corresponding shader flags mask.

NOTE: Analysis to set the following Shader Flags is not done as it appears that they are not being set in DXC sources based on module content. Listing them for the record and potential reclassification as needed.

  • DisableMathRefactoring
  • ComputeShadersPlusRawAndStructuredBuffers (Only set for SM 4.0)
  • ROVs
  • SamplerFeedback

Milestones

Compile particle_life.hlsl (#20)

Compile a broad selection of compute shaders (#11)

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions