aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
index ffbd5482627..8fcc17048d2 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
@@ -31,6 +31,7 @@
#include "draw/draw_context.h"
#include "draw/draw_vbuf.h"
#include "draw/draw_vertex.h"
+#include "draw/draw_prim_assembler.h"
#include "draw/draw_pt.h"
#include "draw/draw_vs.h"
#include "draw/draw_gs.h"
@@ -222,6 +223,8 @@ static void fetch_pipeline_generic( struct draw_pt_middle_end *middle,
struct draw_vertex_info vs_vert_info;
struct draw_vertex_info gs_vert_info;
struct draw_vertex_info *vert_info;
+ struct draw_prim_info ia_prim_info;
+ struct draw_vertex_info ia_vert_info;
const struct draw_prim_info *prim_info = in_prim_info;
boolean free_prim_info = FALSE;
unsigned opt = fpme->opt;
@@ -279,10 +282,21 @@ static void fetch_pipeline_generic( struct draw_pt_middle_end *middle,
FREE(vert_info->verts);
vert_info = &gs_vert_info;
prim_info = &gs_prim_info;
+ } else {
+ if (draw_prim_assembler_is_required(draw, prim_info, vert_info)) {
+ draw_prim_assembler_run(draw, prim_info, vert_info,
+ &ia_prim_info, &ia_vert_info);
+
+ if (ia_vert_info.count) {
+ FREE(vert_info->verts);
+ vert_info = &ia_vert_info;
+ prim_info = &ia_prim_info;
+ free_prim_info = TRUE;
+ }
+ }
}
-
if (prim_info->count == 0) {
- debug_printf("GS didn't emit any vertices!\n");
+ debug_printf("GS/IA didn't emit any vertices!\n");
FREE(vert_info->verts);
if (free_prim_info) {