Mesa (gallium-no-rhw-position): util/blitter: Fix the viewport transformation for Z coordinates
MichaŠKról
michal at kemper.freedesktop.org
Tue Mar 2 09:28:32 UTC 2010
Module: Mesa
Branch: gallium-no-rhw-position
Commit: ff9ddf4d39be9e36d3e1dd9e10e889efa40dfb1e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff9ddf4d39be9e36d3e1dd9e10e889efa40dfb1e
Author: Marek Olšák <maraeo at gmail.com>
Date: Tue Mar 2 02:37:45 2010 +0100
util/blitter: Fix the viewport transformation for Z coordinates
When clearing buffers, the depth is specified in the range [0, 1]
and should be passed through blitter "as is".
---
src/gallium/auxiliary/util/u_blitter.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index f93c69d..0ba09d3 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -320,11 +320,11 @@ static void blitter_set_rectangle(struct blitter_context_priv *ctx,
/* viewport */
ctx->viewport.scale[0] = 0.5f * width;
ctx->viewport.scale[1] = 0.5f * height;
- ctx->viewport.scale[2] = 0.5f;
+ ctx->viewport.scale[2] = 1.0f;
ctx->viewport.scale[3] = 1.0f;
ctx->viewport.translate[0] = 0.5f * width;
ctx->viewport.translate[1] = 0.5f * height;
- ctx->viewport.translate[2] = 0.5f;
+ ctx->viewport.translate[2] = 0.0f;
ctx->viewport.translate[3] = 0.0f;
ctx->pipe->set_viewport_state(ctx->pipe, &ctx->viewport);
More information about the mesa-commit
mailing list