summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915/intel_screen.c
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <[email protected]>2013-11-12 14:47:08 +0200
committerKristian Høgsberg <[email protected]>2013-11-12 15:57:39 -0800
commit5ba6be2617a46a7cd8567ffe65f496e917a93374 (patch)
tree03f8ec7c406c14fa1cf24ac39a7f26cf5d9c33a1 /src/mesa/drivers/dri/i915/intel_screen.c
parente9daead784921e453906853a4a78a2f3135af2e0 (diff)
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 <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.0" <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_screen.c')
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c3
1 files changed, 2 insertions, 1 deletions
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;
}