aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorOliver McFadden <[email protected]>2007-07-16 06:33:53 +0000
committerOliver McFadden <[email protected]>2007-07-16 06:33:53 +0000
commitddb74cb443913a159ec800891710f18d4700d398 (patch)
tree244dc1eab939ce2b471f94130514d92a830f788c /src/mesa/drivers/dri
parentd0b3f3ce817700286e059bb24caa12b09e7ec954 (diff)
r300: Clean up the vertex program maximum length check.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 9c125136083..1fea88a8539 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -1126,13 +1126,11 @@ static void r300TranslateVertexShader(struct r300_vertex_program *vp,
}
}
- /* Will most likely segfault before we get here... fix later. */
- if (o_inst - vp->program.body.i >= VSF_MAX_FRAGMENT_LENGTH / 4) {
+ vp->program.length = (o_inst - vp->program.body.i) * 4;
+ if (vp->program.length >= VSF_MAX_FRAGMENT_LENGTH) {
vp->program.length = 0;
vp->native = GL_FALSE;
- return;
}
- vp->program.length = (o_inst - vp->program.body.i) * 4;
#if 0
fprintf(stderr, "hw program:\n");