OSDN Git Service

Fix multisampled line rendering.
authorNicolas Capens <capn@google.com>
Sat, 17 Mar 2018 03:23:06 +0000 (23:23 -0400)
committerNicolas Capens <nicolascapens@google.com>
Wed, 21 Mar 2018 13:08:58 +0000 (13:08 +0000)
Bug swiftshader:99
Bug chromium:820461

Change-Id: I2232c27d57aedff03293b37607f97ead56c056c9
Reviewed-on: https://swiftshader-review.googlesource.com/17808
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
src/Common/Version.h
src/Renderer/Renderer.cpp

index 1747820..074bf53 100644 (file)
@@ -15,7 +15,7 @@
 #define MAJOR_VERSION 4
 #define MINOR_VERSION 0
 #define BUILD_VERSION 0
-#define BUILD_REVISION 2
+#define BUILD_REVISION 3
 
 #define STRINGIFY(x) #x
 #define MACRO_STRINGIFY(x) STRINGIFY(x)
index 2bb699a..7282e38 100644 (file)
@@ -1758,30 +1758,26 @@ namespace sw
                        dx *= scale;
                        dy *= scale;
 
-                       float dx0w = dx * P0.w / W;
-                       float dy0h = dy * P0.w / H;
                        float dx0h = dx * P0.w / H;
                        float dy0w = dy * P0.w / W;
 
-                       float dx1w = dx * P1.w / W;
-                       float dy1h = dy * P1.w / H;
                        float dx1h = dx * P1.w / H;
                        float dy1w = dy * P1.w / W;
 
-                       P[0].x += -dy0w + -dx0w;
-                       P[0].y += -dx0h + +dy0h;
+                       P[0].x += -dy0w;
+                       P[0].y += +dx0h;
                        C[0] = clipper->computeClipFlags(P[0]);
 
-                       P[1].x += -dy1w + +dx1w;
-                       P[1].y += -dx1h + +dy1h;
+                       P[1].x += -dy1w;
+                       P[1].y += +dx1h;
                        C[1] = clipper->computeClipFlags(P[1]);
 
-                       P[2].x += +dy1w + +dx1w;
-                       P[2].y += +dx1h + -dy1h;
+                       P[2].x += +dy1w;
+                       P[2].y += -dx1h;
                        C[2] = clipper->computeClipFlags(P[2]);
 
-                       P[3].x += +dy0w + -dx0w;
-                       P[3].y += +dx0h + +dy0h;
+                       P[3].x += +dy0w;
+                       P[3].y += -dx0h;
                        C[3] = clipper->computeClipFlags(P[3]);
 
                        if((C[0] & C[1] & C[2] & C[3]) == Clipper::CLIP_FINITE)