Module: Mesa
Branch: master
Commit: bae9ece685e3c10fc0118e99771845d15895a0cc
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bae9ece685e3c10fc0118e99771845d15895a0cc

Author: Michal Krol <[email protected]>
Date:   Tue Nov 24 11:22:03 2009 +0100

slang: Fix allocation size.

We don't need 16K+ to store a single pointer.

---

 src/mesa/shader/slang/slang_emit.c |    4 ++--
 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 fe39b46..99eb254 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++;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to