HLSL: Fix #919: for-init-statement is arbitrary declaration or expression.
Unlike "if (XXX)" and "while (XXX)", with "for (YYY...", the YYY can be more kinds of statements than the XXX.
This commit is contained in:
parent
e00e8f45a6
commit
0e07119ae2
5 changed files with 322 additions and 62 deletions
|
|
@ -5,9 +5,13 @@ float4 PixelShaderFunction(float4 input) : COLOR0
|
|||
[unroll] for (; any(input != input); ) {}
|
||||
for (; any(input != input); ) { return -input; }
|
||||
for (--input; any(input != input); input += 2) { return -input; }
|
||||
for (;;) if (input.x > 2.0) break;
|
||||
for (;;) if (input.x > 2.0) continue;
|
||||
float ii;
|
||||
for (int ii = -1; ii < 3; ++ii) if (ii == 2) continue;
|
||||
--ii;
|
||||
for (;;) if (input.x > 2.0) break;
|
||||
for (;;) if (input.x > 2.0) continue;
|
||||
float ii;
|
||||
for (int ii = -1; ii < 3; ++ii) if (ii == 2) continue;
|
||||
--ii;
|
||||
for (int first = 0, second = 1; ;) first + second;
|
||||
for ( int i = 0, count = int(ii); i < count; i++ );
|
||||
for (float first = 0, second[2], third; first < second[0]; ++second[1]) first + second[1] + third;
|
||||
for (--ii, --ii, --ii;;) ii;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue