wined3d: Always set GL_PIXEL_PACK_BUFFER binding before downloading texture data.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-11-29 18:13:41 -06:00 committed by Alexandre Julliard
parent c5773b8c76
commit f4cbd110d9
1 changed files with 9 additions and 0 deletions

View File

@ -2695,6 +2695,8 @@ static void wined3d_texture_gl_download_data_slow_path(struct wined3d_texture_gl
if (temporary_mem)
{
GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0));
checkGLcall("glBindBuffer");
mem = temporary_mem;
}
else if (bo)
@ -2705,6 +2707,8 @@ static void wined3d_texture_gl_download_data_slow_path(struct wined3d_texture_gl
}
else
{
GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0));
checkGLcall("glBindBuffer");
mem = data->addr;
}
@ -2918,6 +2922,11 @@ static void wined3d_texture_gl_download_data(struct wined3d_context *context,
checkGLcall("glBindBuffer");
offset += dst_bo->buffer_offset;
}
else
{
GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, 0));
checkGLcall("glBindBuffer");
}
if (src_texture->resource.format_flags & WINED3DFMT_FLAG_COMPRESSED)
{