default (sm4 - asm)

An optional label in a switch statement.

default

 

Remarks

This instruction operates just like default in C. Falling through is valid only if there is no code added, so multiple cases (including default) can share the same code block.

Only one default statement is permitted in a switch construct.

This instruction applies to the following shader stages:

Vertex ShaderGeometry ShaderPixel Shader
xxx

 

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
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

 

 

 

Community Additions

ADD
Show:
© 2015 Microsoft