From: Tapani Pälli Date: Thu, 2 Apr 2020 09:54:17 +0000 (+0300) Subject: mesa/st: unbind shader state before deleting it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4822cc97007b0dae4d095c507efc182628510434;p=mesa.git mesa/st: unbind shader state before deleting it Signed-off-by: Tapani Pälli Reviewed-by: Marek Olšák Reviewed-by: Jordan Justen Cc: mesa-stable@lists.freedesktop.org Part-of: --- diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 846a76c1733..fa309436408 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -399,21 +399,27 @@ free_zombie_shaders(struct st_context *st) switch (entry->type) { case PIPE_SHADER_VERTEX: + st->pipe->bind_vs_state(st->pipe, NULL); st->pipe->delete_vs_state(st->pipe, entry->shader); break; case PIPE_SHADER_FRAGMENT: + st->pipe->bind_fs_state(st->pipe, NULL); st->pipe->delete_fs_state(st->pipe, entry->shader); break; case PIPE_SHADER_GEOMETRY: + st->pipe->bind_gs_state(st->pipe, NULL); st->pipe->delete_gs_state(st->pipe, entry->shader); break; case PIPE_SHADER_TESS_CTRL: + st->pipe->bind_tcs_state(st->pipe, NULL); st->pipe->delete_tcs_state(st->pipe, entry->shader); break; case PIPE_SHADER_TESS_EVAL: + st->pipe->bind_tes_state(st->pipe, NULL); st->pipe->delete_tes_state(st->pipe, entry->shader); break; case PIPE_SHADER_COMPUTE: + st->pipe->bind_compute_state(st->pipe, NULL); st->pipe->delete_compute_state(st->pipe, entry->shader); break; default: