endloop (sm4 - asm)

结束循环语句。

endloop

 

备注

以下示例演示如何使用此指令。

                loop
                    // example of termination condition
                    if_nz r0.x
                        break
                    endif
                    ...
                endloop

为了方便起见,标记格式包含着色器中相应循环指令的偏移量。

此指令适用于以下着色器阶段:

顶点着色器 几何着色器 像素着色器
x x x

 

最小着色器模型

以下着色器模型中支持此函数。

着色器模型 支持
着色器模型 5
着色器模型 4.1
着色器模型 4
着色器模型 3 (DirectX HLSL)
着色器模型 2 (DirectX HLSL)
着色器模型 1 (DirectX HLSL)

 

着色器模型 4 程序集 (DirectX HLSL)