summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_state.c8
-rw-r--r--src/gallium/drivers/r300/r300_surface.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 27680a3863..c16cadd040 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -538,16 +538,16 @@ static void r300_set_scissor_state(struct pipe_context* pipe,
(state->minx << R300_SCISSORS_X_SHIFT) |
(state->miny << R300_SCISSORS_Y_SHIFT);
r300->scissor_state->scissor_bottom_right =
- (state->maxx << R300_SCISSORS_X_SHIFT) |
- (state->maxy << R300_SCISSORS_Y_SHIFT);
+ ((state->maxx - 1) << R300_SCISSORS_X_SHIFT) |
+ ((state->maxy - 1) << R300_SCISSORS_Y_SHIFT);
} else {
/* Offset of 1440 in non-R500 chipsets. */
r300->scissor_state->scissor_top_left =
((state->minx + 1440) << R300_SCISSORS_X_SHIFT) |
((state->miny + 1440) << R300_SCISSORS_Y_SHIFT);
r300->scissor_state->scissor_bottom_right =
- ((state->maxx + 1440) << R300_SCISSORS_X_SHIFT) |
- ((state->maxy + 1440) << R300_SCISSORS_Y_SHIFT);
+ (((state->maxx - 1) + 1440) << R300_SCISSORS_X_SHIFT) |
+ (((state->maxy - 1) + 1440) << R300_SCISSORS_Y_SHIFT);
}
r300->dirty_state |= R300_NEW_SCISSOR;
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index a093f83945..96e6e4a77d 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -58,13 +58,13 @@ static void r300_surface_setup(struct r300_context* r300,
OUT_CS_REG_SEQ(R300_SC_SCISSORS_TL, 2);
if (caps->is_r500) {
OUT_CS((x << R300_SCISSORS_X_SHIFT) | (y << R300_SCISSORS_Y_SHIFT));
- OUT_CS((w << R300_SCISSORS_X_SHIFT) | (h << R300_SCISSORS_Y_SHIFT));
+ OUT_CS(((w - 1) << R300_SCISSORS_X_SHIFT) | ((h - 1) << R300_SCISSORS_Y_SHIFT));
} else {
/* Non-R500 chipsets have an offset of 1440 in their scissors. */
OUT_CS(((x + 1440) << R300_SCISSORS_X_SHIFT) |
((y + 1440) << R300_SCISSORS_Y_SHIFT));
- OUT_CS(((w + 1440) << R300_SCISSORS_X_SHIFT) |
- ((h + 1440) << R300_SCISSORS_Y_SHIFT));
+ OUT_CS((((w - 1) + 1440) << R300_SCISSORS_X_SHIFT) |
+ (((h - 1) + 1440) << R300_SCISSORS_Y_SHIFT));
}
/* Flush colorbuffer and blend caches. */