Jan Sikorski : wined3d: Always set GL_PIXEL_UNPACK_BUFFER binding before calling wined3d_texture_gl_upload_bo().
Alexandre Julliard
julliard at winehq.org
Mon Nov 29 16:26:53 CST 2021
Module: wine
Branch: master
Commit: d2ceed3904b96576ccb370f196bf6fe6d77b3537
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d2ceed3904b96576ccb370f196bf6fe6d77b3537
Author: Jan Sikorski <jsikorski at 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 at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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);
More information about the wine-cvs
mailing list