Mesa (mesa_7_6_branch): radeon: Fix scissors for r600 KMS.

Pauli Nieminen suokko at kemper.freedesktop.org
Thu Sep 24 17:38:26 UTC 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 1d2dca194cebe6e25735b6820f85b8d1231aae63
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d2dca194cebe6e25735b6820f85b8d1231aae63

Author: Pauli Nieminen <suokkos at gmail.com>
Date:   Thu Sep 24 19:58:09 2009 +0300

radeon: Fix scissors for r600 KMS.

Radeon generic scissors code had problem that some of code was using exclusive
and some inclusive bottom right corner. Only r600 driver is using exclusive
coordinate so changed generic code to pass inclusive coordinate and r600 driver
changes BR coordinate to be exclusive.

---

 src/mesa/drivers/dri/r600/r700_state.c      |    5 +++--
 src/mesa/drivers/dri/radeon/radeon_common.c |    8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index 8571563..124469b 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -1269,10 +1269,11 @@ void r700SetScissor(context_t *context) //---------------
 		return;
 	}
 	if (context->radeon.state.scissor.enabled) {
+		/* r600 has exclusive scissors */
 		x1 = context->radeon.state.scissor.rect.x1;
 		y1 = context->radeon.state.scissor.rect.y1;
-		x2 = context->radeon.state.scissor.rect.x2;
-		y2 = context->radeon.state.scissor.rect.y2;
+		x2 = context->radeon.state.scissor.rect.x2 + 1;
+		y2 = context->radeon.state.scissor.rect.y2 + 1;
 	} else {
 		if (context->radeon.radeonScreen->driScreen->dri2.enabled) {
 			x1 = 0;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index a4c7b40..9817ff8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -232,13 +232,13 @@ void radeonUpdateScissor( GLcontext *ctx )
 
 	   __DRIdrawablePrivate *dPriv = radeon_get_drawable(rmesa);
 	   x1 += dPriv->x;
-	   x2 += dPriv->x + 1;
+	   x2 += dPriv->x;
 	   min_x += dPriv->x;
-	   max_x += dPriv->x + 1;
+	   max_x += dPriv->x;
 	   y1 += dPriv->y;
-	   y2 += dPriv->y + 1;
+	   y2 += dPriv->y;
 	   min_y += dPriv->y;
-	   max_y += dPriv->y + 1;
+	   max_y += dPriv->y;
 	}
 
 	rmesa->state.scissor.rect.x1 = CLAMP(x1,  min_x, max_x);




More information about the mesa-commit mailing list