diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_fbo.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_image.h | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 12 |
3 files changed, 7 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index fb26038f327..8a398f73e49 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -363,13 +363,6 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx, return; } - /* Buffers originating from outside are for read-only. */ - if (image->dma_buf_imported) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glEGLImageTargetRenderbufferStorage(dma buffers are read-only)"); - return; - } - /* __DRIimage is opaque to the core so it has to be checked here */ switch (image->format) { case MESA_FORMAT_R8G8B8A8_UNORM: diff --git a/src/mesa/drivers/dri/i965/intel_image.h b/src/mesa/drivers/dri/i965/intel_image.h index 0cae7119a9a..a82cf3b3bd1 100644 --- a/src/mesa/drivers/dri/i965/intel_image.h +++ b/src/mesa/drivers/dri/i965/intel_image.h @@ -89,18 +89,18 @@ struct __DRIimageRec { GLuint tile_y; bool has_depthstencil; + /** The image was created with EGL_EXT_image_dma_buf_import. */ + bool dma_buf_imported; + /** * Provided by EGL_EXT_image_dma_buf_import. - * - * The flag is set in order to restrict the use of the image later on. - * - * See intel_image_target_texture_2d() + * \{ */ - bool dma_buf_imported; enum __DRIYUVColorSpace yuv_color_space; enum __DRISampleRange sample_range; enum __DRIChromaSiting horizontal_siting; enum __DRIChromaSiting vertical_siting; + /* \} */ void *data; }; diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index 290d313465d..b70f8de6430 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -320,17 +320,9 @@ intel_image_target_texture_2d(struct gl_context *ctx, GLenum target, if (image == NULL) return; - /** - * Images originating via EGL_EXT_image_dma_buf_import can be used only - * with GL_OES_EGL_image_external only. + /* We support external textures only for EGLImages created with + * EGL_EXT_image_dma_buf_import. We may lift that restriction in the future. */ - if (image->dma_buf_imported && target != GL_TEXTURE_EXTERNAL_OES) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glEGLImageTargetTexture2DOES(dma buffers can be used with " - "GL_OES_EGL_image_external only"); - return; - } - if (target == GL_TEXTURE_EXTERNAL_OES && !image->dma_buf_imported) { _mesa_error(ctx, GL_INVALID_OPERATION, "glEGLImageTargetTexture2DOES(external target is enabled only " |