mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 16:18:06 +02:00
r300: Clean up the vertex program maximum length check.
This commit is contained in:
parent
d0b3f3ce81
commit
ddb74cb443
1 changed files with 2 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue