diff options
author | Cooper Yuan <cooperyuan@gmail.com> | 2009-08-27 17:46:59 +0800 |
---|---|---|
committer | Cooper Yuan <cooperyuan@gmail.com> | 2009-08-27 17:46:59 +0800 |
commit | ba87cbf2be04d9d14d7e0b6d40508edadd4705e9 (patch) | |
tree | 4e31b35cf01d3ed09ee5a4a6d9c33ca27da2a0e5 /src/gallium/drivers/r300/r300_state.c | |
parent | 82ff3190de3cd6cf4a514bac00ae02597abfb963 (diff) |
r300g: Correct scissor setting, subtract 1 from window's width and height
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 8 |
1 files changed, 4 insertions, 4 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; |