diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-08-13 14:59:48 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-08-13 14:59:48 -0600 |
commit | f3048ad90ed2e4583f0f7aaf35a0f4aa581942dd (patch) | |
tree | bfc8b96a33b57b7cdd7786d1fabd1c28914ff896 /src/mesa | |
parent | 3a1af846fe13c2a9b8c24eb7e37e11a9b42668d5 (diff) |
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.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 147ca5b1a2..fceb260d70 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -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); } |