The _Xmin/_Xmax/_Ymin/_Ymax values need to be guarded by _NEW_SCISSOR.
Fixes Piglit's scissor-many, and rendering in GNOME Shell.
Hopefully fixes similar issues with Unity and ChromeOS.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75879
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: James Ausmus <james.ausmus@intel.com>
Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
vp[10] = -gby; /* y-min */
vp[11] = gby; /* y-max */
- /* Screen Space Viewport */
+ /* _NEW_SCISSOR | _NEW_VIEWPORT | _NEW_BUFFERS: Screen Space Viewport */
if (render_to_fbo) {
vp[12] = ctx->DrawBuffer->_Xmin;
vp[13] = ctx->DrawBuffer->_Xmax - 1;
const struct brw_tracked_state gen8_sf_clip_viewport = {
.dirty = {
- .mesa = _NEW_VIEWPORT | _NEW_BUFFERS,
+ .mesa = _NEW_BUFFERS | _NEW_SCISSOR | _NEW_VIEWPORT,
.brw = BRW_NEW_BATCH,
.cache = 0,
},