Skip to content
Snippets Groups Projects
Commit 624789e3 authored by Tapani Pälli's avatar Tapani Pälli
Browse files

compiler/glsl: handle case where we have multiple users for types


Both Vulkan and OpenGL might be using glsl_types simultaneously or we
can also have multiple concurrent Vulkan instances using glsl_types.
Patch adds a one time init to track number of users and will release
types only when last user calls _glsl_type_singleton_decref().

This change fixes glsl_type memory leaks we have with anv driver.

v2: reuse hash_mutex, cleanup, apply fix also to radv driver and
    rename helper functions (Jason)

v3: move init, destroy to happen on GL context init and destroy

Signed-off-by: default avatarTapani Pälli <tapani.palli@intel.com>
Reviewed-by: default avatarTimothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
parent 04508f57
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment