summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_texture.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-09-18 19:06:20 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-09-18 19:07:33 +0100
commita8d1521f30766b6a4707aa9966e1f2f9c0b3ac00 (patch)
tree3d457d02a4d6167c2b720f8b55a59a32f33aaed9 /src/mesa/state_tracker/st_cb_texture.c
parent89ab66448e1bcd78caab6678261c2885dcff741c (diff)
parent0b8e19ffc51c29543796d4f1e3243e97d8c32671 (diff)
Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts: src/mesa/shader/slang/slang_link.c
Diffstat (limited to 'src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c8
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 a3e8fc992d..2e1ad93942 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -455,6 +455,11 @@ st_TexImage(GLcontext * ctx,
_mesa_align_free(texImage->Data);
}
+ if (width == 0 || height == 0 || depth == 0) {
+ /* stop after freeing old image */
+ return;
+ }
+
/* If this is the only mipmap level in the texture, could call
* bmBufferData with NULL data to free the old block and avoid
* waiting on any outstanding fences.
@@ -1048,7 +1053,8 @@ st_copy_texsubimage(GLcontext *ctx,
GLboolean use_fallback = GL_TRUE;
GLboolean matching_base_formats;
- st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ /* any rendering in progress must complete before we grab the fb image */
+ st_finish(ctx->st);
/* determine if copying depth or color data */
if (texBaseFormat == GL_DEPTH_COMPONENT) {