zink: fix external_only reporting for dmabuf formats

this is based on format features

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467>
This commit is contained in:
Mike Blumenkrantz
2024-10-03 08:00:51 -04:00
committed by Marge Bot
parent 49950d3b2f
commit f3c206d61e
+2 -3
View File
@@ -2600,10 +2600,9 @@ zink_query_dmabuf_modifiers(struct pipe_screen *pscreen, enum pipe_format format
const struct zink_modifier_props *props = zink_get_modifier_props(screen, format);
*count = props->drmFormatModifierCount;
for (int i = 0; i < MIN2(max, *count); i++) {
if (external_only)
external_only[i] = 0;
modifiers[i] = props->pDrmFormatModifierProperties[i].drmFormatModifier;
if (external_only)
external_only[i] = !(props->pDrmFormatModifierProperties[i].drmFormatModifierTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT);
}
}