diff options
author | Simon Ser <contact@emersion.fr> | 2022-11-29 10:19:46 +0100 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-12-02 15:18:59 +0000 |
commit | 337ef33edcbf8106c0556dda89b088e6b9c3f1d1 (patch) | |
tree | a0037f4e6bb314a41f0d7d57e11e1266b6ad7bc4 /include | |
parent | db9d277614aa8fb84871cd01f2233ecd6e4f5ef2 (diff) |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/render/vulkan.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/render/vulkan.h b/include/render/vulkan.h index 931e5e5f..42b79bbd 100644 --- a/include/render/vulkan.h +++ b/include/render/vulkan.h @@ -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; + + 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; + uint32_t texture_mod_count; + struct wlr_vk_format_modifier_props *texture_mods; + } dmabuf; }; void vulkan_format_props_query(struct wlr_vk_device *dev, |