mesa: Branch 'master' - 2 commits

Patrice Mandin pmandin at kemper.freedesktop.org
Sat Feb 3 12:23:24 UTC 2007


 src/mesa/drivers/dri/nouveau/nv10_state.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

New commits:
diff-tree de24b01b05d4c7402c06851dd7dbbb5854b1ff41 (from 1c25561e30ada8036d00aa84344377aa2a4f791a)
Author: Patrice Mandin <pmandin at caramail.com>
Date:   Sat Feb 3 13:22:42 2007 +0100

    nouveau: fix viewport clipping initialization

diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c
index 055f538..88c1d7d 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state.c
@@ -612,10 +612,13 @@ static void nv10WindowMoved(nouveauConte
         OUT_RING_CACHE((h << 16) | y);
 
 	/* something to do with clears, possibly doesn't belong here */
+	BEGIN_RING_SIZE(NvSub3D, 0x02b4, 1);
+	OUT_RING(0);
+
 	BEGIN_RING_CACHE(NvSub3D,
 	      NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(0), 2);
-        OUT_RING_CACHE(((w+x) << 16) | x | 0x800);
-        OUT_RING_CACHE(((h+y) << 16) | y | 0x800);
+        OUT_RING_CACHE(((w+x-1) << 16) | x | 0x08000800);
+        OUT_RING_CACHE(((h+y-1) << 16) | y | 0x08000800);
 	for (i=1; i<7; i++) {
 		BEGIN_RING_CACHE(NvSub3D,
 		      NV10_TCL_PRIMITIVE_3D_VIEWPORT_CLIP_HORIZ(i), 1);
@@ -651,14 +654,12 @@ static GLboolean nv10InitCard(nouveauCon
 	OUT_RING(NvDmaFB);	/* 194 dma_in_memory2 */
 	OUT_RING(NvDmaFB);	/* 198 dma_in_memory3 */
 
-	BEGIN_RING_SIZE(NvSub3D, 0x02b4, 1);
-	OUT_RING(0);
 	BEGIN_RING_SIZE(NvSub3D, 0x0290, 1);
 	OUT_RING(0x00100001);
 	BEGIN_RING_SIZE(NvSub3D, 0x03f4, 1);
 	OUT_RING(0);
 
-	return GL_FALSE;
+	return GL_TRUE;
 }
 
 /* Update buffer offset/pitch/format */
diff-tree 1c25561e30ada8036d00aa84344377aa2a4f791a (from 2a441c488f4bcf11fe032ea7ba448bbfb7449c66)
Author: Patrice Mandin <pmandin at caramail.com>
Date:   Sat Feb 3 13:20:16 2007 +0100

    nouveau: use color pitch as depth pitch if depth disabled

diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c
index f6e47b7..055f538 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state.c
@@ -667,7 +667,7 @@ static GLboolean nv10BindBuffers(nouveau
 				 nouveau_renderbuffer *depth)
 {
 	GLuint x, y, w, h;
-	GLuint pitch, format;
+	GLuint pitch, format, depth_pitch;
 
 	w = color[0]->mesa.Width;
 	h = color[0]->mesa.Height;
@@ -680,10 +680,8 @@ static GLboolean nv10BindBuffers(nouveau
         BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_VIEWPORT_HORIZ, 6);
         OUT_RING_CACHE((w << 16) | x);
         OUT_RING_CACHE((h << 16) | y);
-	pitch = color[0]->pitch;
-	if (depth) {
-		pitch |= (depth->pitch << 16);
-	}
+	depth_pitch = (depth ? depth->pitch : color[0]->pitch);
+	pitch = (depth_pitch<<16) | color[0]->pitch;
 	format = 0x108;
 	if (color[0]->mesa._ActualFormat != GL_RGBA8) {
 		format = 0x103; /* R5G6B5 color buffer */



More information about the mesa-commit mailing list