summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_tex_image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_image.c b/src/mesa/drivers/dri/i915tex/intel_tex_image.c
index abab90cc06..f790b1e6f7 100644
--- a/src/mesa/drivers/dri/i915tex/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i915tex/intel_tex_image.c
@@ -378,9 +378,6 @@ intelTexImage(GLcontext * ctx,
assert(!intelObj->mt);
}
- if (!pixels)
- return;
-
if (!intelObj->mt) {
guess_and_alloc_mipmap_tree(intel, intelObj, intelImage);
if (!intelObj->mt) {
@@ -682,6 +679,9 @@ intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
if (!intelObj)
return;
+ if (intelObj->mt)
+ intel_miptree_release(intel, &intelObj->mt);
+
intelObj->imageOverride = GL_TRUE;
intelObj->depthOverride = depth;
intelObj->pitchOverride = pitch;