From 5ba6be2617a46a7cd8567ffe65f496e917a93374 Mon Sep 17 00:00:00 2001 From: Ander Conselvan de Oliveira Date: Tue, 12 Nov 2013 14:47:08 +0200 Subject: dri/i915, dri/i965: Fix support for planar images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Planar images have format __DRI_IMAGE_FORMAT_NONE, but the patch that moved the conversion from dri_format to the mesa format made it impossible to allocate a image with that format. Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Kristian Høgsberg Reviewed-by: Eric Anholt Cc: "10.0" --- src/mesa/drivers/dri/i915/intel_screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/i915') diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 2c309ed4a16..a10331cea0b 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -246,7 +246,8 @@ intel_allocate_image(int dri_format, void *loaderPrivate) image->offset = 0; image->format = driImageFormatToGLFormat(dri_format); - if (image->format == 0) { + if (dri_format != __DRI_IMAGE_FORMAT_NONE && + image->format == MESA_FORMAT_NONE) { free(image); return NULL; } -- cgit v1.2.3