yum-mirror/slang

Making it easier to work with shaders

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

ArielG-NVFix correct bindings for bindless resource model [SPIRV and GLSL] (#7131)0244c96d6

master
434 B14 linesraw
1//TEST:SIMPLE(filecheck=SPV): -target spirv -bindless-space-index 101
2
3// SPV: OpDecorate %__slang_resource_heap{{.*}} Binding 1
4// SPV: OpDecorate %__slang_resource_heap{{.*}} DescriptorSet 101
5// SPV: OpImageSample
6
7uniform StructuredBuffer<DescriptorHandle<Sampler2D>> t;
8uniform DescriptorHandle<RWStructuredBuffer<float4>> buffer;
9
10[numthreads(1,1,1)]
11void computeMain()
12{
13    (*buffer)[0] = t[0].SampleLevel(float2(0.0), 0.0);
14}