struct pipe_texture *pt = stImage->pt;
struct pipe_surface *src_surf, *dest_surf;
- src_surf = strb->surface;
+ /* We'd use strb->surface, here but it's created for GPU read/write only */
+ src_surf = pipe->screen->get_tex_surface( pipe->screen,
+ strb->texture,
+ 0, 0, 0,
+ PIPE_BUFFER_USAGE_CPU_READ);
+
dest_surf = screen->get_tex_surface(screen, pt, face, level, destZ,
PIPE_BUFFER_USAGE_CPU_WRITE);
}
screen->tex_surface_release(screen, &dest_surf);
+ screen->tex_surface_release(screen, &src_surf);
}