mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
zink: handle modifier nplanes queries correctly for planar formats
this just returns the number of planes in the base format as a default, which
matches the behavior of other drivers
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20753>
(cherry picked from commit 6ff334e54a)
This commit is contained in:
parent
9f0fd0562f
commit
9fa0dd2f65
2 changed files with 2 additions and 2 deletions
|
|
@ -2866,7 +2866,7 @@
|
||||||
"description": "zink: handle modifier nplanes queries correctly for planar formats",
|
"description": "zink: handle modifier nplanes queries correctly for planar formats",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 0,
|
"nomination_type": 0,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null
|
"because_sha": null
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2102,7 +2102,7 @@ zink_get_dmabuf_modifier_planes(struct pipe_screen *pscreen, uint64_t modifier,
|
||||||
for (unsigned i = 0; i < screen->modifier_props[format].drmFormatModifierCount; i++)
|
for (unsigned i = 0; i < screen->modifier_props[format].drmFormatModifierCount; i++)
|
||||||
if (screen->modifier_props[format].pDrmFormatModifierProperties[i].drmFormatModifier == modifier)
|
if (screen->modifier_props[format].pDrmFormatModifierProperties[i].drmFormatModifier == modifier)
|
||||||
return screen->modifier_props[format].pDrmFormatModifierProperties[i].drmFormatModifierPlaneCount;
|
return screen->modifier_props[format].pDrmFormatModifierProperties[i].drmFormatModifierPlaneCount;
|
||||||
return 0;
|
return util_format_get_num_planes(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue