aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-10-31 10:14:17 -0700
committerEric Anholt <[email protected]>2013-11-12 15:04:25 -0800
commit8bd45a7e7ed8be3f5bb13689d249fc886cf73067 (patch)
treed32b4276c3a775c369fcc9bc481e43fcb9f09a25 /src/mesa
parentc944bde5bee6097fd42eed23d293e021df76f6d7 (diff)
i965: Add a warning if something ever hits a bug I noticed.
We'd have to map the VBO and rewrite things to a lower stride to fix it. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index e2002e8ebc6..57b81df8110 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -609,6 +609,7 @@ static void brw_prepare_vertices(struct brw_context *brw)
static void brw_emit_vertices(struct brw_context *brw)
{
+ struct gl_context *ctx = &brw->ctx;
GLuint i, nr_elements;
brw_prepare_vertices(brw);
@@ -680,6 +681,9 @@ static void brw_emit_vertices(struct brw_context *brw)
if (brw->gen == 7)
dw0 |= GEN7_MOCS_L3 << 16;
+ WARN_ONCE(buffer->stride >= (brw->gen >= 5 ? 2048 : 2047),
+ "VBO stride %d too large, bad rendering may occur\n",
+ buffer->stride);
OUT_BATCH(dw0 | (buffer->stride << BRW_VB0_PITCH_SHIFT));
OUT_RELOC(buffer->bo, I915_GEM_DOMAIN_VERTEX, 0, buffer->offset);
if (brw->gen >= 5) {