dcl_function_body (sm5 - asm)

Declare a function body.

dcl_function_body fb#
Item Description
fb#
[in] The label of the place where the function will appear.

Remarks

This instruction declares a unique function body whose code will appear later in the program at label fb#.

Function bodies are used in function table declarations. For more info, see dcl_function_table.

In the hull shader and domain shader, where there are multiple phases (control point phase, fork phase, and join phase), all function bodies (label fb#) appear after all the phases, rather than being grouped by phase.

There is no limit to how many function bodies can be present.

This instruction applies to the following shader stages:

Vertex Hull Domain Geometry Pixel Compute
X X X X X X

Minimum Shader Model

This instruction is supported in the following shader models:

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

Shader Model 5 Assembly (DirectX HLSL)