aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_texture.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2008-05-02 16:22:20 +0100
committerMichel Dänzer <[email protected]>2008-05-02 16:22:20 +0100
commitd4074c509b5d28be0a2ec51d40329e1aed7047ef (patch)
treeb213c5c6c470c4b6d7ce1351f09bbf47cb16a4c0 /src/mesa/state_tracker/st_cb_texture.c
parentbe8a42b4fcad0e0c7803e63f9c4b488c2f618cef (diff)
gallium: Reallocate pipe_texture in st_TexImage if the texture object was used.
Fixes problems with interleaved glTexImage and rendering calls.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 5fd192a8b80..80122546fce 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -556,15 +556,17 @@ st_TexImage(GLcontext * ctx,
* waiting on any outstanding fences.
*/
if (stObj->pt &&
- /*stObj->pt->first_level == level &&*/
- stObj->pt->last_level == level &&
- stObj->pt->target != PIPE_TEXTURE_CUBE &&
- !st_texture_match_image(stObj->pt, &stImage->base,
- stImage->face, stImage->level)) {
+ (stObj->teximage_realloc ||
+ (/*stObj->pt->first_level == level &&*/
+ stObj->pt->last_level == level &&
+ stObj->pt->target != PIPE_TEXTURE_CUBE &&
+ !st_texture_match_image(stObj->pt, &stImage->base,
+ stImage->face, stImage->level)))) {
DBG("release it\n");
pipe_texture_release(&stObj->pt);
assert(!stObj->pt);
+ stObj->teximage_realloc = FALSE;
}
if (!stObj->pt) {