radeon: fix scissors harder.
authorDave Airlie <airlied@redhat.com>
Fri, 28 Aug 2009 01:01:38 +0000 (11:01 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Aug 2009 01:02:32 +0000 (11:02 +1000)
this makes gnome-shell work on r300 for me

src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/radeon/radeon_ioctl.c

index 250b4358c9ccaf6aa0bcdd4dadfbbd60a23bc9ab..f56da9082a501dd9d92bc57553adb5125d321ecf 100644 (file)
@@ -1661,8 +1661,8 @@ void r200_vtbl_update_scissor( GLcontext *ctx )
    if (r200->radeon.state.scissor.enabled) {
       x1 = r200->radeon.state.scissor.rect.x1;
       y1 = r200->radeon.state.scissor.rect.y1;
-      x2 = r200->radeon.state.scissor.rect.x2 - 1;
-      y2 = r200->radeon.state.scissor.rect.y2 - 1;
+      x2 = r200->radeon.state.scissor.rect.x2;
+      y2 = r200->radeon.state.scissor.rect.y2;
    } else {
       rrb = radeon_get_colorbuffer(&r200->radeon);
       x1 = 0;
index 40e5e0ba2f72ce1bf814ad800ada6301cf6b32ec..e1047beb6e451e3125ceb8080c89075e7eb9de3d 100644 (file)
@@ -226,8 +226,8 @@ void r300_emit_scissor(GLcontext *ctx)
     if (r300->radeon.state.scissor.enabled) {
         x1 = r300->radeon.state.scissor.rect.x1;
         y1 = r300->radeon.state.scissor.rect.y1;
-        x2 = r300->radeon.state.scissor.rect.x2 - 1;
-        y2 = r300->radeon.state.scissor.rect.y2 - 1;
+        x2 = r300->radeon.state.scissor.rect.x2;
+        y2 = r300->radeon.state.scissor.rect.y2;
     } else {
         x1 = 0;
         y1 = 0;
index 1bda9cbe09c666cb73933a70a2129c30d82cd862..9ced62418bd5f96d5ccf5c929c89b22440de9f85 100644 (file)
@@ -127,8 +127,8 @@ static void radeonEmitScissor(r100ContextPtr rmesa)
         OUT_BATCH((rmesa->radeon.state.scissor.rect.y1 << 16) |
                   rmesa->radeon.state.scissor.rect.x1);
         OUT_BATCH(CP_PACKET0(RADEON_RE_WIDTH_HEIGHT, 0));
-        OUT_BATCH(((rmesa->radeon.state.scissor.rect.y2 - 1) << 16) |
-                  (rmesa->radeon.state.scissor.rect.x2 - 1));
+        OUT_BATCH(((rmesa->radeon.state.scissor.rect.y2) << 16) |
+                  (rmesa->radeon.state.scissor.rect.x2));
         END_BATCH();
     } else {
         BEGIN_BATCH(2);