diff options
author | Marek Olšák <[email protected]> | 2019-12-09 22:35:57 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-12-09 22:41:41 -0500 |
commit | 38e9eb9561d49f9798b03627276d0d4ea4c5d7ff (patch) | |
tree | 720b0513bda92fe3ed6ad4b07f3df156c12c6e33 | |
parent | 41118246c6069db3a4443fb6b1ab872b6af1b2b7 (diff) |
st/mesa: release the draw shader properly to fix driver crashes (iris)
Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 84fd8e320af..a9ff68c1f50 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -218,7 +218,11 @@ static void delete_variant(struct st_context *st, struct st_variant *v, GLenum target) { if (v->driver_shader) { - if (st->has_shareable_shaders || v->st == st) { + if (target == GL_VERTEX_PROGRAM_ARB && + ((struct st_common_variant*)v)->key.is_draw_shader) { + /* Draw shader. */ + draw_delete_vertex_shader(st->draw, v->driver_shader); + } else if (st->has_shareable_shaders || v->st == st) { /* The shader's context matches the calling context, or we * don't care. */ |