Commit d2ceed39 authored by Jan Sikorski's avatar Jan Sikorski Committed by Alexandre Julliard

wined3d: Always set GL_PIXEL_UNPACK_BUFFER binding before calling wined3d_texture_gl_upload_bo().

parent 54749200
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment