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 <brianp@vmware.com>
This commit is contained in:
Marek Olšák 2017-02-23 00:20:17 +01:00
parent d17b8d08a3
commit 1a36bea445
1 changed files with 2 additions and 4 deletions

View 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