diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2003-04-03 21:01:33 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2003-04-03 21:01:33 +0000 |
commit | b0e90cc839c6b7fcd3bd76759862eb3bc423e50a (patch) | |
tree | 288a87be29bd8016e208cc54cb91e8247556ef02 /src/mesa/tnl/t_imm_fixup.c | |
parent | 78233887446a8f5fe66d674caf1b7ee838647ac1 (diff) |
more memory-related fixes
Diffstat (limited to 'src/mesa/tnl/t_imm_fixup.c')
-rw-r--r-- | src/mesa/tnl/t_imm_fixup.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_imm_fixup.c b/src/mesa/tnl/t_imm_fixup.c index b8c1bf4e72..7fb4d4753e 100644 --- a/src/mesa/tnl/t_imm_fixup.c +++ b/src/mesa/tnl/t_imm_fixup.c @@ -544,6 +544,12 @@ _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM ) for (attr = 1; attr < VERT_ATTRIB_MAX; attr++) { /* skip 0 (POS) */ const GLuint attrBit = 1 << attr; if (fixup & attrBit) { + if (!IM->Attrib[attr]) { + IM->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat)); + if (!IM->Attrib[attr]) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing"); + } + } if (attr == VERT_ATTRIB_COLOR0) { /* special case, darn */ if (IM->CopyOrFlag & VERT_BIT_COLOR0) |