yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
4c78efd0c
master
1//TEST:SIMPLE(filecheck=CHECK): -stage fragment -entry main -target spirv -emit-spirv-directly 2//TEST:SIMPLE(filecheck=CHECK): -stage fragment -entry main -target spirv 3 4// CHECK: OpImageDrefGather 5// CHECK: OpImageDrefGather 6// CHECK: OpImageDrefGather 7// CHECK: OpImageDrefGather 8 9Texture2D t; 10SamplerState s; 11SamplerComparisonState sc; 12float4 main() 13{ 14 const float2 loc = float2(1,2); 15 const float cmp = 3; 16 const int2 off = int2(4,5); 17 return t.GatherCmp(sc, loc, cmp) 18 + t.GatherCmp(sc, loc, cmp, off) 19 + t.GatherCmp(sc, loc, cmp, off, off, off, off) 20 + t.GatherCmpRed(sc, loc, cmp, int2(6,6), int2(7,7), int2(8,8), int2(9,9)); 21}