svga: Fix PIPE_LOGICOP_INVERT.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 27 Jan 2010 14:45:56 +0000 (14:45 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 22 Feb 2010 21:46:00 +0000 (21:46 +0000)
Actually the current XOR implementation is an INVERT.

This fixes rectangle selection in Maya.

src/gallium/drivers/svga/svga_pipe_blend.c

index b60117f090e9a4af156b9fa3c2533fde965306a2..594eec7166e2092e6119f2f85b4a35d933f39e46 100644 (file)
@@ -92,6 +92,7 @@ svga_create_blend_state(struct pipe_context *pipe,
       if (templ->logicop_enable) {
          switch (templ->logicop_func) {
          case PIPE_LOGICOP_XOR:
+         case PIPE_LOGICOP_INVERT:
             blend->need_white_fragments = TRUE;
             blend->rt[i].blend_enable = TRUE;
             blend->rt[i].srcblend       = SVGA3D_BLENDOP_ONE;
@@ -125,12 +126,6 @@ svga_create_blend_state(struct pipe_context *pipe,
             blend->rt[i].dstblend       = SVGA3D_BLENDOP_ONE;
             blend->rt[i].blendeq        = SVGA3D_BLENDEQ_MAXIMUM;
             break;
-         case PIPE_LOGICOP_INVERT:
-            blend->rt[i].blend_enable = TRUE;
-            blend->rt[i].srcblend       = SVGA3D_BLENDOP_INVSRCCOLOR;
-            blend->rt[i].dstblend       = SVGA3D_BLENDOP_ZERO;
-            blend->rt[i].blendeq        = SVGA3D_BLENDEQ_ADD;
-            break;
          case PIPE_LOGICOP_AND:
             /* Approximate with minimum - works for the 0 & anything case: */
             blend->rt[i].blend_enable = TRUE;