yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
915e05dcc
master
1//TEST(compute):COMPARE_COMPUTE: -compute -shaderobj -output-using-type 2//TEST(compute, vulkan):COMPARE_COMPUTE: -vk -compute -shaderobj -output-using-type 3//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -output-using-type 4 5// Test that writing to swizzles of matrix swizzles works correctly 6 7//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer 8RWStructuredBuffer<float> outputBuffer; 9 10[numthreads(4, 1, 1)] 11void computeMain(uint tid : SV_GroupIndex) 12{ 13 float2x2 m = float2x2(0); 14 15 // 1 4 16 // 3 2 17 m._m00_m01_m10_m11.xwzy.wzyx.wzyx = float4(1,2,3,4); 18 19 outputBuffer[tid] = m[tid/2][tid%2]; 20}