summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_texture.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-03-17 10:31:57 -0600
committerBrian Paul <brianp@vmware.com>2010-03-17 10:31:59 -0600
commitc11d582411a999ed40db4c02143dd380113e0ffd (patch)
tree91fa0eafcf6fcb26a6ada94af62a502bfa9f9a4c /src/mesa/state_tracker/st_texture.c
parenta196a5d3303a49c5f79a283f91f8e0cc8aa87f69 (diff)
st/mesa: plug in default for pipe_context::surface_copy() if needed
This lets us avoid conditionals and duplicated code in several places.
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r--src/mesa/state_tracker/st_texture.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index ef97d873e5..5809927852 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -342,21 +342,12 @@ st_texture_image_copy(struct pipe_context *pipe,
src_surface = screen->get_tex_surface(screen, src, face, srcLevel, i,
PIPE_BUFFER_USAGE_GPU_READ);
- if (pipe->surface_copy) {
- pipe->surface_copy(pipe,
- dst_surface,
- 0, 0, /* destX, Y */
- src_surface,
- 0, 0, /* srcX, Y */
- width, height);
- } else {
- util_surface_copy(pipe, FALSE,
- dst_surface,
- 0, 0, /* destX, Y */
- src_surface,
- 0, 0, /* srcX, Y */
- width, height);
- }
+ pipe->surface_copy(pipe,
+ dst_surface,
+ 0, 0, /* destX, Y */
+ src_surface,
+ 0, 0, /* srcX, Y */
+ width, height);
pipe_surface_reference(&src_surface, NULL);
pipe_surface_reference(&dst_surface, NULL);