Mesa (master): svga: Fix user clip planes.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Jan 12 12:06:50 UTC 2012


Module: Mesa
Branch: master
Commit: ce2929dde021e5754a3926b77b86b4de3208f4b0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce2929dde021e5754a3926b77b86b4de3208f4b0

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed Jan 11 20:54:13 2012 +0000

svga: Fix user clip planes.

Dirty flags also need to be updated in face of recent interface change.

Fixes regression in compiz.

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/gallium/drivers/svga/svga_state_framebuffer.c |    2 +-
 src/gallium/drivers/svga/svga_state_rss.c         |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c
index f3625e0..3244023 100644
--- a/src/gallium/drivers/svga/svga_state_framebuffer.c
+++ b/src/gallium/drivers/svga/svga_state_framebuffer.c
@@ -477,7 +477,7 @@ emit_clip_planes( struct svga_context *svga,
 
    /* TODO: just emit directly from svga_set_clip_state()?
     */
-   for (i = 0; i < 6; i++) {
+   for (i = 0; i < SVGA3D_MAX_CLIP_PLANES; i++) {
       /* need to express the plane in D3D-style coordinate space.
        * GL coords get converted to D3D coords with the matrix:
        * [ 1  0  0  0 ]
diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c
index d94ac35..af68d9c 100644
--- a/src/gallium/drivers/svga/svga_state_rss.c
+++ b/src/gallium/drivers/svga/svga_state_rss.c
@@ -244,8 +244,8 @@ static int emit_rss( struct svga_context *svga,
       EMIT_RS_FLOAT( svga, bias, DEPTHBIAS, fail );
    }
 
-   if (dirty & SVGA_NEW_CLIP) {
-      /* the number of clip planes is how many planes to enable */
+   if (dirty & SVGA_NEW_RAST) {
+      /* bitmask of the enabled clip planes */
       unsigned enabled = svga->curr.rast->templ.clip_plane_enable;
       EMIT_RS( svga, enabled, CLIPPLANEENABLE, fail );
    }
@@ -285,7 +285,6 @@ struct svga_tracked_state svga_hw_rss =
 
    (SVGA_NEW_BLEND |
     SVGA_NEW_BLEND_COLOR |
-    SVGA_NEW_CLIP |
     SVGA_NEW_DEPTH_STENCIL |
     SVGA_NEW_STENCIL_REF |
     SVGA_NEW_RAST |




More information about the mesa-commit mailing list