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

Author: Marek Olšák <[email protected]>
Date:   Mon Mar 10 16:27:21 2014 +0100

st/mesa: drop the lowering of quad strips to triangle strips

This fallback to triangle strips is silly and should be done in drivers
if they need it.

This should fix the case when quad strips are used with flatshading that is
enabled by the "flat" GLSL varying modifier. It also fixes primitive restart
for quad strips.

This fixes piglit:
  NV_primitive_restart/primitive-restart-draw-mode-quad_strip

Cc: [email protected]
Reviewed-by: Brian Paul <[email protected]>

---

 src/mesa/state_tracker/st_draw.c |   10 ----------
 1 file changed, 10 deletions(-)

diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 355c180..dba5870 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -164,16 +164,6 @@ translate_prim(const struct gl_context *ctx, unsigned prim)
    STATIC_ASSERT(GL_QUADS == PIPE_PRIM_QUADS);
    STATIC_ASSERT(GL_TRIANGLE_STRIP_ADJACENCY == 
PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY);
 
-   /* Avoid quadstrips if it's easy to do so:
-    * Note: it's important to do the correct trimming if we change the
-    * prim type!  We do that wherever this function is called.
-    */
-   if (prim == GL_QUAD_STRIP &&
-       ctx->Light.ShadeModel != GL_FLAT &&
-       ctx->Polygon.FrontMode == GL_FILL &&
-       ctx->Polygon.BackMode == GL_FILL)
-      prim = GL_TRIANGLE_STRIP;
-
    return prim;
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to