yum-mirror/slang

Making it easier to work with shaders

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

Yong HeRemove "GL_EXT_samplerless_texture_functions" from combined sampler functions. (#5585)75d65d366

master
574 B20 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target glsl -stage compute -entry testMain
2//TEST:SIMPLE(filecheck=SPV): -target spirv -stage compute -entry testMain -emit-spirv-via-glsl
3
4// We shouldn't be using GL_EXT_samplerless_texture_functions extension.
5// CHECK-NOT: GL_EXT_samplerless_texture_functions
6
7// SPV: OpImageFetch
8
9Sampler2D sampler;
10
11RWStructuredBuffer<float4> outputBuffer;
12
13[NumThreads(1,1,1)]
14void testMain()
15{
16    uint w, h, l;
17    sampler.GetDimensions(0, w, h, l);
18    var result = sampler.Load(int3(1,1,1), int2(1,2));
19    outputBuffer[0] = result + float(w);
20}