yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
5290c5806
master
1//TEST:SIMPLE(filecheck=CUDA): -target cuda -entry computeMain -stage compute 2//TEST:SIMPLE(filecheck=MTL): -target metallib -entry computeMain -profile cs_6_6 3//TEST:SIMPLE(filecheck=HLSL): -target hlsl -entry computeMain -profile cs_6_6 4//TEST:SIMPLE(filecheck=DXIL): -target dxil -entry computeMain -profile cs_6_6 5//TEST:SIMPLE(filecheck=SPV): -target spirv 6 7// SPV: OpImageSample 8// HLSL: ResourceDescriptorHeap[{{.*}}] 9// HLSL: SamplerDescriptorHeap[{{.*}}] 10// HLSL: SampleLevel 11// DXIL: computeMain 12// CUDA: computeMain 13// MTL: define void @computeMain 14 15uniform StructuredBuffer<DescriptorHandle<Sampler2D>> t; 16uniform DescriptorHandle<RWStructuredBuffer<float4>> buffer; 17 18[numthreads(1,1,1)] 19void computeMain() 20{ 21 buffer[0] = t[0]->SampleLevel(float2(0.0), 0.0); 22}