radeon: emit scissor when using cs path
authorJerome Glisse <glisse@freedesktop.org>
Sun, 12 Apr 2009 11:11:06 +0000 (13:11 +0200)
committerJerome Glisse <glisse@freedesktop.org>
Sun, 12 Apr 2009 11:11:06 +0000 (13:11 +0200)
src/mesa/drivers/dri/radeon/radeon_state_init.c

index 174a7e1862f0b96d88313e5169c0f7cd84cbe103..c00f59f7ad2e4eedd7dea5402308feb4b894d576 100644 (file)
@@ -448,6 +448,17 @@ static void ctx_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
    // }
 
    END_BATCH();
+   BEGIN_BATCH_NO_AUTOSTATE(4);
+   OUT_BATCH(CP_PACKET0(RADEON_RE_TOP_LEFT, 0));
+   OUT_BATCH(0);
+   OUT_BATCH(CP_PACKET0(RADEON_RE_WIDTH_HEIGHT, 0));
+   if (rrb) {
+       OUT_BATCH(((rrb->width - 1) << RADEON_RE_WIDTH_SHIFT) |
+                 ((rrb->height - 1) << RADEON_RE_HEIGHT_SHIFT));
+   } else {
+       OUT_BATCH(0);
+   }
+   END_BATCH();
 }
 
 static void cube_emit(GLcontext *ctx, struct radeon_state_atom *atom)