summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-04-06 23:17:33 -0700
committerCorbin Simpson <[email protected]>2009-04-06 23:18:56 -0700
commitffbf3f4952fa9e7c2971a73d9540ed977fdc6c9a (patch)
tree619d5a98b67f267636172a97759629538c4342eb /src/gallium/drivers/r300/r300_state.c
parent3630da9916a4f24a03d3a63420690f8016a9b72a (diff)
r300-gallium: Properly setup HW/SW TCL controls.
This keeps non-TCL chipsets from locking up, and also fully unbreaks RADEON_NO_TCL rendering.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 095df04630f..2a77fd17390 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -338,11 +338,17 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
{
struct r300_rs_state* rs = CALLOC_STRUCT(r300_rs_state);
- /* XXX endian control */
- if (r300_screen(pipe->screen)->caps->has_tcl) {
- rs->vap_control_status = 0;
- } else {
+ /* Copy rasterizer state for Draw. */
+ rs->rs = *state;
+
+ /* If bypassing TCL, or if no TCL engine is present, turn off the HW TCL.
+ * Else, enable HW TCL and force Draw's TCL off. */
+ if (state->bypass_vs_clip_and_viewport ||
+ !r300_screen(pipe->screen)->caps->has_tcl) {
rs->vap_control_status = R300_VAP_TCL_BYPASS;
+ } else {
+ rs->rs.bypass_vs_clip_and_viewport = TRUE;
+ rs->vap_control_status = 0;
}
rs->point_size = pack_float_16_6x(state->point_size) |
@@ -406,13 +412,6 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
rs->color_control = R300_SHADE_MODEL_SMOOTH;
}
- rs->rs = *state;
-
- /* If using HW TCL, tell Draw to not do its magic. */
- if (r300_screen(pipe->screen)->caps->has_tcl) {
- rs->rs.bypass_vs_clip_and_viewport = TRUE;
- }
-
return (void*)rs;
}