yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Jay KwakDisable a few WGSL testing using Wave functions in branches (#8386)ffd58977b

master
968 B31 linesraw
1//TEST_CATEGORY(wave, compute)
2//DISABLE_TEST:COMPARE_COMPUTE_EX:-cpu -compute -shaderobj
3//DISABLE_TEST:COMPARE_COMPUTE_EX:-slang -compute -shaderobj
4//TEST:COMPARE_COMPUTE_EX:-slang -compute -dx12 -profile cs_6_0 -shaderobj
5//TEST(vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
6//TEST:COMPARE_COMPUTE_EX:-cuda -compute -capability cuda_sm_7_0 -shaderobj
7//TEST:COMPARE_COMPUTE_EX:-metal -compute -shaderobj
8
9// WGSL doesn't support wave functions in a dynamic control flow; it works with uniform control flow.
10//DISABLE_TEST:COMPARE_COMPUTE_EX:-wgpu -compute -shaderobj
11
12//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
13RWStructuredBuffer<int> outputBuffer;
14
15[numthreads(4, 1, 1)]
16void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
17{
18    int idx = int(dispatchThreadID.x);
19
20    int value = 0;
21
22    if (idx == 2)
23    {
24        // diverge
25        return;
26    }
27
28    value = WaveActiveMin(idx + 1);
29
30    outputBuffer[idx] = value;
31}