Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

rep - ps

Start a rep...endrep - ps block.


rep i#


where i# is an integer register that specifies the repeat count in the .x component. See Constant Integer Register.


Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw


  • i#.x specifies the iteration count. The legal range is [0, 255]. Note that this instruction does not increment or decrement the value of i#.x.
  • i#.yzw are not used by the repeat block.
  • Repeat blocks may be nested. See Flow Control Limitations.
  • Repeat blocks are allowed to be either completely inside an if* block or completely surrounding it. No straddling is allowed.
  • Using the same i# for different or nested rep instructions is fine - each loop will iterate based on the specified count.


rep i2
    add r0, r0, c0



Community Additions

© 2015 Microsoft