summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/bit-cast/widening-bit-cast-error.slang
blob: 29dc5a4e17c011dd7e888d7d08fdcf660d02a716 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly -stage compute -entry computeMain

uniform StructuredBuffer<uint32_t> in;
uniform RWStructuredBuffer<uint64_t> out;

//CHECK: error 41202{{.*}}4{{.*}}8

[numthreads(4, 1, 1)]
[shader("compute")]
void computeMain() {
    out[0] = bit_cast<uint64_t, uint32_t>(in[0]);
}