diff options
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_context.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 4b990a6a5d0..25b24c895d3 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -30,6 +30,7 @@ #include "util/u_inlines.h" #include "util/u_memory.h" #include "util/u_format.h" +#include "util/u_prim.h" #include "util/u_transfer.h" #include "util/u_helpers.h" #include "util/slab.h" @@ -592,6 +593,11 @@ static void virgl_draw_vbo(struct pipe_context *ctx, struct pipe_index_buffer ib = {}; struct pipe_draw_info info = *dinfo; + if (!dinfo->count_from_stream_output && !dinfo->indirect && + !dinfo->primitive_restart && + !u_trim_pipe_prim(dinfo->mode, (unsigned*)&dinfo->count)) + return; + if (!(rs->caps.caps.v1.prim_mask & (1 << dinfo->mode))) { util_primconvert_save_index_buffer(vctx->primconvert, &vctx->index_buffer); util_primconvert_draw_vbo(vctx->primconvert, dinfo); |