Skip to content

[DirectX] Shader Flag Analysis for UseNativeLowPrecision #112267

@bharadwajy

Description

@bharadwajy

Implement analysis to set the flag if command-line option -enable-16bit-types is specified and Shader Model is 6.2 or later
NOTE: If this is set, min-precision mode (UseMinPrecision) is not set.

(Edit)
This analysis can be integrated into the existing DXIL Shader Flags Analysis pass (DXILShaderFlags.h/.cpp).
Implementation: Set the flag UseNativeLowPrecision true if and only if all of the following conditions are satisfied:

  1. The NativeHalfType Lang Option (LangOptions.def) is true
  2. Shader Model is 6.2 or later.

Condition 1 is equivalent to checking if -enable-16bit-types is specified on the command-line in clang-dxc.

Additional notes regarding the UseNativeLowPrecision flag:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions