xref: /aosp_15_r20/external/angle/third_party/glslang/src/Test/hlsl.specConstant.frag (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1[[vk::constant_id(0)]] const uint index = 2;
2
3static const uint array[] = { 10, 20, 30, 40 };
4
5float4 main( ) : SV_TARGET
6{
7    float4 r;
8    for(uint i = 0; i < array[index]; i++)
9        r = i;
10
11    r += index + index;
12    r += 2 * index;
13
14    return r;
15}
16