mesa: Move ROUND_DOWN_TO() macro from i915/i965 to macros.h.
[mesa.git] / src / mesa / main / samplerobj.c
index 3857eda06515209691457fb90e26a63bfa14afa0..c3b612c76184af2c405217423f302875e79223e8 100644 (file)
@@ -155,6 +155,7 @@ static void
 _mesa_delete_sampler_object(struct gl_context *ctx,
                             struct gl_sampler_object *sampObj)
 {
+   free(sampObj->Label);
    free(sampObj);
 }
 
@@ -568,7 +569,8 @@ static GLuint
 set_sampler_cube_map_seamless(struct gl_context *ctx,
                               struct gl_sampler_object *samp, GLboolean param)
 {
-   if (!ctx->Extensions.AMD_seamless_cubemap_per_texture)
+   if (!_mesa_is_desktop_gl(ctx)
+       || !ctx->Extensions.AMD_seamless_cubemap_per_texture)
       return INVALID_PNAME;
 
    if (samp->CubeMapSeamless == param)