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.0 KiB31 linesraw
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
2//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.
3//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type
4
5// CHECK: type: int32_t
6// CHECK-NEXT: 1
7// CHECK-NEXT: 3
8// CHECK-NEXT: 5
9// CHECK-NEXT: 7
10// CHECK-NEXT: 9
11
12//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer
13RWStructuredBuffer<int32_t> outputBuffer;
14
15//TEST_INPUT:ubuffer(data=[1 2 3 4 5], stride=4),name=input1
16ByteAddressBuffer input1;
17
18//TEST_INPUT:ubuffer(data=[0 1 2 3 4], stride=4),name=input2
19ByteAddressBuffer input2;
20
21[numthreads(1, 1, 1)]
22void computeMain()
23{
24    CoopVec<int, 5> vec1 = coopVecLoad<5, int32_t>(input1);
25    CoopVec<int, 5> vec2 = coopVecLoad<5, int32_t>(input2);
26
27    let result = vec1 + vec2;
28
29    for(int i = 0; i < result.getCount(); ++i)
30        outputBuffer[i] = result[i];
31}