st/mesa: don't check st->vp in update_clip
authorMarek Olšák <marek.olsak@amd.com>
Wed, 22 Feb 2017 23:20:17 +0000 (00:20 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 24 Feb 2017 23:03:09 +0000 (00:03 +0100)
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 <brianp@vmware.com>
src/mesa/state_tracker/st_atom_clip.c

index 9d2870fa3f5724a7a45cc45a724bc2cc1cc52b19..0df7985c09d82f536553b7af628dd31a0c64778c 100644 (file)
@@ -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