From: Brian Paul Date: Mon, 9 May 2016 19:42:58 +0000 (-0600) Subject: svga: fix primitive mode (point/line/tri) test for unfilled primitives X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5393238765b478f77616936047e78512fe91b66f;p=mesa.git svga: fix primitive mode (point/line/tri) test for unfilled primitives The original mode test was valid before we had GS support. Regression tested with full piglit run. Though, I don't think we have any piglit tests that exercise drawing unfilled adjacency primitives. Reviewed-by: Charmaine Lee --- diff --git a/src/gallium/drivers/svga/svga_draw_arrays.c b/src/gallium/drivers/svga/svga_draw_arrays.c index 7d82930677b..c0567728e92 100644 --- a/src/gallium/drivers/svga/svga_draw_arrays.c +++ b/src/gallium/drivers/svga/svga_draw_arrays.c @@ -237,7 +237,7 @@ svga_hwtnl_draw_arrays(struct svga_hwtnl *hwtnl, } if (hwtnl->api_fillmode != PIPE_POLYGON_MODE_FILL && - prim >= PIPE_PRIM_TRIANGLES) { + u_reduced_prim(prim) == PIPE_PRIM_TRIANGLES) { /* Convert unfilled polygons into points, lines, triangles */ gen_type = u_unfilled_generator(prim, start, diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c index 74bfebda18f..a987b929861 100644 --- a/src/gallium/drivers/svga/svga_draw_elements.c +++ b/src/gallium/drivers/svga/svga_draw_elements.c @@ -139,7 +139,7 @@ svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl, enum pipe_error ret = PIPE_OK; if (hwtnl->api_fillmode != PIPE_POLYGON_MODE_FILL && - prim >= PIPE_PRIM_TRIANGLES) { + u_reduced_prim(prim) == PIPE_PRIM_TRIANGLES) { gen_type = u_unfilled_translator(prim, index_size, count,