summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_image.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 7208d8eb4ad..649b3907d13 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