From: Ben Widawsky Date: Wed, 30 Jul 2014 18:39:06 +0000 (-0700) Subject: i965/clip: Removing scissor atom X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38e181bad283eb5dea207cf6a6b8b50efd13b5ed;p=mesa.git i965/clip: Removing scissor atom Now that we no longer use ctx->DrawBuffer->_Xmin and related fields to program the screen-space viewport extents, we don't depend on any scissoring state. So we can drop the +_NEW_SCISSOR dependency. On GEN8, a change in scissor state does not effect anything for the clipper/sf hardware state. The hardware will always do the right thing once the viewport extents are programmed. We can therefore remove the unecessary state emission. Ken originally spotted this. v2: Reword the commit message. Remove spurious hunk. Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/gen8_viewport_state.c b/src/mesa/drivers/dri/i965/gen8_viewport_state.c index 04a45300b4b..9c89532580c 100644 --- a/src/mesa/drivers/dri/i965/gen8_viewport_state.c +++ b/src/mesa/drivers/dri/i965/gen8_viewport_state.c @@ -100,7 +100,7 @@ gen8_upload_sf_clip_viewport(struct brw_context *brw) vp[10] = -gby; /* y-min */ vp[11] = gby; /* y-max */ - /* _NEW_SCISSOR | _NEW_VIEWPORT | _NEW_BUFFERS: Screen Space Viewport + /* _NEW_VIEWPORT | _NEW_BUFFERS: Screen Space Viewport * The hardware will take the intersection of the drawing rectangle, * scissor rectangle, and the viewport extents. We don't need to be * smart, and can therefore just program the viewport extents. @@ -130,7 +130,7 @@ gen8_upload_sf_clip_viewport(struct brw_context *brw) const struct brw_tracked_state gen8_sf_clip_viewport = { .dirty = { - .mesa = _NEW_BUFFERS | _NEW_SCISSOR | _NEW_VIEWPORT, + .mesa = _NEW_BUFFERS | _NEW_VIEWPORT, .brw = BRW_NEW_BATCH, .cache = 0, },