Mesa (master): mesa/st: fix crash in st_texture_image_copy
Corbin Simpson
csimpson at kemper.freedesktop.org
Wed Oct 28 19:21:34 UTC 2009
Module: Mesa
Branch: master
Commit: c451011d99a33350d70766f902ad09a0b606f7c2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c451011d99a33350d70766f902ad09a0b606f7c2
Author: Marek Olšák <maraeo at gmail.com>
Date: Wed Oct 28 01:38:40 2009 +0100
mesa/st: fix crash in st_texture_image_copy
Signed-off-by: Corbin Simpson <MostAwesomeDude at gmail.com>
---
src/mesa/state_tracker/st_texture.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index ba8d1e8..3f30137 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -342,12 +342,21 @@ st_texture_image_copy(struct pipe_context *pipe,
src_surface = screen->get_tex_surface(screen, src, face, srcLevel, i,
PIPE_BUFFER_USAGE_GPU_READ);
- pipe->surface_copy(pipe,
- dst_surface,
- 0, 0, /* destX, Y */
- src_surface,
- 0, 0, /* srcX, Y */
- width, height);
+ 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_reference(&src_surface, NULL);
pipe_surface_reference(&dst_surface, NULL);
More information about the mesa-commit
mailing list