OSDN Git Service

Fix CLang build.
authorNicolas Capens <nicolas.capens@gmail.com>
Sat, 2 Jun 2018 02:02:13 +0000 (22:02 -0400)
committerNicolas Capens <nicolascapens@google.com>
Sat, 2 Jun 2018 02:03:47 +0000 (02:03 +0000)
Fixes "error: conditional expression is ambiguous; 'sw::Float' can be
converted to 'RValue<sw::Float>' and vice versa".

Change-Id: I2bd21036803dc54ce212df61a7520b7276b94b2a
Reviewed-on: https://swiftshader-review.googlesource.com/19168
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
src/Renderer/Blitter.cpp

index 17c7199..f68c7c8 100644 (file)
@@ -1237,12 +1237,12 @@ namespace sw
 
                        For(Int j = y0d, j < y1d, j++)
                        {
-                               Float y = state.clearOperation ? y0 : y0 + Float(j) * h;
+                               Float y = state.clearOperation ? RValue<Float>(y0) : y0 + Float(j) * h;
                                Pointer<Byte> destLine = dest + (dstQuadLayout ? j & Int(~1) : RValue<Int>(j)) * dPitchB;
 
                                For(Int i = x0d, i < x1d, i++)
                                {
-                                       Float x = state.clearOperation ? x0 : x0 + Float(i) * w;
+                                       Float x = state.clearOperation ? RValue<Float>(x0) : x0 + Float(i) * w;
                                        Pointer<Byte> d = destLine + (dstQuadLayout ? (((j & Int(1)) << 1) + (i * 2) - (i & Int(1))) : RValue<Int>(i)) * dstBytes;
 
                                        if(hasConstantColorI)