[GPU] Fix negative shift build error

This commit is contained in:
Triang3l 2020-08-29 00:22:06 +03:00
parent 210c30aef9
commit 1b3db70a07
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ int32_t FloatToD3D11Fixed16p8(float f32) {
}
// n <= -2^(i-1) -> -2^(i-1) . 0
if (f32 <= -32768.0f) {
return -32768 << 8;
return -32768 * 256;
}
uint32_t f32_bits = *reinterpret_cast<const uint32_t*>(&f32);
// Copy float32 mantissa bits [22:0] into corresponding bits [22:0] of a