diff options
Diffstat (limited to 'mesalib/src/mesa/main/arbprogram.c')
-rw-r--r-- | mesalib/src/mesa/main/arbprogram.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/arbprogram.c b/mesalib/src/mesa/main/arbprogram.c index 51a299370..8bd3f0bd0 100644 --- a/mesalib/src/mesa/main/arbprogram.c +++ b/mesalib/src/mesa/main/arbprogram.c @@ -265,6 +265,12 @@ get_local_param_pointer(struct gl_context *ctx, const char *func, return GL_FALSE; } + if (!prog->LocalParams) { + prog->LocalParams = calloc(maxParams, sizeof(float[4])); + if (!prog->LocalParams) + return GL_FALSE; + } + *param = prog->LocalParams[index]; return GL_TRUE; } |