diff options
author | Tapani Pälli <[email protected]> | 2020-04-30 13:03:48 +0300 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-04 13:28:49 +0000 |
commit | 46b3cb011fd1c9198aeec33d453206846b579817 (patch) | |
tree | 5fa18cf5fcbdb6f7f02a5c34260faefc2deeb879 /src/mesa | |
parent | 7e7bb38bd8b12fec09afc0e515480bb6c5a8475a (diff) |
st/mesa: destroy only own program variants when program is released
Earlier commit tried to achieve this but actually did more. This makes
sure the variants for other contexts continue to live.
Fixes: de3d7dbed52 ("mesa/st: release variants for active programs before unref")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2865
Cc: [email protected]
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4831>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 3fa5ff7b74c..cb9fcfdbdd6 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -70,6 +70,8 @@ #include "cso_cache/cso_context.h" +static void +destroy_program_variants(struct st_context *st, struct gl_program *target); static void set_affected_state_flags(uint64_t *states, @@ -345,7 +347,7 @@ st_release_program(struct st_context *st, struct st_program **p) if (!*p) return; - st_release_variants(st, *p); + destroy_program_variants(st, &((*p)->Base)); st_reference_prog(st, p, NULL); } |