yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
8086adc90
master
1//TEST:SIMPLE(filecheck=METAL): -target metal 2//TEST(compute, metal):COMPARE_COMPUTE(filecheck-buffer=BUF):-metal 3//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk 4 5// METAL: (matrix<float,int(4),int(4)>{{.*}}(0) - 6 7//TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name output 8RWStructuredBuffer<float4> output; 9 10[numthreads(1,1,1)] 11void computeMain(uniform float4x4 m) 12{ 13 // This test checks for negative zero, so we need to do a hex comparison 14 // instead of a float comparison. 15 // BUF-COUNT-4: 80000000 16 output[0] = (-m)[0]; 17}