Mesa (gallium-clip-state): svga: adapt to new clip state

Marek Olšák mareko at kemper.freedesktop.org
Tue Dec 27 22:36:45 UTC 2011


Module: Mesa
Branch: gallium-clip-state
Commit: e3056524b19b56d473f4faff84ffa0eb41497408
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3056524b19b56d473f4faff84ffa0eb41497408

Author: Marek Olšák <maraeo at gmail.com>
Date:   Mon Dec 26 06:26:55 2011 +0100

svga: adapt to new clip state

---

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

diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c
index 8c0dddf..f3625e0 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 < svga->curr.clip.nr; i++) {
+   for (i = 0; i < 6; 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 a4d56bd..f9ac174 100644
--- a/src/gallium/drivers/svga/svga_state_rss.c
+++ b/src/gallium/drivers/svga/svga_state_rss.c
@@ -246,7 +246,7 @@ static int emit_rss( struct svga_context *svga,
 
    if (dirty & SVGA_NEW_CLIP) {
       /* the number of clip planes is how many planes to enable */
-      unsigned enabled = (1 << svga->curr.clip.nr) - 1;
+      unsigned enabled = svga->curr.rast->templ.user_clip_plane_enable;
       EMIT_RS( svga, enabled, CLIPPLANEENABLE, fail );
    }
 




More information about the mesa-commit mailing list