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): -target hlsl -profile sm_6_6 -entry main -stage compute 2//TEST:SIMPLE(filecheck=DXIL): -target dxil -profile sm_6_6 -entry main -stage compute 3//TEST:SIMPLE(filecheck=DXIL): -target cuda -profile sm_6_6 -entry main -stage compute 4 5// Test that Texture2DMS accepts an optional sampleCount argument 6// and the argument correctly appears in the output hlsl. 7 8// CHECK: Texture2DMS<uint > t_0 : register(t0); 9// CHECK: Texture2DMS<uint, 4 > tExplicit_0 : register(t1); 10// DXIL: main 11 12Texture2DMS<uint> t; 13Texture2DMS<uint, 4> tExplicit; 14 15SamplerState s; 16RWBuffer<uint4> b; 17 18[shader("compute")] 19[numthreads(32, 1, 1)] 20void main(uint3 tid : SV_DispatchThreadID) 21{ 22 let v = t.Load(int2(0, 0), 1) + tExplicit.Load(int2(1,1),2); 23 b[tid.x] = v; 24}