summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2014-01-08 12:14:49 -0800
committerIan Romanick <ian.d.romanick@intel.com>2014-01-20 11:32:05 -0800
commitd3ee8ba3469a6c143f5817e35a5200e9c836de32 (patch)
tree9ee1b23e3ccdf40590cb4b13a20ed003f7ca4b9e /src/mesa
parentbdff9a6e47c42c0ba8cec2d8b5c5438c0068f874 (diff)
i965: Consider all viewports before enabling guardband clipping
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_clip_state.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index 3499e371ef9..ed7afd7d754 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -96,11 +96,15 @@ upload_clip_state(struct brw_context *brw)
dw2 |= (ctx->Transform.ClipPlanesEnabled <<
GEN6_USER_CLIP_CLIP_DISTANCES_SHIFT);
- if (ctx->ViewportArray[0].X == 0 &&
- ctx->ViewportArray[0].Y == 0 &&
- ctx->ViewportArray[0].Width == (float) fb->Width &&
- ctx->ViewportArray[0].Height == (float) fb->Height) {
- dw2 |= GEN6_CLIP_GB_TEST;
+ dw2 |= GEN6_CLIP_GB_TEST;
+ for (unsigned i = 0; i < ctx->Const.MaxViewports; i++) {
+ if (ctx->ViewportArray[i].X != 0 ||
+ ctx->ViewportArray[i].Y != 0 ||
+ ctx->ViewportArray[i].Width != (float) fb->Width ||
+ ctx->ViewportArray[i].Height != (float) fb->Height) {
+ dw2 &= ~GEN6_CLIP_GB_TEST;
+ break;
+ }
}
/* BRW_NEW_RASTERIZER_DISCARD */