yum-mirror/slang

Making it easier to work with shaders

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

Yong HeAdd datalayout for constant buffers. (#5608)fdf061e27

master
412 B17 linesraw
1// Test that use of specialization constants does not cause space 0 to be reserved.
2
3//TEST:SIMPLE(filecheck=CHECK): -target spirv
4
5// CHECK-NOT: DescriptorSet 1
6
7struct MyData { float4 val; RWStructuredBuffer<float> outputBuffer; }
8
9
10[vk::specialization_constant]
11const int kSpecializationConstant = 0;
12
13[NumThreads(1,1,1)]
14void main(ParameterBlock<MyData> g_data)
15{
16    g_data.outputBuffer[0] = g_data.val.x;
17}