st/mesa: fix a crash due to passing a draw vertex shader into the driver

Fixes: bc99b22a30
Closes: #2754

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4527>
This commit is contained in:
Marek Olšák 2020-04-11 18:06:27 -04:00 committed by Marge Bot
parent 7a794b1de4
commit 80797edd71

View file

@ -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;