yum-mirror/slang

Making it easier to work with shaders

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

kaizhangNVChange representation of float literal in language translation (#3798)6cefb85bc

master
544 B18 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target hlsl -entry main -profile cs_6_0
2RWStructuredBuffer<int64_t> outputBuffer;
3RWStructuredBuffer<double> outputBuffer2;
4
5void main(uint id: SV_DispatchThreadID)
6{
7    let i = int64_t.maxValue;
8    let m = int64_t.minValue;
9    // CHECK: 9223372036854775807LL
10    // CHECK: -9223372036854775808LL
11    outputBuffer[0] = i;
12    outputBuffer[1] = m;
13
14    // CHECK: -1.79769313486231571e+308
15    outputBuffer2[0] = double.minValue;
16    // CHECK: 1.79769313486231571e+308
17    outputBuffer2[1] = double.maxValue;
18}