MAX_COMBINED_TEXTURE_IMAGE_UNITS fix[1] is not taking account drivers wihtout support for ARB_vertex_shader should support. Current implementation makes all older drivers to allow glActiveTexture call for up to 32 texture units which is clearly wrong.
I don't know what specs says about number of texture units. But my guess is that it should match GL_MAX_TEXTURE_UNITS_ARB. [1] commit b2a30497cc8b107ea74c3d8fbb646e59a4d55a05 Author: Brian Paul <bri...@vmware.com> Date: Wed Feb 3 15:47:44 2010 -0700 mesa: increase number of texture units to MAX_COMBINED_TEXTURE_IMAGE_UNITS We were misinterpretting GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS previously. It's the number of texture units for which we need to keep state; not just the total number of texture units addressable by the vertex shader plus fragment shader. Since sw Mesa independently supports 16 texture units in vertex shaders and 16 texture units in fragment shaders, the max combined units is 32. Note that the docs for glActiveTexture() indicate the max legal unit is MAX(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, MAX_TEXTURE_COORDS) - 1. A new piglit test (texunits.c) tests the various texture unit limits. I'm pretty sure I've got this all right now, but additional reviews are welcome... ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev