HLSL: Fix #96: Support do-while loop substatements with no curly braces.

This commit is contained in:
John Kessenich 2017-04-20 11:08:24 -06:00
parent 670271890d
commit 0c6f9360f5
4 changed files with 180 additions and 77 deletions

View file

@ -1,6 +1,9 @@
float4 PixelShaderFunction(float4 input) : COLOR0
float4 PixelShaderFunction(float input) : COLOR0
{
[unroll] do {} while (false);
[unroll] do {;} while (false);
do { return input; } while (all(input == input));
do { return (float4)input; } while (input > 2.0);
do ++input; while (input < 10.0);
do while (++input < 10.0); while (++input < 10.0); // nest while inside do-while
return (float4)input;
}