cut (sm4 - asm)

Geometry Shader instruction that completes the current primitive topology (if any vertices have been emitted), and starts a new topology of the type declared by the Geometry Shader.

cut

 

Remarks

When cut is executed, the first thing that happens is that any previously emitted topology by the Geometry Shader invocation is completed. If not enough vertices were emitted for the previous primitive topology, they are discarded. Because the only available output topologies for the Geometry Shader are pointlist, linestrip, and trianglestrip, there are never any leftover vertices upon cut.

After the previous topology, if any, is completed, cut causes a new topology to begin, using the topology declared as the Geometry Shader output.

Restrictions

  • The cut instruction applies only to the Geometry Shader.
  • cut can appear any number of times in the Geometry Shader, including within flow control.
  • If the Geometry Shader ends and vertices have been emitted, the topology they are building is completed, as if a cut was executed as the last instruction.
  • If streams have been declared, then cut_stream must be used instead of cut.

This instruction applies to the following shader stages:

Vertex Shader Geometry Shader Pixel Shader
x

 

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

 

Shader Model 4 Assembly (DirectX HLSL)