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);