[Mesa-dev] [PATCH 08/18] meta/blit: Don't pollute the sampler object namespace in _mesa_meta_setup_sampler
Ian Romanick
idr at freedesktop.org
Tue Jan 12 08:44:30 PST 2016
On 01/12/2016 01:36 AM, Erik Faye-Lund wrote:
> On Sat, Jan 9, 2016 at 3:59 AM, Ian Romanick <idr at freedesktop.org> wrote:
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> tl;dr: For many types of GL object, we can *NEVER* use the Gen function.
>>
>> In OpenGL ES (all versions!) and OpenGL compatibility profile,
>> applications don't have to call Gen functions. The GL spec is very
>> clear about how you can mix-and-match generated names and non-generated
>> names: you can use any name you want for a particular object type until
>> you call the Gen function for that object type.
>
> Not that it affects this patch (except perhaps the commit message),
> but at least in GLES2 you can even keep on using the old buffer,
> texture, framebuffer or renderbuffer names even after calling the
> Gen-function, because Gen{Buffers,Textures,Framebuffers,Renderbuffers}
> are defined as "returns n previously unused
> {buffer,texture,framebuffer,renderbuffer} object names in textures".
> Since the object names needs to be previously unused, the
> Gen-functions cannot generate names that has been previously bound. I
> expect that the same goes for other specifications, but I haven't
> verified that.
Correct. After you start calling GenFoo you just can't invent your own
names for foo objects. There are some cases where it can work, but,
especially in the case of GLX indirect rendering, it may not work on
some implementations even when you think it should.
This commit message gets copy-and-pasted a *lot*. If you think there
are changes that should be made, I can do that on the future patches in
this series.
More information about the mesa-dev
mailing list