projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53d9b7d
)
slang: Fix allocation size.
author
Michal Krol
<michal@vmware.com>
Tue, 24 Nov 2009 10:22:03 +0000
(11:22 +0100)
committer
Michal Krol
<michal@vmware.com>
Tue, 24 Nov 2009 10:22:03 +0000
(11:22 +0100)
We don't need 16K+ to store a single pointer.
src/mesa/shader/slang/slang_emit.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_emit.c
b/src/mesa/shader/slang/slang_emit.c
index fe39b46dbb485927216dcba02be33074f8edf9aa..99eb254cee0392257a464eaf96bc899ae95ed442 100644
(file)
--- 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++;