diff options
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 3638d0d13cb..bcd85e93dc4 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -233,7 +233,10 @@ intel_create_image_from_name(__DRIscreen *screen, int cpp; image = intel_allocate_image(format, loaderPrivate); - cpp = _mesa_get_format_bytes(image->format); + if (image->format == MESA_FORMAT_NONE) + cpp = 0; + else + cpp = _mesa_get_format_bytes(image->format); image->region = intel_region_alloc_for_handle(intelScreen, cpp, width, height, pitch, name, "image"); |