mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
intel: Don't call _mesa_get_format_bytes for MESA_FORMAT_NONE
When we don't intend to texture from or render to a __DRIimage we use __DRI_IMAGE_FORMAT_NONE. In that case, we just create the __DRIimage to reference the underlying buffer, and will create usable __DRIimages from it using createSubImage later. If we try to use _mesa_get_format_bytes() on MESA_FORMAT_NONE in a debug build, we hit an assertion, so let's not do that.
This commit is contained in:
parent
81de0431d6
commit
636646a481
1 changed files with 4 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue