summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-05-26 23:47:27 +0200
committerMarek Olšák <maraeo@gmail.com>2010-05-27 00:08:42 +0200
commit76034aaf655134c71e1ec619085c46251d037720 (patch)
tree59b61e35069a07de4b1e5bfcc3d215b9dbed5ddd /src/gallium/drivers/r300/r300_state.c
parent1345c5bf94dd848bdb601061c7ae654dadc6e542 (diff)
r300g: decouple drawing code and two-sided stencil refvalue fallback
It's now more separate from the rest of the driver and it can be disabled by commenting out just 1 line. Well, I couldn't make the previous version work with SW TCL reliably, that's the reason of this little rework.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 46f1653b5b..80346e0c79 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -474,7 +474,7 @@ static void*
if (caps->is_r500) {
dsa->z_buffer_control |= R500_STENCIL_REFMASK_FRONT_BACK;
} else {
- dsa->stencil_ref_bf_fallback =
+ dsa->two_sided_stencil_ref =
(state->stencil[0].valuemask != state->stencil[1].valuemask ||
state->stencil[0].writemask != state->stencil[1].writemask);
}
@@ -497,20 +497,6 @@ static void*
return (void*)dsa;
}
-static void r300_update_stencil_ref_fallback_status(struct r300_context *r300)
-{
- struct r300_dsa_state *dsa = (struct r300_dsa_state*)r300->dsa_state.state;
-
- if (r300->screen->caps.is_r500) {
- return;
- }
-
- r300->stencil_ref_bf_fallback =
- dsa->stencil_ref_bf_fallback ||
- (dsa->two_sided &&
- r300->stencil_ref.ref_value[0] != r300->stencil_ref.ref_value[1]);
-}
-
/* Bind DSA state. */
static void r300_bind_dsa_state(struct pipe_context* pipe,
void* state)
@@ -522,8 +508,6 @@ static void r300_bind_dsa_state(struct pipe_context* pipe,
}
UPDATE_STATE(state, r300->dsa_state);
-
- r300_update_stencil_ref_fallback_status(r300);
}
/* Free DSA state. */
@@ -540,8 +524,6 @@ static void r300_set_stencil_ref(struct pipe_context* pipe,
r300->stencil_ref = *sr;
r300->dsa_state.dirty = TRUE;
-
- r300_update_stencil_ref_fallback_status(r300);
}
/* This switcheroo is needed just because of goddamned MACRO_SWITCH. */