From 80797edd7193409d0109d4d3378dd1b8d2597f80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 11 Apr 2020 18:06:27 -0400 Subject: [PATCH] st/mesa: fix a crash due to passing a draw vertex shader into the driver Fixes: bc99b22a305be5e5a5f Closes: #2754 Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/state_tracker/st_atom_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index fde2eb55f62..e09be71f59c 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -187,7 +187,8 @@ st_update_vp( struct st_context *st ) if (st->shader_has_one_variant[MESA_SHADER_VERTEX] && stvp->variants && - st_common_variant(stvp->variants)->key.passthrough_edgeflags == st->vertdata_edgeflags) { + st_common_variant(stvp->variants)->key.passthrough_edgeflags == st->vertdata_edgeflags && + !st_common_variant(stvp->variants)->key.is_draw_shader) { st->vp_variant = st_common_variant(stvp->variants); } else { struct st_common_variant_key key; -- 2.30.2