[Mesa-dev] [PATCH] Fix glGetInteger*(GL_SAMPLER_BINDING).

Eric Anholt eric at anholt.net
Mon Mar 11 10:27:17 PDT 2013


Alan Hourihane <alanh at fairlite.co.uk> writes:

> On 03/06/13 18:36, Brian Paul wrote:
>> On 03/06/2013 11:23 AM, Alan Hourihane wrote:
>>> If the sampler object has been deleted on another context, an
>>> alternative context may reference the old sampler. So ensure the sampler
>>> object still exists.
>>
>> Alan, is this specified somewhere in a spec?  I can't find a 
>> description of this behaviour and we don't do this for texture objects 
>> or buffer objects, etc.
>
> I can't see it specifically mentioned, apart from the note that when 
> deleting the sampler object it should be unbound from the texture unit, 
> and I did consider the case of buffer & texture objects whether to do 
> this there too.
>
> But getting the GL_SAMPLER_BINDING id when switching contexts and 
> attempting to re-bind with glBindSampler() gives a GL error, which seems 
> wrong to me.
>
> I checked with the NVIDIA driver and no GL error is generated.

I would guess that's because binding an non-genned name gens the object,
rather than because of some sort of magic in the getter.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130311/909ff1f2/attachment.pgp>


More information about the mesa-dev mailing list