summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c2
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c12
-rw-r--r--src/mesa/state_tracker/st_texture.h4
3 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index f42b2f8d66..767654f3d0 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -90,6 +90,8 @@ update_textures(struct st_context *st)
}
st->state.num_textures = su + 1;
+
+ stObj->teximage_realloc = TRUE;
}
pt = st_get_stobj_texture(stObj);
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 5fd192a8b8..80122546fc 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) {
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index 7abccb3a69..b05762113c 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -68,9 +68,7 @@ struct st_texture_object
*/
struct pipe_texture *pt;
- GLboolean imageOverride;
- GLint depthOverride;
- GLuint pitchOverride;
+ GLboolean teximage_realloc;
};