Adam K Kirchhoff wrote:
Markus Amsler
 Thu, 10 Apr 2008 18:10:53 -0700

Adam K Kirchhoff wrote:
Before I open up a bug report, I was wondering if anyone wanted to
comment on this problem.  I was recently doing some testing of r300 vs.
fgrlx for one of the compiz dev's when I noticed that the reflection
plugin no longer (with mesa from git) works on my x700 even though it
worked fine with mesa 7.0.1. After a little bit of git-bisecting and
recompiling xf86-video-ati and xserver, I managed to locate the commit
where it broke:

# bad: [c34b024cf49f3fc06271d561a4069c77d7b65c48] r300: add artificial
output to match fragment program input
That's my commit :(. I'm going to look at it.

Markus

Sorry, I didn't see your e-mail response till this morning, after I opened up a bug report for it:

https://bugs.freedesktop.org/show_bug.cgi?id=15447

If there's anything you'd like to to test, just let me know. Onestone had me test mesa/progs/fp/tri-position with the latest git driver, and that's broken, too. He assumes that they are related, as both tri-position and the reflection plugin use fragment.position. I'm rebuilding a working version of the driver and x server now to confirm that tri-position worked before your commit.

Adam

I just sent the attached to mesa-devel. It fixes tri-position and the compiz reflection issue. I have no mesa commit right, so it may take 1-2 days until it gets into git. Please test this patch, just to be sure.

Thanks for your time resolving this, I know bisecting is a PITA.

Markus
>From 6c66f80c4e9302903d02c9c634954bb6be0ed7f7 Mon Sep 17 00:00:00 2001
From: Markus Amsler <[EMAIL PROTECTED]>
Date: Fri, 11 Apr 2008 13:09:00 +0200
Subject: [PATCH] r300: Fragment.position input needs no blanking out, as it's correctly handled in insert_wpos.
To: <[EMAIL PROTECTED]>

Fixes Bug 15447
---
 src/mesa/drivers/dri/r300/r300_vertprog.c |   30 +++++++++++++++-------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index e91d968..dfb748b 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -1428,20 +1428,6 @@ void r300SelectVertexShader(r300ContextPtr r300)
 	vpc = (struct r300_vertex_program_cont *)ctx->VertexProgram._Current;
 	InputsRead = ctx->FragmentProgram._Current->Base.InputsRead;
 
-	wpos_idx = -1;
-	if (InputsRead & FRAG_BIT_WPOS) {
-		for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
-			if (!(InputsRead & (FRAG_BIT_TEX0 << i)))
-				break;
-
-		if (i == ctx->Const.MaxTextureUnits) {
-			fprintf(stderr, "\tno free texcoord found\n");
-			_mesa_exit(-1);
-		}
-
-		InputsRead |= (FRAG_BIT_TEX0 << i);
-		wpos_idx = i;
-	}
 	wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead;
 	wanted_key.OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
 
@@ -1461,6 +1447,22 @@ void r300SelectVertexShader(r300ContextPtr r300)
 		}
 	}
 
+	wpos_idx = -1;
+	if (InputsRead & FRAG_BIT_WPOS) {
+		for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
+			if (!(InputsRead & (FRAG_BIT_TEX0 << i)))
+				break;
+
+		if (i == ctx->Const.MaxTextureUnits) {
+			fprintf(stderr, "\tno free texcoord found\n");
+			_mesa_exit(-1);
+		}
+
+		InputsRead |= (FRAG_BIT_TEX0 << i);
+		wanted_key.OutputsWritten |= 1 << (VERT_RESULT_TEX0 + i);
+		wpos_idx = i;
+	}
+
 	if (vpc->mesa_program.IsPositionInvariant) {
 		/* we wan't position don't we ? */
 		wanted_key.InputsRead |= (1 << VERT_ATTRIB_POS);
-- 
1.5.5

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to