summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-05-20 13:28:42 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2008-05-20 13:28:42 +0800
commitc6b36e5498cf6593daf001123cacec4ccaf305ca (patch)
tree3ec6b879d31baa703123a2b969e0aa31f635f9a3
parente469d78d33feff45f16235871ca1a3d483cdc950 (diff)
i965: Check fallback before accounting for index/vertex buffer size. fix #16028.
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 5ccf4f4128..f90c5f7b08 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -318,6 +318,14 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
goto flush;
}
+ /* Various fallback checks:
+ */
+ if (brw->intel.Fallback)
+ goto out;
+
+ if (check_fallbacks( brw, prim, nr_prims ))
+ goto out;
+
/* need to account for index buffer and vertex buffer */
if (ib) {
ret = brw_prepare_indices( brw, ib , &ib_bo, &ib_offset);
@@ -335,16 +343,6 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
force_flush = GL_TRUE;
goto flush;
}
-
-
-
- /* Various fallback checks:
- */
- if (brw->intel.Fallback)
- goto out;
-
- if (check_fallbacks( brw, prim, nr_prims ))
- goto out;
/* Upload index, vertex data:
*/