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
967 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 = and(K, K);
21
22    bool1 K1 = K;
23    bool2 K2 = K;
24    bool3 K3 = K;
25    bool4 K4 = K;
26
27    bool1 k = and(K, K);
28    bool2 n = and(K, K);
29    bool3 q = and(K, K);
30    bool4 t = and(K, K);
31
32    k = !and(k, false);
33    n = !and(n, false);
34    q = !and(q, false);
35    t = !and(t, false);
36
37    outputBuffer[tid] = all(k) && all(n) && all(q) && all(t);
38}