blob: 4336698c0324166aba00dfa7b09b5fe4ee0c5dc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// loop-attribs.slang
// Test that loop attributes are correctly emitted to the resulting HLSL.
//TEST:CROSS_COMPILE:-target dxil-assembly -entry main -stage fragment -profile sm_6_0
float4 main() : SV_Target
{
float sum = 0.0f;
[loop]
for (int i = 0; i < 100; i++)
sum += float(i);
[unroll(10)]
for (int j = 0; j < 100; j++)
sum += float(j);
return float4(sum, 0, 0, 0);
}
|