yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f02b08490
master
1//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -xslang -zero-initialize 2//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-vk -compute -entry computeMain -emit-spirv-directly -allow-glsl -xslang -zero-initialize 3//DISABLE_TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-cpu -compute -entry computeMain -allow-glsl -xslang -zero-initialize 4//DISABLE_TEST(smoke,compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-dx12 -compute -entry computeMain -allow-glsl -xslang -zero-initialize 5 6//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer 7RWStructuredBuffer<int> outputBuffer; 8 9struct MyStruct_base 10{ 11 int a; 12}; 13struct MyStruct : MyStruct_base 14{ 15 int b; 16 int c; 17}; 18[numthreads(1, 1, 1)] 19void computeMain(int3 dispatchThreadID: SV_DispatchThreadID) 20{ 21 22 Array<MyStruct, 3> myStructs; 23 24// BUF: 1 25 outputBuffer[0] = true 26 && myStructs[0].a == 0 27 && myStructs[0].b == 0 28 && myStructs[0].c == 0 29 30 && myStructs[1].a == 0 31 && myStructs[1].b == 0 32 && myStructs[1].c == 0 33 34 && myStructs[2].a == 0 35 && myStructs[2].b == 0 36 && myStructs[2].c == 0 37 ; 38}