Before this commit, brw_set_prim() used intel_context.reduced_primitive
and BRW_NEW_REDUCED_PRIMITIVE regardless of generation. This was
confusing, because those bits are not actually used on Gen >= 6.

Signed-off-by: Chad Versace <c...@chad-versace.us>
---
 src/mesa/drivers/dri/i965/brw_draw.c       |    3 ++-
 src/mesa/drivers/dri/intel/intel_context.h |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_draw.c 
b/src/mesa/drivers/dri/i965/brw_draw.c
index bdb5b67..a7becb3 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -106,7 +106,8 @@ static GLuint brw_set_prim(struct brw_context *brw,
       brw->primitive = mode;
       brw->state.dirty.brw |= BRW_NEW_PRIMITIVE;
 
-      if (reduced_prim[mode] != brw->intel.reduced_primitive) {
+      if (brw->intel.gen < 6 &&
+         reduced_prim[mode] != brw->intel.reduced_primitive) {
         brw->intel.reduced_primitive = reduced_prim[mode];
         brw->state.dirty.brw |= BRW_NEW_REDUCED_PRIMITIVE;
       }
diff --git a/src/mesa/drivers/dri/intel/intel_context.h 
b/src/mesa/drivers/dri/intel/intel_context.h
index 78e3ca3..74d88a4 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -265,7 +265,7 @@ struct intel_context
    GLuint RenderIndex;
    GLmatrix ViewportMatrix;
    GLenum render_primitive;
-   GLenum reduced_primitive;
+   GLenum reduced_primitive; /*< Only gen < 6 */
    GLuint vertex_size;
    GLubyte *verts;              /* points to tnl->clipspace.vertex_buf */
 
-- 
1.7.6.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to