dri/i915, dri/i965: Fix support for planar images

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 <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
Ander Conselvan de Oliveira 2013-11-12 14:47:08 +02:00 committed by Kristian Høgsberg
parent e9daead784
commit 5ba6be2617
2 changed files with 4 additions and 2 deletions

View File

@ -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;
}

View File

@ -300,7 +300,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;
}