render/vulkan: Refactor image usages for modifiers

Makes this much more extensible so we could add a storage type in future for compute.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2021-10-16 16:11:20 +01:00
parent 3a685b10b6
commit 49c67c5615
5 changed files with 102 additions and 135 deletions

View file

@ -536,8 +536,9 @@ void vulkan_device_destroy(struct wlr_vk_device *dev) {
close(dev->drm_fd);
}
wlr_drm_format_set_finish(&dev->dmabuf_render_formats);
wlr_drm_format_set_finish(&dev->dmabuf_texture_formats);
for (int i = 0; i < WLR_VK_IMAGE_USAGE_COUNT; i++) {
wlr_drm_format_set_finish(&dev->dmabuf_formats[i]);
}
for (unsigned i = 0u; i < dev->format_prop_count; ++i) {
vulkan_format_props_finish(&dev->format_props[i]);