mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
gallium: in fallback_copy_texsubimage() create new tex surface for CPU read access
Was trying to use the strb->surface but it's made for GPU read/write only.
This commit is contained in:
parent
3a1af846fe
commit
f3048ad90e
1 changed files with 7 additions and 1 deletions
|
|
@ -933,7 +933,12 @@ fallback_copy_texsubimage(GLcontext *ctx,
|
|||
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);
|
||||
|
||||
|
|
@ -1016,6 +1021,7 @@ fallback_copy_texsubimage(GLcontext *ctx,
|
|||
}
|
||||
|
||||
screen->tex_surface_release(screen, &dest_surf);
|
||||
screen->tex_surface_release(screen, &src_surf);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue