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
1.2 KiB43 linesraw
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
2
3// CPU target doesn't support float16_t
4//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
5
6// HLSL doesn't support the training operations
7//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -output-using-type -profile cs_6_9 -Xslang... -Xdxc -Vd -X.
8
9// CHECK: type: half
10// CHECK-NEXT: 112.000000
11// CHECK-NEXT: 2.00
12// CHECK-NEXT: 3.00
13// CHECK-NEXT: 4.0
14
15
16//TEST_INPUT:ubuffer(data=[0 0 0 0 ], stride=2):out,name=outputBuffer
17RWStructuredBuffer<half> outputBuffer;
18
19//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4),name=inputA
20ByteAddressBuffer inputA;
21
22//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4),name=output
23RWByteAddressBuffer output;
24
25[numthreads(1, 1, 1)]
26void computeMain()
27{
28    CoopVec<half, 4> vecA;
29    for(int i = 0; i < vecA.getCount(); ++i)
30        vecA[i] = half(i+1);
31
32    output.Store(0, half(111));
33
34    coopVecReduceSumAccumulate(
35        vecA,
36        output,
37        0,
38    );
39
40    for(int i = 0; i < vecA.getCount(); ++i)
41        outputBuffer[i] = output.Load<half>(i * 2);
42}
43