aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/texstate.c')
-rw-r--r--mesalib/src/mesa/main/texstate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c
index 35ab1ad4e..29b50637a 100644
--- a/mesalib/src/mesa/main/texstate.c
+++ b/mesalib/src/mesa/main/texstate.c
@@ -407,7 +407,7 @@ update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit)
}
else if (format == GL_DEPTH_COMPONENT ||
format == GL_DEPTH_STENCIL_EXT) {
- format = texObj->DepthMode;
+ format = texObj->Sampler.DepthMode;
}
calculate_derived_texenv(&texUnit->_EnvMode, texUnit->EnvMode, format);
texUnit->_CurrentCombine = & texUnit->_EnvMode;
@@ -827,6 +827,12 @@ _mesa_free_texture_data(struct gl_context *ctx)
/* GL_ARB_texture_buffer_object */
_mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject, NULL);
+
+#if FEATURE_sampler_objects
+ for (u = 0; u < Elements(ctx->Texture.Unit); u++) {
+ _mesa_reference_sampler_object(ctx, &ctx->Texture.Unit[u].Sampler, NULL);
+ }
+#endif
}