summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-09 15:57:45 +0200
committerMarek Olšák <[email protected]>2017-04-20 20:11:35 +0200
commit707d2e8b3e53c761720adaca7137b242dff344b6 (patch)
tree663f4c9c5b3c3efcc0e815fe56e83a8e4fa9d2e3 /src/mesa
parent2beff74314459df86561eea74a1864c50c54ec4f (diff)
gallium: fold u_trim_pipe_prim call from st/mesa to drivers
Most drivers don't need it and shouldn't need it because it can't be used in some cases (indirect draws, primitive restart, count from streamout). Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_draw.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index f04b6c2f163..561633cdaf0 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -251,16 +251,8 @@ st_draw_vbo(struct gl_context *ctx,
info.indexed);
}
- if (info.count_from_stream_output) {
- cso_draw_vbo(st->cso_context, &info);
- }
- else if (info.primitive_restart) {
- /* don't trim, restarts might be inside index list */
- cso_draw_vbo(st->cso_context, &info);
- }
- else if (u_trim_pipe_prim(prims[i].mode, &info.count)) {
- cso_draw_vbo(st->cso_context, &info);
- }
+ /* Don't call u_trim_pipe_prim. Drivers should do it if they need it. */
+ cso_draw_vbo(st->cso_context, &info);
}
}