Mesa (master): i965: enable image external sampling for imported dma-buffers
Topi Pohjolainen
tpohjola at kemper.freedesktop.org
Fri Aug 2 07:18:36 UTC 2013
Module: Mesa
Branch: master
Commit: f5947c2bc72a630d1abd2a12221d8dafd3a24be4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5947c2bc72a630d1abd2a12221d8dafd3a24be4
Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date: Mon Nov 12 13:38:08 2012 +0200
i965: enable image external sampling for imported dma-buffers
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
---
src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
src/mesa/drivers/dri/i965/intel_tex_image.c | 7 +++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 409d40b..655467c 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -122,6 +122,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.OES_EGL_image = true;
ctx->Extensions.OES_draw_texture = true;
ctx->Extensions.OES_standard_derivatives = true;
+ ctx->Extensions.OES_EGL_image_external = true;
if (brw->gen >= 6)
ctx->Const.GLSLVersion = 140;
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 178541d..7db0deb 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -379,6 +379,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.
*/
More information about the mesa-commit
mailing list