yum-mirror/slang

Making it easier to work with shaders

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

ArielG-NVSupport derivative functions in compute & capabilities adjustments (#4014)366a947cd

master
754 B24 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -allow-glsl -stage compute -entry computeMain -target glsl -DQUAD_SLANG
2//TEST:SIMPLE(filecheck=CHECK): -allow-glsl -stage compute -entry computeMain -target spirv -DQUAD_SLANG
3
4//TEST:SIMPLE(filecheck=CHECK): -allow-glsl -stage compute -entry computeMain -target glsl -DQUAD_GLSL
5//TEST:SIMPLE(filecheck=CHECK): -allow-glsl -stage compute -entry computeMain -target spirv -DQUAD_GLSL
6// CHECK: error 31210
7
8buffer MyBlockName
9{
10    int result;
11} outputBuffer;
12
13#ifdef QUAD_SLANG
14[DerivativeGroupQuad]
15[numthreads(3, 3, 1)]
16#endif
17#ifdef QUAD_GLSL
18layout(derivative_group_quadsNV) in;
19[numthreads(3, 3, 1)]
20#endif
21void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
22{
23    outputBuffer.result = asint(ddx(1));
24}