summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-02-14 15:24:44 -0800
committerCorbin Simpson <[email protected]>2009-02-15 05:05:59 -0800
commit484858ae48fef039034cf43391883a432ac40c78 (patch)
tree384c5163e04744df26970cd9c1465bca132d7022 /src/gallium/drivers/r300/r300_emit.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_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index c6464e3eb63..cfc70362ccb 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -208,6 +208,17 @@ void r300_emit_rs_state(struct r300_context* r300, struct r300_rs_state* rs)
END_CS;
}
+void r300_emit_scissor_state(struct r300_context* r300,
+ struct r300_scissor_state* scissor)
+{
+ CS_LOCALS(r300);
+ BEGIN_CS(3);
+ OUT_CS_REG_SEQ(R300_SC_SCISSORS_TL, 2);
+ OUT_CS(scissor->scissor_top_left);
+ OUT_CS(scissor->scissor_bottom_right);
+}
+
+/* Emit all dirty state. */
static void r300_emit_dirty_state(struct r300_context* r300)
{
struct r300_screen* r300screen =
@@ -247,10 +258,7 @@ static void r300_emit_dirty_state(struct r300_context* r300)
}
if (r300->dirty_state & R300_NEW_SCISSOR) {
- struct r300_scissor_state* scissor = r300->scissor_state;
- /* XXX next two are contiguous regs */
- OUT_CS_REG(R300_SC_SCISSORS_TL, scissor->scissor_top_left);
- OUT_CS_REG(R300_SC_SCISSORS_BR, scissor->scissor_bottom_right);
+ r300_emit_scissor_state(r300, r300->scissor_state);
}
r300->dirty_state = 0;