[Mesa-dev] [PATCH 4/5] mesa: Fix a couple of TexEnv unit limits.

Ian Romanick idr at freedesktop.org
Wed Jul 6 14:15:04 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/06/2011 01:33 PM, Henri Verbeet wrote:
> On 6 July 2011 22:03, Ian Romanick <idr at freedesktop.org> wrote:
>>> @@ -419,7 +419,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
>>>     ASSERT_OUTSIDE_BEGIN_END(ctx);
>>>
>>>     maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV)
>>> -      ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxTextureImageUnits;
>>> +      ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits;
>>
>> I'm not 100% sure that this is correct.  Is there some spec language to
>> back this up?  A test case?
>>
> Page 47 of the 2.1 spec (section 2.11.2, the bit about ActiveTexture()):
> 
>     "The active texture unit selector also selects the texture image
> unit accessed
>     by commands involving texture image processing (section 3.8). Such commands
>     include all variants of TexEnv (except for those controlling point
> sprite coordi-
>     nate replacement), TexParameter, and TexImage commands, BindTexture, En-
>     able/Disable for any texture target (e.g., TEXTURE_2D), and
> queries of all such
>     state. If the texture image unit number corresponding to the
> current value of
>     ACTIVE_TEXTURE is greater than or equal to the implementation-dependent con-
>     stant MAX_COMBINED_TEXTURE_IMAGE_UNITS, the error INVALID_OPERATION is
>     generated by any such command."
> 
> There's a corresponding section in the ARB_vertex_shader spec.

Okay.  That's convincing enough. :)

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk4U0FgACgkQX1gOwKyEAw/AfwCfewmv1kN4H9uNq/oB0aq7oktM
HvcAn1hQvok3+jHx/dAPBWpoUBwmCgy7
=1zrx
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list