title: HLSL for loop with Shader Model 2.0: Error X3511 unable to unroll loop
body: <p>When compiling the following for loop in my HLSL shader under Shader Model 2.0, I'm getting Error X3511.</p>
  
  <pre><code>for (int x = -5; x &lt;= 5; x++)
  {
      for (int y = -5; y &lt;= 5; y++)
      {
              ...
  </code></pre>
  
  <p>The error reads as follows: unable to unroll loop, loop does not appear to terminate in a timely manner (5 iterations), use the [unroll(n)] attribute to force an exact higher number.</p>
  
  <p>I'm aware of this error message, but I'm not using a variable here for the conditional part of the for statement - it's a hardcoded x &lt;= 5 condition. What is wrong here?</p>
  
  <p>Thanks in advance!</p>