Skip to content

Latest commit

 

History

History
104 lines (59 loc) · 2.03 KB

dcl-globalflags.md

File metadata and controls

104 lines (59 loc) · 2.03 KB
title description ms.assetid ms.topic ms.date topic_type api_name api_type api_location
dcl_globalFlags (sm4 - asm)
dcl\_globalFlags (sm4 - asm)
7289db9e-f0cd-4849-854f-34aa38ec2c2d
reference
05/31/2018
apiref

dcl_globalFlags (sm4 - asm)

Declares shader global flags.

dcl_globalFlags flags

 

flags

[in] A global shader flag. There is currently one flag defined.

  • REFACTORING_ALLOWED - Permits the driver to reorder arithmetic operations for optimization, as shown here.

    // Original code
    a = b*c + b*d + b*e + b*f
    
    // Reordered code
    a = b*(c + d + e + f)
    // or 
    a = dot4((b,b,b,b), (c,d,e,f))
    

Note

Reordering arithmetic operations may generate different results.

 

Remarks

This optional instruction applies to the following shader stages:

Vertex Shader Geometry Shader Pixel Shader
x x x

 

This instruction is included to aid in debugging a shader in assembly; you cannot author a shader in assembly language using Shader Model 4.

Minimum Shader Model

This function is supported in the following shader models.

Shader Model Supported
Shader Model 5 yes
Shader Model 4.1 yes
Shader Model 4 yes
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no

 

Related topics

Shader Model 4 Assembly (DirectX HLSL)