yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f02b08490
master
1//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain 2//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -emit-spirv-directly 3//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-cpu -compute -entry computeMain 4//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-dx12 -compute -entry computeMain 5 6//TEST_INPUT:ubuffer(data=[0 0], stride=4):out,name=outputBuffer 7RWStructuredBuffer<int> outputBuffer; 8 9struct DefaultStructWithInit 10{ 11 int data0 = 3; 12 int data1 = 0; 13 __init(int inData) 14 { 15 data1 = 3; 16 } 17}; 18 19[numthreads(1, 1, 1)] 20void computeMain(uint3 dispatchThreadID: SV_DispatchThreadID) 21{ 22 DefaultStructWithInit withInit = DefaultStructWithInit(5); 23 // BUF: 1 24 outputBuffer[0] = true 25 && withInit.data0 == 3 26 && withInit.data1 == 3 27 ; 28}