Fixed some quad layout computation related warnings Linux was complaining about ambiguous conditional expressions. Added some explicit casts to RValue<Int> to fix these warnings. Change-Id: Ib8e01ee69bb1794ea60b7954f1520a15e383cefa Reviewed-on: https://swiftshader-review.googlesource.com/8111 Tested-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Renderer/Blitter.cpp b/src/Renderer/Blitter.cpp index 4608641..086e7b7 100644 --- a/src/Renderer/Blitter.cpp +++ b/src/Renderer/Blitter.cpp
@@ -1053,8 +1053,8 @@ Int Blitter::ComputeOffset(Int& x, Int& y, Int& pitchB, int bytes, bool quadLayout) { - return (quadLayout ? (y & Int(~1)) : y) * pitchB + - (quadLayout ? ((y & Int(1)) << 1) + (x * 2) - (x & Int(1)) : x) * bytes; + return (quadLayout ? (y & Int(~1)) : RValue<Int>(y)) * pitchB + + (quadLayout ? ((y & Int(1)) << 1) + (x * 2) - (x & Int(1)) : RValue<Int>(x)) * bytes; } Routine *Blitter::generate(BlitState &state) @@ -1123,11 +1123,11 @@ For(Int j = y0d, j < y1d, j++) { Float x = x0; - Pointer<Byte> destLine = dest + (dstQuadLayout ? j & Int(~1) : j) * dPitchB; + Pointer<Byte> destLine = dest + (dstQuadLayout ? j & Int(~1) : RValue<Int>(j)) * dPitchB; For(Int i = x0d, i < x1d, i++) { - Pointer<Byte> d = destLine + (dstQuadLayout ? (((j & Int(1)) << 1) + (i * 2) - (i & Int(1))) : i) * dstBytes; + Pointer<Byte> d = destLine + (dstQuadLayout ? (((j & Int(1)) << 1) + (i * 2) - (i & Int(1))) : RValue<Int>(i)) * dstBytes; if(hasConstantColorI) { if(!write(constantColorI, d, state.destFormat, state.options))