summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-04-03 12:42:26 -0600
committerBrian Paul <[email protected]>2008-04-03 12:42:26 -0600
commit4f67a3f7d3bdeaa8d16d877ce9b277c97bd2f6b4 (patch)
tree805b9df9e1a12f361d7f6799b5ad94418d1677ba
parent0bc2e2c9cd552e4187dd8a2250e350efcdc9aea1 (diff)
gallium: use identity viewport fix broken clear_with_quad() path
Since bypass_clipping is set and we're specifying quad vertexes in window coords, setup identity viewport.
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index ec8d3e10221..0c6f77bc82a 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -271,17 +271,15 @@ clear_with_quad(GLcontext *ctx,
#endif
#if !TEST_DRAW_PASSTHROUGH
- /* viewport state: viewport matching window dims */
+ /* viewport state: identity since we're drawing in window coords */
{
- const float width = ctx->DrawBuffer->Width;
- const float height = ctx->DrawBuffer->Height;
struct pipe_viewport_state vp;
- vp.scale[0] = 0.5 * width;
- vp.scale[1] = -0.5 * height;
+ vp.scale[0] = 1.0;
+ vp.scale[1] = 1.0;
vp.scale[2] = 1.0;
vp.scale[3] = 1.0;
- vp.translate[0] = 0.5 * width;
- vp.translate[1] = 0.5 * height;
+ vp.translate[0] = 0.0;
+ vp.translate[1] = 0.0;
vp.translate[2] = 0.0;
vp.translate[3] = 0.0;
cso_set_viewport(st->cso_context, &vp);