yum-mirror/slang

Making it easier to work with shaders

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

James Helferty (NVIDIA)render-test: Change D3D12 default to sm_6_5 (#8320)f02b08490

master
950 B38 linesraw
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12
2//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk
3//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-mtl
4//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu
5//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cuda
6
7// CHECK:      1
8// CHECK-NEXT: 1
9// CHECK-NEXT: 1
10// CHECK-NEXT: 1
11
12//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
13RWStructuredBuffer<uint> outputBuffer;
14
15[numthreads(4, 1, 1)]
16void computeMain(uint tid : SV_GroupIndex)
17{
18    bool K = (bool)outputBuffer[tid];
19
20    bool c = or(K, K);
21
22    bool1 K1 = K;
23    bool2 K2 = K;
24    bool3 K3 = K;
25    bool4 K4 = K;
26
27    bool1 k = or(K, K);
28    bool2 n = or(K, K);
29    bool3 q = or(K, K);
30    bool4 t = or(K, K);
31
32    k = or(k, true);
33    n = or(n, true);
34    q = or(q, true);
35    t = or(t, true);
36
37    outputBuffer[tid] = all(k) && all(n) && all(q) && all(t);
38}