*/
#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"
#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 )
{
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)
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,