yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
199d1f52b
master
1// TODO(JS): Disabled because fails on windows CI. 2// Probably because on CI it is using std output to detect errors/warnings, not looking at the return code. 3 4//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute 5//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute 6//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 7//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute 8//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-cuda -compute 9 10//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer 11RWStructuredBuffer<float> outputBuffer; 12 13[numthreads(4, 1, 1)] 14void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 15{ 16 int idx = int(dispatchThreadID.x); 17 18 float v = 0.0f; 19 20 // Test to check handling of + and -inf 21 if (idx == 0) 22 { 23 v = 5e+40; 24 } 25 else if (idx == 1) 26 { 27 v = -5e+40; 28 } 29 30 outputBuffer[idx] = v; 31}