I found the problem:
In Mesa MAX_TEXTURE_UNITS, MAX_TEXTURE_COORD_UNITS, and
MAX_TEXTURE_IMAGE_UNITS are all set to 8. (src/mesa/main/config.h)
And there are no sanity-checks done on the values returned by the drivers.
Changing the defines to 16 makes everything work.
Changing only MAX_TEXTURE_IMAGE_UNITS should be valid according to
src/mesa/main/config.h but a sanity-check fails (if commented out it
lockups like before).
In the future it would be nice to have bounds checks on the Const.* values.
Rune Petersen
Brian Paul wrote:
Rune Petersen wrote:
Adam Jackson wrote:
On Wednesday 26 April 2006 10:14, Rune Petersen wrote:
Hi,
Since the 12 of April there has been a change that causes Quake 3 and
Doom 3 (demo)not to exit properly.
Quake 3 locks up the system, and Doom 3 does a double fault.
The suspect as I see it is:
"Ensure all GART allocations are freed on context destruction"
But I have yet to confirm it. If you are unable to confirm it, I'll try
to track it down myself.
That patch was admittedly rather brute-force, but I've not had any
issues with it locally.
Turns out you're off the hook :) (for now)
The Quake 3 lockup is caused/triggered by a change done to Mesa (not
r300) between 14 and 15 of April.
patch:
"Replace ctx->Const.MaxTextureUnits w/
ctx->Const.MaxTexture[Coord/Image]Units in various places."
looks like I need to join the Mesa mailing-list...
Do you have the MESA_DEBUG env var set? That might give a hint.
I think the r300 driver is the only one that can have different values
for GL_MAX_TEXTURE_IMAGE_UNITS and GL_MAX_TEXTURE_COORD_UNITS. That
might have something to do with it.
Looks like those values can be set in your .driconf file (though I'm not
sure why that's a config option!).
Otherwise, here's the CVS check-in log. You could try undoing the
changes in one file at a time until you find the trouble:
snip...
Index: config.h
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/main/config.h,v
retrieving revision 1.83
diff -u -r1.83 config.h
--- config.h 13 Apr 2006 19:21:58 -0000 1.83
+++ config.h 14 May 2006 00:55:27 -0000
@@ -113,7 +113,7 @@
* MAX_TEXTURE_IMAGE_UNITS seen below, since MAX_TEXTURE_UNITS is used
* to dimension some arrays that store both coord and image data.
*/
-#define MAX_TEXTURE_UNITS 8
+#define MAX_TEXTURE_UNITS 16
/[EMAIL PROTECTED]/
@@ -126,8 +126,8 @@
* And, GL_MAX_TEXTURE_UNITS <= MAX_TEXTURE_COORD_UNITS.
*/
/[EMAIL PROTECTED]/
-#define MAX_TEXTURE_COORD_UNITS 8
-#define MAX_TEXTURE_IMAGE_UNITS 8
+#define MAX_TEXTURE_COORD_UNITS 16
+#define MAX_TEXTURE_IMAGE_UNITS 16
/[EMAIL PROTECTED]/
/**