render/vulkan: make shm/dmabuf split clearer in wlr_vk_format_props

struct wlr_vk_format_props contains a mix of properties for shm
and dmabuf, and it's not immediately clear which fields are for
which kind of buffer. Use a nested struct to group the fields.
This commit is contained in:
Simon Ser 2022-11-29 10:19:46 +01:00 committed by Simon Zeni
parent db9d277614
commit 337ef33edc
2 changed files with 36 additions and 30 deletions

View file

@ -96,14 +96,19 @@ struct wlr_vk_format_modifier_props {
struct wlr_vk_format_props {
struct wlr_vk_format format;
VkExtent2D max_extent; // relevant if not created as dma_buf
VkFormatFeatureFlags features; // relevant if not created as dma_buf
uint32_t render_mod_count;
struct wlr_vk_format_modifier_props *render_mods;
struct {
VkExtent2D max_extent;
VkFormatFeatureFlags features;
} shm;
uint32_t texture_mod_count;
struct wlr_vk_format_modifier_props *texture_mods;
struct {
uint32_t render_mod_count;
struct wlr_vk_format_modifier_props *render_mods;
uint32_t texture_mod_count;
struct wlr_vk_format_modifier_props *texture_mods;
} dmabuf;
};
void vulkan_format_props_query(struct wlr_vk_device *dev,