summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-14 15:24:44 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-15 05:05:59 -0800
commit484858ae48fef039034cf43391883a432ac40c78 (patch)
tree384c5163e04744df26970cd9c1465bca132d7022 /src/gallium/drivers/r300/r300_state.c
parent4e309b5d64e9b0b6da4bd34772af5d949bd4d62f (diff)
r300-gallium: Fix scissors.
Don't use SCISSORS_OFFSET since we're DRI2, and don't forget to set scissors in clear.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index d02679c7c5..6ecd61e3a2 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -715,20 +715,12 @@ static void r300_set_scissor_state(struct pipe_context* pipe,
struct r300_context* r300 = r300_context(pipe);
draw_flush(r300->draw);
- uint32_t left, top, right, bottom;
-
- /* So, a bit of info. The scissors are offset by R300_SCISSORS_OFFSET in
- * both directions for all values, and can only be 13 bits wide. Why?
- * We may never know. */
- left = (state->minx + R300_SCISSORS_OFFSET) & 0x1fff;
- top = (state->miny + R300_SCISSORS_OFFSET) & 0x1fff;
- right = (state->maxx + R300_SCISSORS_OFFSET) & 0x1fff;
- bottom = (state->maxy + R300_SCISSORS_OFFSET) & 0x1fff;
-
- r300->scissor_state->scissor_top_left = (left << R300_SCISSORS_X_SHIFT) |
- (top << R300_SCISSORS_Y_SHIFT);
+ r300->scissor_state->scissor_top_left =
+ (state->minx << R300_SCISSORS_X_SHIFT) |
+ (state->miny << R300_SCISSORS_Y_SHIFT);
r300->scissor_state->scissor_bottom_right =
- (right << R300_SCISSORS_X_SHIFT) | (bottom << R300_SCISSORS_Y_SHIFT);
+ (state->maxx << R300_SCISSORS_X_SHIFT) |
+ (state->maxy << R300_SCISSORS_Y_SHIFT);
r300->dirty_state |= R300_NEW_SCISSOR;
}