Commit f4f68e16 by Alexis Hetu Committed by Alexis Hétu

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/8111Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent d6d10f96
......@@ -1053,8 +1053,8 @@ namespace sw
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 @@ namespace sw
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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment