yum-mirror/slang

Making it easier to work with shaders

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

Mukund KeshavaEnable tests for CUDA (#7593)141eac9eb

master
431 B14 linesraw
1//TEST(compute):COMPARE_COMPUTE:-cpu -output-using-type
2//TEST(compute):COMPARE_COMPUTE:-cuda -output-using-type
3
4//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer
5RWStructuredBuffer<int> outputBuffer;
6
7[numthreads(4, 1, 1)]
8void computeMain(in uint i : SV_GroupIndex)
9{
10    uint low, high;
11    asuint(double(i), low, high);
12    outputBuffer[i * 2] = int(low);
13    outputBuffer[i * 2 + 1] = int(high);
14}