yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
e9f74ebfa
master
1// Test to check if we emit a warning when unhandled modifiers are applied to 2// entry point parameters. 3 4//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target cuda 5//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target metal 6//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -target cpp 7[shader("compute")] 8[numthreads(1,1,1)] 9void computeMain( 10// CHECK: ([[#@LINE+1]]): warning 38010: {{.*}}vk::binding 11 [[vk::binding(5, 4)]] RWStructuredBuffer<uint> test1, 12// CHECK: ([[#@LINE+1]]): warning 38010: {{.*}}vk::push_constant 13 [[vk::push_constant]] RWStructuredBuffer<float> test2, 14// CHECK: ([[#@LINE+1]]): warning 38010: {{.*}}register 15 RWStructuredBuffer<float> test3 : register(r0), 16// CHECK: ([[#@LINE+1]]): warning 38010: {{.*}}packoffset 17 float test4 : packoffset(c4), 18 RWBuffer<float> output 19) 20{ 21 output[0] = test2[0]; 22}