yum-mirror/slang

Making it easier to work with shaders

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

Darren WihandiFix SPIRV `OpSpecConstantOp` emit (#7158)aa3e6bdbe

master
357 B15 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target spirv
2
3// CHECK: error 38041: cannot cast non-integer specialization
4// CHECK-NEXT: const float X
5
6[[SpecializationConstant]]
7const float X = 10.0;
8
9[shader("compute")]
10[numthreads(32, 1, 1)]
11void computeMain() : SV_Target
12{
13    float arr[int(X)];
14    float a = arr[0];
15}