Commit cd53e81a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Explicitly calculate the sub-resource layer in surface_download_data().

parent cb4b7574
......@@ -748,7 +748,8 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
}
else if (temporary_mem)
{
void *src_data = temporary_mem + surface->texture_layer * sub_resource->size;
unsigned int layer = sub_resource_idx / texture->level_count;
void *src_data = temporary_mem + layer * sub_resource->size;
if (data.buffer_object)
{
GL_EXTCALL(glBindBuffer(GL_PIXEL_PACK_BUFFER, data.buffer_object));
......
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