yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
b3b6c44cb
master
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly 2struct ComputePush 3{ 4 uint image_id; 5}; 6[[vk::push_constant]] ComputePush p; 7 8namespace test_namespace 9{ 10 [[vk::binding(0, 0)]] RWTexture2D<float4> textureTable[]; 11} 12 13// CHECK: OpEntryPoint 14 15[shader("compute")] 16[numthreads(8, 8, 1)] 17void main(uint3 pixel_i : SV_DispatchThreadID) 18{ 19 test_namespace.textureTable[p.image_id][pixel_i.xy] = float4(0,1,0,0); 20}