mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02:00
vulkan/android: Set COLOR_ATTACHMENT_BIT for external format resolve
When using ANDROID_external_format_resolve if a valid colorAttachmentFormat is returned by VkAndroidHardwareBufferFormatResolvePropertiesAndroid, the formatFeatures should include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT so strict applications can use the buffer as a render target. Signed-off-by: Allen Ballway <ballway@chromium.org> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Lucas Fryzek <lfryzek@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41142>
This commit is contained in:
parent
db27a10f38
commit
b64cd520f7
1 changed files with 5 additions and 0 deletions
|
|
@ -1066,6 +1066,11 @@ vk_common_GetAndroidHardwareBufferPropertiesANDROID(
|
|||
format_resolve->colorAttachmentFormat =
|
||||
num_bits == 8 ? VK_FORMAT_R8G8B8A8_UNORM
|
||||
: VK_FORMAT_R16G16B16A16_UNORM;
|
||||
|
||||
format_prop2->formatFeatures |= VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT;
|
||||
if (format_prop) {
|
||||
format_prop->formatFeatures |= VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT;
|
||||
}
|
||||
} else {
|
||||
format_resolve->colorAttachmentFormat = VK_FORMAT_UNDEFINED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue