yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Tim FoleyDiagnose circularly-defined constants (#1384)36a06f128

master
380 B21 linesraw
1// gh-1374.slang
2
3// Test a `static` variable wwith a definition that refers to itself
4
5//DIAGNOSTIC_TEST:REFLECTION:-stage compute -entry main -target hlsl
6
7struct S
8{
9	static const int kVal = kVal;
10
11	static const int kInf = kInf + 1;
12
13	static const int kA = kB;
14	static const int kB = kA;
15}
16
17[numthreads(1, 1, 1)]
18void main(
19    uint3 dispatchThreadID : SV_DispatchThreadID)
20{
21}