mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
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>
(cherry picked from commit f3c206d61e)
This commit is contained in:
parent
1df31a9b81
commit
bd7af2d8df
2 changed files with 3 additions and 4 deletions
|
|
@ -2484,7 +2484,7 @@
|
|||
"description": "zink: fix external_only reporting for dmabuf formats",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2590,10 +2590,9 @@ zink_query_dmabuf_modifiers(struct pipe_screen *pscreen, enum pipe_format format
|
|||
struct zink_screen *screen = zink_screen(pscreen);
|
||||
*count = screen->modifier_props[format].drmFormatModifierCount;
|
||||
for (int i = 0; i < MIN2(max, *count); i++) {
|
||||
if (external_only)
|
||||
external_only[i] = 0;
|
||||
|
||||
modifiers[i] = screen->modifier_props[format].pDrmFormatModifierProperties[i].drmFormatModifier;
|
||||
if (external_only)
|
||||
external_only[i] = !(screen->modifier_props[format].pDrmFormatModifierProperties[i].drmFormatModifierTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue