summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-02-27 10:15:42 -0800
committerCorbin Simpson <[email protected]>2009-02-27 10:19:22 -0800
commitc28298855bf5d5ef790d28bac2e77700625fa69a (patch)
tree23141710814ef80c1c7591db3d9ae5e0f25ae167 /src/gallium/drivers/r300/r300_emit.c
parent4ef8c047ea4cdbf9bc31920d58205620b857fe3c (diff)
r300-gallium: Add RS block setup.
This is still icky, and only compile-tested.
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 960f45f651f..86fa46df42c 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -208,6 +208,39 @@ void r300_emit_rs_state(struct r300_context* r300, struct r300_rs_state* rs)
END_CS;
}
+void r300_emit_rs_block_state(struct r300_context* r300,
+ struct r300_rs_block* rs)
+{
+ struct r300_screen* r300screen =
+ (struct r300_screen*)r300->context.screen;
+ CS_LOCALS(r300);
+ int i;
+
+ BEGIN_CS(0);
+ if (r300screen->caps->is_r500) {
+ OUT_CS_REG_SEQ(R500_RS_IP_0, 8);
+ } else {
+ OUT_CS_REG_SEQ(R300_RS_IP_0, 8);
+ }
+ for (i = 0; i < 8; i++) {
+ OUT_CS(rs->ip[i]);
+ }
+
+ OUT_CS_REG_SEQ(R300_RS_COUNT, 2);
+ OUT_CS(rs->count);
+ OUT_CS(rs->inst_count);
+
+ if (r300screen->caps->is_r500) {
+ OUT_CS_REG_SEQ(R500_RS_INST_0, 8);
+ } else {
+ OUT_CS_REG_SEQ(R300_RS_INST_0, 8);
+ }
+ for (i = 0; i < 8; i++) {
+ OUT_CS(rs->inst[i]);
+ }
+ END_CS;
+}
+
void r300_emit_scissor_state(struct r300_context* r300,
struct r300_scissor_state* scissor)
{