summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 442af70e143..2bc2b79c021 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -302,6 +302,25 @@ static void
r300->framebuffer_state = *state;
r300->dirty_state |= R300_NEW_FRAMEBUFFERS;
+
+ if (r300_screen(r300->context.screen)->caps->is_r500) {
+ r300->scissor_state->no_scissor_top_left =
+ (0 << R300_SCISSORS_X_SHIFT) |
+ (0 << R300_SCISSORS_Y_SHIFT);
+ r300->scissor_state->no_scissor_bottom_right =
+ ((state->width - 1) << R300_SCISSORS_X_SHIFT) |
+ ((state->height - 1) << R300_SCISSORS_Y_SHIFT);
+ } else {
+ /* Offset of 1440 in non-R500 chipsets. */
+ r300->scissor_state->no_scissor_top_left =
+ ((0 + 1440) << R300_SCISSORS_X_SHIFT) |
+ ((0 + 1440) << R300_SCISSORS_Y_SHIFT);
+ r300->scissor_state->no_scissor_bottom_right =
+ (((state->width - 1) + 1440) << R300_SCISSORS_X_SHIFT) |
+ (((state->height - 1) + 1440) << R300_SCISSORS_Y_SHIFT);
+ }
+
+ r300->dirty_state |= R300_NEW_SCISSOR;
}
/* Create fragment shader state. */