[Mesa-dev] [PATCH 35/40] i965: Consider all scissor rectangles in noop_scissor
Ian Romanick
idr at freedesktop.org
Fri Jan 10 17:40:36 PST 2014
From: Ian Romanick <ian.d.romanick at intel.com>
v2: Use '& 1' instead of '& i'. Noticed by Ken.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/dri/i965/brw_clear.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index 58fd612..19bde0f 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -83,10 +83,16 @@ debug_mask(const char *name, GLbitfield mask)
static bool
noop_scissor(struct gl_context *ctx, struct gl_framebuffer *fb)
{
- return ctx->Scissor.ScissorArray[0].X <= 0 &&
- ctx->Scissor.ScissorArray[0].Y <= 0 &&
- ctx->Scissor.ScissorArray[0].Width >= fb->Width &&
- ctx->Scissor.ScissorArray[0].Height >= fb->Height;
+ for (unsigned i = 0; i < ctx->Const.MaxViewports; i++) {
+ if (((ctx->Scissor.EnableFlags >> i) & 1) &&
+ (ctx->Scissor.ScissorArray[i].X > 0 ||
+ ctx->Scissor.ScissorArray[i].Y > 0 ||
+ ctx->Scissor.ScissorArray[i].Width < fb->Width ||
+ ctx->Scissor.ScissorArray[i].Height < fb->Height))
+ return false;
+ }
+
+ return true;
}
/**
--
1.8.1.4
More information about the mesa-dev
mailing list