summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <[email protected]>2013-11-12 14:47:08 +0200
committerIan Romanick <[email protected]>2013-11-15 13:39:39 -0800
commit236524430228e2cc090d89652a0a46591ebe7ac0 (patch)
tree4166719d6b96483fbaea08c5318831675ee0fc53 /src/mesa
parent3e6f200250f3a4e892a18e089dc9faecf6d9c7b8 (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]> (cherry picked from commit 5ba6be2617a46a7cd8567ffe65f496e917a93374)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c3
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c3
2 files changed, 4 insertions, 2 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;
}
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index e39d6545970..6bcfe2c3115 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -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;
}