glslang/Test/hlsl.attribute.expression.comp
steve-lunarg a22f7dbb71 HLSL: Allow expressions in attributes
For example:

[numthreads(2+2, 2*3, (1+FOO)*BAR)]

This will result in a thread count (4, 6, 8).
2016-11-11 08:23:03 -07:00

16 lines
222 B
Plaintext

uniform int bound;
#define FOO 3
#define BAR 2
[numthreads(2+2, 2*3, (1+FOO)*BAR)]
float4 main() : SV_TARGET
{
[unroll(5*2 + 1) ]
for (int x=0; x<bound; ++x)
;
return float4(0,0,0,0);
}