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

Henri Verbeet hverbeet at gmail.com
Wed Jul 6 13:33:11 PDT 2011


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.


More information about the mesa-dev mailing list