DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
fxc.exe vs dxc.exe: "static const int" use as compile time constant
This code construct used to work with fxc.exe but doesn't compile with dxc. Is this expected?
static const uint2 c2Thread= uint2(8, 8);
static const uint cThread = c2Thread.x*c2Thread.y;
groupshared float4 S1[cThread];
[numthreads(c2Thread.x, c2Thread.y, 1)]
void csMain() ....
note: inlining the numerical constants does work fine:
static const uint2 c2Thread= uint2(8, 8);
static const uint cThread = c2Thread.x*c2Thread.y;
groupshared float4 S1[64];
[numthreads(8, 8, 1)]
void csMain() ....