summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-08-15 20:30:45 +1000
committerDave Airlie <[email protected]>2009-08-15 20:30:45 +1000
commit3cc9a28b9b493d2426e2f182fc26b9da847e0c7f (patch)
treed8e7e9dbc6747653a0ec829c9e0205dbb828d5f0 /src/mesa
parent5e4e8effecb1914b31b869e2aa91f2299e57229d (diff)
r300: add just in case warn I don't think this can actually happen
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 8e6b4967ef1..4bf09c2e89a 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -380,6 +380,11 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
if (align % 4)
nr -= incr;
} while(align % 4);
+ if (nr <= 0) {
+ WARN_ONCE("did the impossible happen? we never aligned nr to dword\n");
+ return;
+ }
+
}
r300FireEB(rmesa, nr, type, offset);