Hash :
cb3b51a6
Author :
Date :
2025-09-12T20:45:38
Vulkan: Respect externalFormat properties for AHB When the Vulkan driver sets `VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT` in `VkAndroidHardwareBufferFormatPropertiesANDROID::formatFeatures`, ANGLE has the option of using `VK_FORMAT_UNDEFINED` rather than the reported `VkAndroidHardwareBufferFormatPropertiesANDROID::format` if the feature set is what is desired. This patch introduces separate checks of `formatFeatures` and the capabilities of `format`, and modifies the validation and creation of `VKImage`s to specify a format explicitly only when this would be necessary to conform to user intent expressed by the usage of the AHB. Test: atest GpuFormatIdentityTest Bug: b/440416844 Change-Id: I629b556c1d1daffbced0992f421db2bcd95bbada Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6944813 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>