summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-01-10 11:49:25 -0800
committerCorbin Simpson <[email protected]>2010-01-10 11:49:25 -0800
commit8a2c961798b4ab1f1095f14d814242422020d4f9 (patch)
treeac6fbae457a9559b7ae30715f7e1cf34725b0719 /src/gallium/drivers/r300/r300_emit.c
parent07ea7e6c80ef2bcb69ab12af69d27f7e118bc15a (diff)
r300g: Atomize ZTOP.
Also do state-change checks. ZTOP's too important to not check.
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 852ac988638..27fb9aa9ba8 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -113,7 +113,7 @@ void r300_emit_dsa_state(struct r300_context* r300, void* state)
struct r300_screen* r300screen = r300_screen(r300->context.screen);
CS_LOCALS(r300);
- BEGIN_CS(r300screen->caps->is_r500 ? 10 : 8);
+ BEGIN_CS(r300screen->caps->is_r500 ? 8 : 6);
OUT_CS_REG(R300_FG_ALPHA_FUNC, dsa->alpha_function);
/* not needed since we use the 8bit alpha ref */
@@ -132,7 +132,6 @@ void r300_emit_dsa_state(struct r300_context* r300, void* state)
}
OUT_CS(dsa->stencil_ref_mask);
- OUT_CS_REG(R300_ZB_ZTOP, r300->ztop_state.z_buffer_top);
/* XXX it seems r3xx doesn't support STENCILREFMASK_BF */
if (r300screen->caps->is_r500) {
@@ -956,6 +955,16 @@ void r300_emit_texture_count(struct r300_context* r300)
}
+void r300_emit_ztop_state(struct r300_context* r300, void* state)
+{
+ struct r300_ztop_state* ztop = (struct r300_ztop_state*)state;
+ CS_LOCALS(r300);
+
+ BEGIN_CS(2);
+ OUT_CS_REG(R300_ZB_ZTOP, ztop->z_buffer_top);
+ END_CS;
+}
+
void r300_flush_textures(struct r300_context* r300)
{
CS_LOCALS(r300);