Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fxc.exe vs dxc.exe: "static const int" use as compile time constant #2188

Open
xxxbxxx opened this issue May 14, 2019 · 1 comment
Open

fxc.exe vs dxc.exe: "static const int" use as compile time constant #2188

xxxbxxx opened this issue May 14, 2019 · 1 comment
Assignees
Labels
bug Bug, regression, crash

Comments

@xxxbxxx
Copy link

xxxbxxx commented May 14, 2019

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() ....
@tristanlabelle
Copy link
Contributor

Thanks for reporting! I was able to repro. If this blocking, you can use a #define as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash
Projects
Status: No status
Development

No branches or pull requests

2 participants