summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_context.c')
-rw-r--r--src/gallium/drivers/i915/i915_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index 6664cfc3dfe..c22e4056424 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -37,6 +37,7 @@
#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"
@@ -57,6 +58,9 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
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.
*/