mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 18:28:12 +02:00
mesa: Free uniforms correclty.
This is an array of uniforms, not a single one.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit e2e9b4b10f)
This commit is contained in:
parent
09c746f2dc
commit
74f21adbb7
1 changed files with 2 additions and 1 deletions
|
|
@ -277,7 +277,8 @@ _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);
|
||||
for (unsigned 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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue