diff options
author | Marek Olšák <[email protected]> | 2017-02-23 00:20:17 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-02-25 00:03:09 +0100 |
commit | 1a36bea44594d02bd96e2961f62f5d432c62d52a (patch) | |
tree | d6e0c62a6ec2dc41b52559400ec28f4d1eaaf7ec | |
parent | d17b8d08a3e51df7ff218adf54600b34fa015a4f (diff) |
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 <[email protected]>
-rw-r--r-- | src/mesa/state_tracker/st_atom_clip.c | 6 |
1 files 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 |