On 11/24/21 11:12 AM, Henri Verbeet wrote:
On Wed, 24 Nov 2021 at 17:44, Zebediah Figura zfigura@codeweavers.com wrote:
On 11/24/21 8:28 AM, Henri Verbeet wrote:
Here and in the remainder of the series, does this fix a specific issue? The general model we're following is to setup the correct binding before calling GL commands using that bind point, and not restoring any existing binding afterwards. (And note that in terms of restoring bindings, binding 0 would be arbitrary; it's not particularly likely to be the previous binding for a given bind point.)
Okay, maybe I'm looking in the wrong place then, but that doesn't match what I've seen; everywhere else in this file seems to unbind the BO immediately after using it.
I think those are mostly historic, in one form or another. We should probably get rid of them, but there's some potential for regressions, because there may be existing code that depends on particular bindings being 0. E.g., something like glTexImage2D() will use the GL_PIXEL_UNPACK_BUFFER binding. I'm not confident that our handling of GL_PIXEL_PACK_BUFFER/GL_PIXEL_UNPACK_BUFFER in particular is correct everywhere.
Indeed, that was the case that prompted these patches, although unfortunately I don't remember which function it was now.
I'll go through and try to fix this the "new" way, then.