aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/shaderobj.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/shaderobj.c b/mesalib/src/mesa/main/shaderobj.c
index 7eb6f0bda..16800ae5e 100644
--- a/mesalib/src/mesa/main/shaderobj.c
+++ b/mesalib/src/mesa/main/shaderobj.c
@@ -278,7 +278,9 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
struct gl_shader_program *shProg)
{
if (shProg->UniformStorage) {
- _mesa_uniform_detach_all_driver_storage(shProg->UniformStorage);
+ unsigned i;
+ for (i = 0; i < shProg->NumUserUniformStorage; ++i)
+ _mesa_uniform_detach_all_driver_storage(&shProg->UniformStorage[i]);
ralloc_free(shProg->UniformStorage);
shProg->NumUserUniformStorage = 0;
shProg->UniformStorage = NULL;