diff options
Diffstat (limited to 'src/mesa/main/shaderobj.c')
-rw-r--r-- | src/mesa/main/shaderobj.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 9abf606f00f..454007f8353 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -240,6 +240,7 @@ _mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog prog->RefCount = 1; prog->AttributeBindings = string_to_uint_map_ctor(); + prog->FragDataBindings = string_to_uint_map_ctor(); #if FEATURE_ARB_geometry_shader4 prog->Geom.VerticesOut = 0; @@ -316,6 +317,11 @@ _mesa_free_shader_program_data(struct gl_context *ctx, shProg->AttributeBindings = NULL; } + if (shProg->FragDataBindings) { + string_to_uint_map_dtor(shProg->FragDataBindings); + shProg->FragDataBindings = NULL; + } + /* detach shaders */ for (i = 0; i < shProg->NumShaders; i++) { _mesa_reference_shader(ctx, &shProg->Shaders[i], NULL); |