Jan Sikorski : wined3d: Always set GL_PIXEL_UNPACK_BUFFER binding before calling wined3d_texture_gl_upload_bo().
Module: wine Branch: master Commit: d2ceed3904b96576ccb370f196bf6fe6d77b3537 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d2ceed3904b96576ccb370f19... Author: Jan Sikorski <jsikorski(a)codeweavers.com> Date: Mon Nov 29 11:34:19 2021 +0100 wined3d: Always set GL_PIXEL_UNPACK_BUFFER binding before calling wined3d_texture_gl_upload_bo(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52116 Signed-off-by: Jan Sikorski <jsikorski(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 1ab50a27596..48202c2142c 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2532,6 +2532,9 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context, src_mem = wined3d_context_gl_map_bo_address(context_gl, &bo, src_slice_pitch * update_d, WINED3D_MAP_READ); + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); + for (z = 0; z < update_d; ++z, src_mem += src_slice_pitch) { if (decompress) @@ -2561,6 +2564,11 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context, checkGLcall("glBindBuffer"); offset += bo.buffer_object->buffer_offset; } + else + { + GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); + checkGLcall("glBindBuffer"); + } wined3d_texture_gl_upload_bo(src_format, target, level, src_row_pitch, src_slice_pitch, dst_x, dst_y, dst_z, update_w, update_h, update_d, offset, srgb, dst_texture, gl_info);
participants (1)
-
Alexandre Julliard