summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-11-24 11:22:03 +0100
committerMichal Krol <michal@vmware.com>2009-11-24 11:22:03 +0100
commitbae9ece685e3c10fc0118e99771845d15895a0cc (patch)
treee90486cd9a3d0b1003c34769699366bb48f20fb3
parent53d9b7d361915d6cf33b73017789e746342cc453 (diff)
slang: Fix allocation size.
We don't need 16K+ to store a single pointer.
-rw-r--r--src/mesa/shader/slang/slang_emit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index fe39b46dbb..99eb254cee 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -81,8 +81,8 @@ new_subroutine(slang_emit_info *emitInfo, GLuint *id)
emitInfo->Subroutines = (struct gl_program **)
_mesa_realloc(emitInfo->Subroutines,
- n * sizeof(struct gl_program),
- (n + 1) * sizeof(struct gl_program));
+ n * sizeof(struct gl_program *),
+ (n + 1) * sizeof(struct gl_program *));
emitInfo->Subroutines[n] = ctx->Driver.NewProgram(ctx, emitInfo->prog->Target, 0);
emitInfo->Subroutines[n]->Parameters = emitInfo->prog->Parameters;
emitInfo->NumSubroutines++;