yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
ae1a5e408
master
1//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type 2//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type 3//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -output-using-type 4// Not supported in WGSL: read-write storage texture with "rg16f" format 5//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu 6 7//TEST_INPUT: RWTexture2D(format=RG16Float, size=4, content = one, mipMaps = 1):name g_test 8[format("rg16f")] 9RWTexture2D<float2> g_test; 10 11//TEST_INPUT:ubuffer(data=[0], stride=4):out,name outputBuffer 12RWStructuredBuffer<float> outputBuffer; 13 14[numthreads(1,1,1)] 15void computeMain( uint2 dispatchThreadID : SV_DispatchThreadID ) 16{ 17 g_test[dispatchThreadID].xy = float2(0.0, 1.0); 18 outputBuffer[dispatchThreadID.x] = g_test[dispatchThreadID].y; 19}