[Mesa-dev] [PATCH 16/18] mesa: Implement glBindImageTextures()
Francisco Jerez
currojerez at riseup.net
Mon Feb 17 14:01:30 PST 2014
Fredrik Höglund <fredrik at kde.org> writes:
> On Thursday 13 February 2014, Francisco Jerez wrote:
>> Fredrik Höglund <fredrik at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140217/0072cc3e/attachment.pgp>
More information about the mesa-dev
mailing list