Fredrik Höglund <fred...@kde.org> writes:

> On Thursday 13 February 2014, Francisco Jerez wrote:
>> Fredrik Höglund <fred...@kde.org> writes:
>>[...]
>> Can't you get rid of the whole block above by declaring 'const GLuint
>> texture = (textures ? textures[i] : 0);' in the loop below, and then
>> 's/textures[i]/texture/'?
>
> I could, but I thought it might be worth optimizing this case.  Note that
> the hash table mutex is not locked in this block.  I don't know if it
> actually makes a difference for any real applications though.
>

Sounds like a premature optimization to me.

> But the actual unbinding code could be moved into a helper function.
>

Right, I guess that would make the code somewhat easier to follow.

>[...]
>> You can just unref 'u->TexObj' and set 'u->_Valid' to GL_FALSE here.
>
> Unfortunately the specification says that all parameters are reset to their
> default values when a texture is unbound.
>

Oh, right, I had missed that paragraph from the spec.

Thanks.

Attachment: pgp6VIHbcCSZ9.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to