mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
mesa: Fix leak of uniform storage records on shader program link/free.
NOTE: This is a candidate for the 8.0 branch.
This commit is contained in:
parent
cbd464a117
commit
0f68d88034
1 changed files with 2 additions and 0 deletions
|
|
@ -35,6 +35,7 @@
|
|||
#include "main/mfeatures.h"
|
||||
#include "main/mtypes.h"
|
||||
#include "main/shaderobj.h"
|
||||
#include "main/uniforms.h"
|
||||
#include "program/program.h"
|
||||
#include "program/prog_parameter.h"
|
||||
#include "program/hash_table.h"
|
||||
|
|
@ -276,6 +277,7 @@ _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);
|
||||
ralloc_free(shProg->UniformStorage);
|
||||
shProg->NumUserUniformStorage = 0;
|
||||
shProg->UniformStorage = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue