uint32_t draw_mode;
unsigned i;
+ if (!info->count_from_stream_output && !info->indirect &&
+ !info->primitive_restart &&
+ !u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
+ return;
+
if (ctx->vertex_elements == NULL || ctx->vertex_elements->num_elements == 0)
return; /* Nothing to do */
struct pipe_scissor_state *scissor = fd_context_get_scissor(ctx);
unsigned i, prims, buffers = 0;
+ if (!info->count_from_stream_output && !info->indirect &&
+ !info->primitive_restart &&
+ !u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
+ return;
+
/* if we supported transform feedback, we'd have to disable this: */
if (((scissor->maxx - scissor->minx) *
(scissor->maxy - scissor->miny)) == 0) {
#include "pipe/p_defines.h"
#include "util/u_inlines.h"
#include "util/u_memory.h"
+#include "util/u_prim.h"
#include "util/u_upload_mgr.h"
#include "pipe/p_screen.h"
const void *mapped_indices = NULL;
unsigned i;
+ if (!u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
+ return;
+
/*
* Ack vs contants here, helps ipers a lot.
*/
#include "util/u_format.h"
#include "util/u_inlines.h"
+#include "util/u_prim.h"
#include "translate/translate.h"
#include "nouveau_fence.h"
struct nouveau_pushbuf *push = nv30->base.pushbuf;
int i;
+ if (!info->primitive_restart &&
+ !u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
+ return;
+
/* For picking only a few vertices from a large user buffer, push is better,
* if index count is larger and we expect repeated vertices, suggest upload.
*/
return;
}
+ if (!u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
+ return;
+
r300_update_derived_state(r300);
draw_vbo(r300->draw, info);
{
struct swr_context *ctx = swr_context(pipe);
+ if (!info->count_from_stream_output && !info->indirect &&
+ !info->primitive_restart &&
+ !u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
+ return;
+
if (!swr_check_render_cond(pipe))
return;
{
struct vc4_context *vc4 = vc4_context(pctx);
+ if (!info->count_from_stream_output && !info->indirect &&
+ !info->primitive_restart &&
+ !u_trim_pipe_prim(info->mode, (unsigned*)&info->count))
+ return;
+
if (info->mode >= PIPE_PRIM_QUADS) {
util_primconvert_save_index_buffer(vc4->primconvert, &vc4->indexbuf);
util_primconvert_save_rasterizer_state(vc4->primconvert, &vc4->rasterizer->base);
#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"
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);
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);
}
}