summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-17 11:24:06 -0600
committerBrian <[email protected]>2007-10-17 11:24:06 -0600
commit2dd27cfdd981b3b2c973066082b1168c4cb6f42c (patch)
treec353d6276ef9adf64e3cc261f044135ff674ac3f /src/mesa
parent4f23468bd0d14b8ed687a641003d587b91ad39a7 (diff)
Fix viewport Z scale/bias to get the right Z values from drawing the quad.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c6
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 4f269ed3f7a..c0ea1a4bf6c 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -326,7 +326,7 @@ clear_with_quad(GLcontext *ctx,
pipe->bind_depth_stencil_state(pipe, cso->data);
}
- /* setup state: nothing */
+ /* rasterizer state: nothing */
{
struct pipe_rasterizer_state raster;
const struct cso_rasterizer *cso;
@@ -367,11 +367,11 @@ clear_with_quad(GLcontext *ctx,
struct pipe_viewport_state vp;
vp.scale[0] = 0.5 * width;
vp.scale[1] = -0.5 * height;
- vp.scale[2] = 0.5;
+ vp.scale[2] = 1.0;
vp.scale[3] = 1.0;
vp.translate[0] = 0.5 * width;
vp.translate[1] = 0.5 * height;
- vp.translate[2] = 0.5;
+ vp.translate[2] = 0.0;
vp.translate[3] = 0.0;
pipe->set_viewport_state(pipe, &vp);
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 97d4f41ed9d..9031ef46dfe 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -570,11 +570,11 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
struct pipe_viewport_state vp;
vp.scale[0] = 0.5 * width;
vp.scale[1] = -0.5 * height;
- vp.scale[2] = 0.5;
+ vp.scale[2] = 1.0;
vp.scale[3] = 1.0;
vp.translate[0] = 0.5 * width;
vp.translate[1] = 0.5 * height;
- vp.translate[2] = 0.5;
+ vp.translate[2] = 0.0;
vp.translate[3] = 0.0;
pipe->set_viewport_state(pipe, &vp);
}