aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-03-18 10:21:05 -0600
committerBrian Paul <[email protected]>2009-03-18 10:24:19 -0600
commita0509f7d28765c6ef8546eafba94aec46d9e7ed3 (patch)
tree8950e2caa869261b16189ac05012d96bf316d25e
parent9808ae688a2386652e178d2bd717d0f380405ae0 (diff)
st: clean up some if-statment code
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 71640d78f72..f94713abd1d 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -465,18 +465,17 @@ st_TexImage(GLcontext * ctx,
* bmBufferData with NULL data to free the old block and avoid
* waiting on any outstanding fences.
*/
- if (stObj->pt &&
- (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_reference(&stObj->pt, NULL);
- assert(!stObj->pt);
- stObj->teximage_realloc = FALSE;
+ if (stObj->pt) {
+ if (stObj->teximage_realloc ||
+ (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_reference(&stObj->pt, NULL);
+ assert(!stObj->pt);
+ stObj->teximage_realloc = FALSE;
+ }
}
if (!stObj->pt) {