X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fdraw%2Fdraw_pt.c;h=6234272d6ce98a334b716111b9535b3e56df4a0e;hb=8d93f360c582297b9ced11c234ab4bd53103a8a6;hp=1d9395e06c3666e75e76858471551444d19c1afd;hpb=c7f5c9a3dc6350252e73b541bb85ab3ed9e64a9c;p=mesa.git diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index 1d9395e06c3..6234272d6ce 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -31,6 +31,7 @@ */ #include "draw/draw_context.h" +#include "draw/draw_gs.h" #include "draw/draw_private.h" #include "draw/draw_pt.h" #include "tgsi/tgsi_dump.h" @@ -38,10 +39,10 @@ #include "util/u_prim.h" -DEBUG_GET_ONCE_BOOL_OPTION(draw_fse, "DRAW_FSE", FALSE); -DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE); +DEBUG_GET_ONCE_BOOL_OPTION(draw_fse, "DRAW_FSE", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE) #ifdef HAVE_LLVM -DEBUG_GET_ONCE_BOOL_OPTION(draw_use_llvm, "DRAW_USE_LLVM", TRUE); +DEBUG_GET_ONCE_BOOL_OPTION(draw_use_llvm, "DRAW_USE_LLVM", TRUE) #endif static unsigned trim( unsigned count, unsigned first, unsigned incr ) @@ -74,30 +75,34 @@ draw_pt_arrays(struct draw_context *draw, { unsigned first, incr; draw_pt_split_prim(prim, &first, &incr); - count = trim(count, first, incr); + count = trim(count, first, incr); if (count < first) return TRUE; } if (!draw->force_passthrough) { + unsigned gs_out_prim = (draw->gs.geometry_shader ? + draw->gs.geometry_shader->output_primitive : + prim); + if (!draw->render) { opt |= PT_PIPELINE; } - + if (draw_need_pipeline(draw, draw->rasterizer, - prim)) { + gs_out_prim)) { opt |= PT_PIPELINE; } if (!draw->bypass_clipping && !draw->pt.test_fse) { opt |= PT_CLIPTEST; } - + opt |= PT_SHADE; } - - if (draw->pt.middle.llvm) { + + if (draw->pt.middle.llvm && !draw->gs.geometry_shader) { middle = draw->pt.middle.llvm; } else { if (opt == 0) @@ -119,7 +124,7 @@ draw_pt_arrays(struct draw_context *draw, frontend->prepare( frontend, prim, middle, opt ); - frontend->run(frontend, + frontend->run(frontend, draw_pt_elt_func(draw), draw_pt_elt_ptr(draw, start), draw->pt.user.eltBias,