Commit 4822cc97 authored by Tapani Pälli's avatar Tapani Pälli
Browse files

mesa/st: unbind shader state before deleting it


Signed-off-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Reviewed-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <mesa/mesa!4386>
parent 82597c46
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment