From: Marek Olšák Date: Wed, 22 Feb 2017 23:20:17 +0000 (+0100) Subject: st/mesa: don't check st->vp in update_clip X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a36bea44594d02bd96e2961f62f5d432c62d52a;p=mesa.git st/mesa: don't check st->vp in update_clip The clip state is updated before VS, so it can be NULL for the first draw call. Just remove the unnecessary dependency on st->vp. Reviewed-by: Brian Paul --- diff --git a/src/mesa/state_tracker/st_atom_clip.c b/src/mesa/state_tracker/st_atom_clip.c index 9d2870fa3f5..0df7985c09d 100644 --- a/src/mesa/state_tracker/st_atom_clip.c +++ b/src/mesa/state_tracker/st_atom_clip.c @@ -51,10 +51,8 @@ static void update_clip( struct st_context *st ) /* if we have a vertex shader that writes clip vertex we need to pass the pre-projection transformed coordinates into the driver. */ - if (st->vp) { - if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]) - use_eye = TRUE; - } + if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]) + use_eye = TRUE; /* _ClipUserPlane = _NEW_TRANSFORM | _NEW_PROJECTION * EyeUserPlane = _NEW_TRANSFORM