From 1a36bea44594d02bd96e2961f62f5d432c62d52a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 23 Feb 2017 00:20:17 +0100 Subject: [PATCH] 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 --- src/mesa/state_tracker/st_atom_clip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -- 2.30.2