rep (Vertex Shader)
Start a rep...endrep block.
Syntax
where integerReg is an integer register that specifies the repeat count in the x component. See Constant Integer Register.
Remarks
Vertex shader versions | 1_1 | 2_0 | 2_x | 2_sw | 3_0 | 3_sw |
---|
rep | | x | x | x | x | x |
---|
- rep uses Constant Integer Registers (i#).
- endrep must follow the last instruction of a repeat block.
- The endrep offset must be greater than the rep instruction offset.
- Repeat loops cannot be nested.
- Repeat loops are allowed to be either completely inside an if block or completely surrounding it, no straddling is allowed.
- rep consumes one vertex shader instruction slot but must be used with endrep, which consumes another.
- The maximum loop iteration count is 255.
Here is how the instruction works.
StartLoopOffset = next instruction offset
LoopIterationCount = IntegerRegister.x
if (LoopIterationCount <= 0)
Continue execution after the next EndRep instruction