Mesa (gallium-0.2): nv20: adjust initial hw context

Pekka Paalanen pq at kemper.freedesktop.org
Mon Jan 26 19:35:52 UTC 2009


Module: Mesa
Branch: gallium-0.2
Commit: 94ff37f0dc78a7f305f309ea8d5e111508c5b9f2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=94ff37f0dc78a7f305f309ea8d5e111508c5b9f2

Author: Pekka Paalanen <pq at iki.fi>
Date:   Mon Jan 26 21:10:14 2009 +0200

nv20: adjust initial hw context

VIEWPORT_SCALE0 seems to do with translation and the sane
value for x and y is zero.
VIEWPORT_SCALE1 is still a mystery.

Signed-off-by: Pekka Paalanen <pq at iki.fi>

---

 src/gallium/drivers/nv20/nv20_context.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/nv20/nv20_context.c b/src/gallium/drivers/nv20/nv20_context.c
index 9a17f4a..c8fb690 100644
--- a/src/gallium/drivers/nv20/nv20_context.c
+++ b/src/gallium/drivers/nv20/nv20_context.c
@@ -361,16 +361,16 @@ static void nv20_init_hwctx(struct nv20_context *nv20)
 	OUT_RINGf  (16777216.0); /* bpp dependant? */
 
 	BEGIN_RING(kelvin, NV20TCL_VIEWPORT_SCALE0_X, 4);
-	OUT_RINGf  (-2048.0);
-	OUT_RINGf  (-2048.0);
+	OUT_RINGf  (0.0); /* x-offset */
+	OUT_RINGf  (0.0); /* y-offset */
 	OUT_RINGf  (16777215.0 * 0.5);
 	OUT_RING  (0);
 
 	BEGIN_RING(kelvin, NV20TCL_VIEWPORT_SCALE1_X, 4);
-	OUT_RINGf  (-2048.0);
-	OUT_RINGf  (-2048.0);
+	OUT_RINGf  (0.0); /* no effect? */
+	OUT_RINGf  (0.0); /* no effect? */
 	OUT_RINGf  (16777215.0 * 0.5);
-	OUT_RING  (0);
+	OUT_RINGf  (65535.0);
 
 	FIRE_RING (NULL);
 }




More information about the mesa-commit mailing list