Skip to content

[DirectX] Implement Shader Flag Analysis for UsesDerivatives and DerivativesInMeshAndAmpShaders #116141

@bharadwajy

Description

@bharadwajy
  • Set function level flag UsesDerivatives if any of the derivative ops viz., DXIL::OpCode::DerivFineX, DXIL::OpCode::DerivFineY, DXIL::OpCode::DerivCoarseX, DXIL::OpCode::DerivCoarseY, DXIL::OpCode::CalculateLOD are used
  • Set function level flag DerivativesInMeshAndAmpShaders if any of the above derivative ops are used in Mesh or Amplification Shader.

Reference: https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_Derivatives.html

Implementation should key off properties in dxil.td.

AC:

Add tests to verify correctness of analysis.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions