diff --git a/.pick_status.json b/.pick_status.json index cc164fc2659..b88e328949e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1282,7 +1282,7 @@ "description": "mesa/st: unbind shader state before deleting it", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 7f60e7e68e1..4354b27f3f9 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -396,21 +396,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: