aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state_derived.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_state_derived.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_state_derived.c')
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 0f6ff02d9ce..a4029fca49f 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -508,7 +508,9 @@ static boolean r300_dsa_alpha_test_enabled(struct r300_dsa_state* dsa)
static void r300_update_ztop(struct r300_context* r300)
{
- uint32_t ztop = r300->ztop_state.z_buffer_top;
+ struct r300_ztop_state* ztop_state =
+ (struct r300_ztop_state*)r300->ztop_state.state;
+ uint32_t ztop = ztop_state->z_buffer_top;
/* This is important enough that I felt it warranted a comment.
*
@@ -546,8 +548,9 @@ static void r300_update_ztop(struct r300_context* r300)
ztop = R300_ZTOP_ENABLE;
}
- if (r300->ztop_state.z_buffer_top != ztop) {
- r300->ztop_state.z_buffer_top = ztop;
+ if (ztop_state->z_buffer_top != ztop) {
+ ztop_state->z_buffer_top = ztop;
+ r300->ztop_state.dirty = TRUE;
}
}