summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_state.c
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2010-05-12 10:14:02 -0700
committerCorbin Simpson <MostAwesomeDude@gmail.com>2010-05-12 10:16:19 -0700
commit5f161261c70d680c6b227bbf84735348af0973c6 (patch)
tree14cd04ab53857f66c3b1485651120910a4132b60 /src/gallium/drivers/r300/r300_state.c
parent3bb1724f3796ad799a93c319e03eae48c0114f1e (diff)
r300g: Correct viewport setup for SW TCL.
glxgears now renders in the right place on-screen, although it is still rather...psychedelic.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r--src/gallium/drivers/r300/r300_state.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 399099785c..e7fc872662 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -395,13 +395,13 @@ static void r300_set_clip_state(struct pipe_context* pipe,
if (r300->screen->caps.has_tcl) {
memcpy(r300->clip_state.state, state, sizeof(struct pipe_clip_state));
r300->clip_state.size = 29;
+
+ r300->clip_state.dirty = TRUE;
} else {
draw_flush(r300->draw);
draw_set_clip_state(r300->draw, state);
r300->clip_state.size = 2;
}
-
- r300->clip_state.dirty = TRUE;
}
/* Create a new depth, stencil, and alpha state based on the CSO dsa state.
@@ -1098,6 +1098,13 @@ static void r300_set_viewport_state(struct pipe_context* pipe,
r300->viewport = *state;
+ if (r300->draw) {
+ draw_flush(r300->draw);
+ draw_set_viewport_state(r300->draw, state);
+ viewport->vte_control = R300_VTX_XY_FMT | R300_VTX_Z_FMT;
+ return;
+ }
+
/* Do the transform in HW. */
viewport->vte_control = R300_VTX_W0_FMT;