summaryrefslogtreecommitdiff
path: root/tests/hlsl-intrinsic/scalar-double-asuint.slang
blob: 89a1919a3d42f2f0fdc15f3edb42a5d21e7f68f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//TEST(compute):COMPARE_COMPUTE:-cpu -output-using-type
//TEST(compute):COMPARE_COMPUTE:-cuda -output-using-type

//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer
RWStructuredBuffer<int> outputBuffer;

[numthreads(4, 1, 1)]
void computeMain(in uint i : SV_GroupIndex)
{
    uint low, high;
    asuint(double(i), low, high);
    outputBuffer[i * 2] = int(low);
    outputBuffer[i * 2 + 1] = int(high);
}