From 5393238765b478f77616936047e78512fe91b66f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 9 May 2016 13:42:58 -0600 Subject: 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 --- src/gallium/drivers/svga/svga_draw_arrays.c | 2 +- src/gallium/drivers/svga/svga_draw_elements.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers') 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, -- cgit v1.2.3