render: unify getter for texture formats

Instead of having separate getters for shm formats and DMA-BUF
formats, use the same pattern as wlr_output_impl.get_primary_formats
with a single function which takes buffer caps as input.
This commit is contained in:
Simon Ser 2024-04-12 11:27:57 +02:00 committed by Kenny Levinsen
parent c63275d75e
commit 85c1eda721
12 changed files with 78 additions and 67 deletions

View file

@ -536,8 +536,8 @@ void vulkan_format_props_query(struct wlr_vk_device *dev,
props.shm.features = fmtp.formatProperties.optimalTilingFeatures;
props.shm.has_mutable_srgb = has_mutable_srgb;
dev->shm_formats[dev->shm_format_count] = format->drm;
++dev->shm_format_count;
wlr_drm_format_set_add(&dev->shm_texture_formats,
format->drm, DRM_FORMAT_MOD_LINEAR);
add_fmt_props = true;
}