[Mesa-dev] [PATCH] i965: Reject unsupported formats in glEGLImageTargetTexture2D()
Chad Versace
chad at kiwitree.net
Wed May 31 23:54:59 UTC 2017
If the EGLImage's format is not a supported texture format according to
brw_surface_formats.c, then refuse to create the miptree. This follows
the precedent in glEGLImageRenderbufferStorage (implemented by
intel_image_target_renderbuffer_storage), which rejects the EGLImage's
format if is not renderable.
Tested on Broadwell with deqp at 1ee59ff9 on X11/EGL:
> ./deqp-egl --deqp-case='dEQP-EGL.functional.image.*'
Test run totals:
Passed: 131/169 (77.5%)
Failed: 0/169 (0.0%)
Not supported: 38/169 (22.5%)
Warnings: 0/169 (0.0%)
---
src/mesa/drivers/dri/i965/intel_tex_image.c | 4 ++++
1 file changed, 4 insertions(+)
Tomasz, you're CC'd because this is related to R8G8B8X8 EGLConfigs on
Skylake.
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 7208d8e..649b390 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -251,9 +251,13 @@ static struct intel_mipmap_tree *
create_mt_for_dri_image(struct brw_context *brw,
GLenum target, __DRIimage *image)
{
+ struct gl_context *ctx = &brw->ctx;
struct intel_mipmap_tree *mt;
uint32_t draw_x, draw_y;
+ if (!ctx->TextureFormatSupported[image->format])
+ return NULL;
+
/* Disable creation of the texture's aux buffers because the driver exposes
* no EGL API to manage them. That is, there is no API for resolving the aux
* buffer's content to the main buffer nor for invalidating the aux buffer's
--
2.9.4
More information about the mesa-dev
mailing list