mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-30 21:37:53 -04:00
vulkan: store formats with modifiers
This commit is contained in:
parent
80fa9ee516
commit
bd08dd056a
2 changed files with 8 additions and 1 deletions
|
|
@ -777,7 +777,8 @@ int vulkan_format_infos_init(struct vulkan_base *s, uint32_t formatCount, uint32
|
|||
if (!info->infos)
|
||||
return -ENOMEM;
|
||||
|
||||
for (uint32_t i = 0; i < formatCount; i++) {
|
||||
uint32_t i;
|
||||
for (i = 0; i < formatCount; i++) {
|
||||
VkFormat format = vulkan_id_to_vkformat(formats[i]);
|
||||
if (format == VK_FORMAT_UNDEFINED)
|
||||
continue;
|
||||
|
|
@ -870,6 +871,10 @@ int vulkan_format_infos_init(struct vulkan_base *s, uint32_t formatCount, uint32
|
|||
}
|
||||
free(modPropsList.pDrmFormatModifierProperties);
|
||||
}
|
||||
for (i = 0; i < info->formatCount; i++) {
|
||||
if (info->infos[i].modifierCount > 0)
|
||||
info->formatsWithModifiersCount++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue