From: Marek Olšák Date: Sat, 11 Apr 2020 22:06:27 +0000 (-0400) Subject: st/mesa: fix a crash due to passing a draw vertex shader into the driver X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80797edd7193409d0109d4d3378dd1b8d2597f80;p=mesa.git 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: --- 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;