yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
9b6b31be5
master
1//TEST:SIMPLE(filecheck=CHECK): -stage compute -entry computeMain -target hlsl 2 3RWStructuredBuffer<int> inputBuffer; 4RWStructuredBuffer<int> outputBuffer; 5 6[numthreads(4, 1, 1)] 7void computeMain(int3 dispatchThreadID: SV_DispatchThreadID) 8{ 9 uint8_t u8 = uint8_t(inputBuffer[0]); 10 11 uint result = (u8 << 0) 12 + (u8 << 1) 13 + (u8 << 2) 14 + (u8 << 3) 15 + (u8 << 4) 16 + (u8 << 5) 17 + (u8 << 6) 18 + (u8 << 7) 19 // CHECK-NOT: warning 41030: 20 // CHECK: ([[#@LINE+1]]): warning 41030: {{.*}}uint8{{.*}}8 21 + (u8 << 8) 22 // CHECK: ([[#@LINE+1]]): warning 41030: {{.*}}uint8{{.*}}9 23 + (u8 << 9) 24 ; 25 26 outputBuffer[0] = int(result); 27}