yum-mirror/slang

Making it easier to work with shaders

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

ArielG-NVEnable (at least a sub-set of) CoopVec tests that are disabled (#7706)d8d0b8969

master
763 B31 linesraw
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type
2
3// CHECK: type: float
4// CHECK-NEXT: 1.000000
5// CHECK-NEXT: 2.000000
6// CHECK-NEXT: 3.000000
7// CHECK-NEXT: 4.000000
8// CHECK-NEXT: 5.000000
9// CHECK-NEXT: 6.000000
10// CHECK-NEXT: 7.000000
11// CHECK-NEXT: 8.000000
12
13//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
14RWStructuredBuffer<float> outputBuffer;
15
16struct MyStruct
17{
18    CoopVec<float, 4> vec1;
19    CoopVec<float, 4> vec2;
20};
21
22[numthreads(1, 1, 1)]
23void computeMain()
24{
25    MyStruct s;
26    s.vec1 = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0);
27    s.vec2 = CoopVec<float, 4>(5.0, 6.0, 7.0, 8.0);
28
29    s.vec1.store(outputBuffer, 0);
30    s.vec2.store(outputBuffer, 16);
31}