yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
7ae655c2a
master
1//TEST:SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target spirv -emit-spirv-directly 2//TEST:SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target spirv 3//TEST:SIMPLE(filecheck=CHECK-CUDA): -entry computeMain -stage compute -target cuda 4 5layout(rgba8) 6RWTexture2D<float4> texture; 7 8[numthreads(4, 1, 1)] 9void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 10{ 11 half h = 1.0h; 12 // CHECK: OpImageRead 13 // CHECK: OpCompositeInsert 14 // CHECK: OpImageWrite 15 // CHECK-CUDA: CUsurfObject texture_0 16 texture[dispatchThreadID.xy].a = h; 17}