yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
7c2ff5475
master
1//TEST(compute):COMPARE_COMPUTE: -shaderobj 2//TEST(compute):COMPARE_COMPUTE: -vk -shaderobj 3//TEST(compute):COMPARE_COMPUTE:-wgpu 4 5// Note: disabled on CPU target until we can fill 6// in a more correct/complete `String` and `getStringHash` 7// for that target. 8// 9//TEST_DISABLED(compute):COMPARE_COMPUTE: -cpu 10 11 12import string_literal_module; 13 14//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer 15RWStructuredBuffer<int> outputBuffer; 16 17[numthreads(4, 1, 1)] 18void computeMain( 19 uint3 tid : SV_DispatchThreadID) 20{ 21 int value = doSomethingElse() + getStringHash("Hello \t\n\0x083 World"); 22 outputBuffer[tid.x] = value; 23} 24