Mesa (master): i965: Disable clipping when rendering 3DPRIM_RECTLIST primitives

Kristian Høgsberg krh at kemper.freedesktop.org
Fri Aug 15 18:28:19 UTC 2014


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

Author: Kristian Høgsberg <krh at bitplanet.net>
Date:   Mon Jul  7 15:15:31 2014 -0700

i965: Disable clipping when rendering 3DPRIM_RECTLIST primitives

The clipper doesn't support clipping 3DPRIM_RECTLIST primitives and must
be turned off when we use them.

Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
Acked-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/gen6_clip_state.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index a8ed121..e8c1b91 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -129,10 +129,16 @@ upload_clip_state(struct brw_context *brw)
                  "having the GS not write primitives would likely");
    }
 
+   uint32_t enable;
+   if (brw->primitive == _3DPRIM_RECTLIST)
+      enable = 0;
+   else
+      enable = GEN6_CLIP_ENABLE;
+
    BEGIN_BATCH(4);
    OUT_BATCH(_3DSTATE_CLIP << 16 | (4 - 2));
    OUT_BATCH(dw1);
-   OUT_BATCH(GEN6_CLIP_ENABLE |
+   OUT_BATCH(enable |
 	     GEN6_CLIP_API_OGL |
 	     GEN6_CLIP_MODE_NORMAL |
 	     GEN6_CLIP_XY_TEST |




More information about the mesa-commit mailing list