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
640 B24 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: 2.000000
5// CHECK-NEXT: 4.000000
6// CHECK-NEXT: 6.000000
7// CHECK-NEXT: 8.000000
8
9//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
10RWStructuredBuffer<float> outputBuffer;
11
12void doubleCoopVec(CoopVec<float, 4> vec, out CoopVec<float, 4> result)
13{
14    result = vec * 2.0;
15}
16
17[numthreads(1, 1, 1)]
18void computeMain()
19{
20    let vec = CoopVec<float, 4>(1.0, 2.0, 3.0, 4.0);
21    CoopVec<float, 4> result;
22    doubleCoopVec(vec, result);
23    result.store(outputBuffer, 0);
24}