diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_screen.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 3 |
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; } |