aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_tex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_tex.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 32e1fb7397a..21c4a1dddba 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -1,4 +1,5 @@
#include "swrast/swrast.h"
+#include "main/renderbuffer.h"
#include "main/texobj.h"
#include "main/teximage.h"
#include "main/mipmap.h"
@@ -59,6 +60,14 @@ intelFreeTextureImageData(struct gl_context * ctx, struct gl_texture_image *texI
_mesa_free_texmemory(texImage->Data);
texImage->Data = NULL;
}
+
+ if (intelImage->depth_rb) {
+ _mesa_reference_renderbuffer(&intelImage->depth_rb, NULL);
+ }
+
+ if (intelImage->stencil_rb) {
+ _mesa_reference_renderbuffer(&intelImage->stencil_rb, NULL);
+ }
}
/**