summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_pixel_draw.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-07-14 14:30:12 -0700
committerEric Anholt <eric@anholt.net>2009-07-14 15:14:52 -0700
commitb677c40abbed358984491b8ad3fcecf4742b2823 (patch)
tree180033820fc8f5f86cce50a92d0184bf240e94a9 /src/mesa/drivers/dri/intel/intel_pixel_draw.c
parente5f63c403b767f9974e8eb5d412c012b8a69287f (diff)
intel: Set DepthRange in the metaops using RasterPos[2].
RasterPos[2] is already sent through the window transform, which includes DepthRange handling. So make DepthRange for the metaops a noop. Fixes a failure in oglconform depthrange.c
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_pixel_draw.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_draw.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
index ddcc661e00..dfc9e1539f 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
@@ -45,6 +45,7 @@
#include "main/depth.h"
#include "main/hash.h"
#include "main/blend.h"
+#include "main/viewport.h"
#include "glapi/dispatch.h"
#include "swrast/swrast.h"
@@ -128,7 +129,7 @@ intel_texture_drawpixels(GLcontext * ctx,
}
_mesa_PushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT |
- GL_CURRENT_BIT);
+ GL_CURRENT_BIT | GL_VIEWPORT_BIT);
_mesa_PushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
/* XXX: pixel store stuff */
@@ -154,6 +155,9 @@ intel_texture_drawpixels(GLcontext * ctx,
/* convert rasterpos Z from [0,1] to NDC coord in [-1,1] */
z = -1.0 + 2.0 * ctx->Current.RasterPos[2];
+ /* RasterPos[2] already takes into account the DepthRange mapping. */
+ _mesa_DepthRange(0.0, 1.0);
+
/* Create the vertex buffer based on the current raster pos. The x and y
* we're handed are ctx->Current.RasterPos[0,1] rounded to integers.
* We also apply the depth. However, the W component is already multiplied