i965/vec4: Make with_writemask() non-static.
[mesa.git] / src / mesa / drivers / dri / i965 / intel_tex_image.c
index 178541d89bd0456369e64e7bcfd48f2ae399a3d1..f270862b65dfe20d35aaeca6afdb7dc9f6ae601d 100644 (file)
@@ -173,6 +173,7 @@ try_pbo_upload(struct gl_context *ctx,
                            0, 0, false,
                            image->Width, image->Height, GL_COPY)) {
       DBG("%s: blit failed\n", __FUNCTION__);
+      intel_miptree_release(&pbo_mt);
       return false;
    }
 
@@ -379,6 +380,13 @@ intel_image_target_texture_2d(struct gl_context *ctx, GLenum target,
       return;
    }
 
+   if (target == GL_TEXTURE_EXTERNAL_OES && !image->dma_buf_imported) {
+      _mesa_error(ctx, GL_INVALID_OPERATION,
+            "glEGLImageTargetTexture2DOES(external target is enabled only "
+               "for images created with EGL_EXT_image_dma_buf_import");
+      return;
+   }
+
    /* Disallow depth/stencil textures: we don't have a way to pass the
     * separate stencil miptree of a GL_DEPTH_STENCIL texture through.
     */