svga: fix primitive mode (point/line/tri) test for unfilled primitives
authorBrian Paul <brianp@vmware.com>
Mon, 9 May 2016 19:42:58 +0000 (13:42 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 26 May 2016 23:44:17 +0000 (17:44 -0600)
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 <charmainel@vmware.com>
src/gallium/drivers/svga/svga_draw_arrays.c
src/gallium/drivers/svga/svga_draw_elements.c

index 7d82930677b9f0f7912e6eb4fbe8a44f37372561..c0567728e920b696fa4af3bf0e60b50d6586a577 100644 (file)
@@ -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,
index 74bfebda18f6343c748589a420610a8d3bbe7320..a987b929861ceb6550ec5e5d9ca0b1487ef19823 100644 (file)
@@ -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,