vulkan/android: Fix suggestedYcbcrModel with !mapper4
Only mapper4 supports u_gralloc_get_buffer_color_info(), other gralloc
implementations do not. So add a fallback, so that we aren't telling
the app that the suggestedYcbcrModel is RGB_IDENTITY. We only go down
this path for YUV formats.
Fixes android.graphics.cts.BasicVulkanGpuTest#testBasicBufferImportAndRenderingExternalFormat
Fixes: 8732a619f1
("vulkan/android: Add common vkGetAndroidHardwareBufferPropertiesANDROID")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29391>
This commit is contained in:
@@ -662,6 +662,8 @@ get_ahb_buffer_format_properties2(
|
||||
VK_CHROMA_LOCATION_MIDPOINT : VK_CHROMA_LOCATION_COSITED_EVEN;
|
||||
p->suggestedYChromaOffset = (color_info.vertical_siting == __DRI_YUV_CHROMA_SITING_0_5) ?
|
||||
VK_CHROMA_LOCATION_MIDPOINT : VK_CHROMA_LOCATION_COSITED_EVEN;
|
||||
} else {
|
||||
p->suggestedYcbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601;
|
||||
}
|
||||
|
||||
finish:
|
||||
|
Reference in New Issue
Block a user