[PATCH 4/6] wined3d: Unbind the source BO after downloading in wined3d_context_gl_copy_bo_address().

Zebediah Figura zfigura at codeweavers.com
Wed Nov 24 10:44:41 CST 2021


On 11/24/21 8:28 AM, Henri Verbeet wrote:
> On Wed, 24 Nov 2021 at 04:17, Zebediah Figura <zfigura at codeweavers.com> wrote:
>> @@ -2853,6 +2853,7 @@ void wined3d_context_gl_copy_bo_address(struct wined3d_context_gl *context_gl,
>>       {
>>           wined3d_context_gl_bind_bo(context_gl, src_bo->binding, src_bo->id);
>>           GL_EXTCALL(glGetBufferSubData(src_bo->binding, src_bo->b.buffer_offset + (GLintptr)src->addr, size, dst->addr));
>> +        wined3d_context_gl_bind_bo(context_gl, src_bo->binding, 0);
>>           checkGLcall("buffer download");
>>
> 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.



More information about the wine-devel mailing list