aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_tex_image.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-21 15:38:32 -0700
committerEric Anholt <[email protected]>2011-09-26 15:33:42 -0700
commit32fe506ae14efa055f4773f422e2edd9fd1cffee (patch)
tree16b1319587e099ab713f41580c193ee25e4b424a /src/mesa/drivers/dri/intel/intel_tex_image.c
parentdb3ada6055814a4bd5aa95fc9505fc101864391d (diff)
intel: Allow src == NULL and *dst != NULL in intel_miptree_reference().
This makes this API consistent with intel_region_reference, and the consumers wanted it this way. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex_image.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 69da0e25d1f..30c3cfbafd9 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -370,8 +370,6 @@ intelTexImage(struct gl_context * ctx,
}
}
- assert(!intelImage->mt);
-
if (intelObj->mt &&
intel_miptree_match_image(intelObj->mt, &intelImage->base.Base)) {
/* Use an existing miptree when possible */
@@ -391,10 +389,7 @@ intelTexImage(struct gl_context * ctx,
* whole object since our level didn't fit what was there
* before, and any lower levels would fit into our miptree.
*/
- if (intelImage->mt) {
- intel_miptree_release(&intelObj->mt);
- intel_miptree_reference(&intelObj->mt, intelImage->mt);
- }
+ intel_miptree_reference(&intelObj->mt, intelImage->mt);
}
/* Attempt to use the blitter for PBO image uploads.