mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
i965/screen: Report the correct number of image planes
For non-CCS images, we were reporting just one plane even though they may have multiple in the case of YUV. Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
8824141b8d
commit
9c52aef7d7
1 changed files with 8 additions and 1 deletions
|
|
@ -799,7 +799,14 @@ intel_query_image(__DRIimage *image, int attrib, int *value)
|
|||
case __DRI_IMAGE_ATTRIB_FOURCC:
|
||||
return intel_lookup_fourcc(image->dri_format, value);
|
||||
case __DRI_IMAGE_ATTRIB_NUM_PLANES:
|
||||
*value = isl_drm_modifier_has_aux(image->modifier) ? 2 : 1;
|
||||
if (isl_drm_modifier_has_aux(image->modifier)) {
|
||||
assert(!image->planar_format || image->planar_format->nplanes == 1);
|
||||
*value = 2;
|
||||
} else if (image->planar_format) {
|
||||
*value = image->planar_format->nplanes;
|
||||
} else {
|
||||
*value = 1;
|
||||
}
|
||||
return true;
|
||||
case __DRI_IMAGE_ATTRIB_OFFSET:
|
||||
*value = image->offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue