mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
vulkan/wsi/wayland: use enum wl_shm_format
libwayland defines an enum for wl_shm formats. Let's use it instead of uint32_t. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14634>
This commit is contained in:
parent
bbe97c3871
commit
fda2aecb8b
1 changed files with 5 additions and 3 deletions
|
|
@ -352,7 +352,7 @@ wsi_wl_display_add_drm_format_modifier(struct wsi_wl_display *display,
|
||||||
static void
|
static void
|
||||||
wsi_wl_display_add_wl_shm_format(struct wsi_wl_display *display,
|
wsi_wl_display_add_wl_shm_format(struct wsi_wl_display *display,
|
||||||
struct u_vector *formats,
|
struct u_vector *formats,
|
||||||
uint32_t wl_shm_format)
|
enum wl_shm_format wl_shm_format)
|
||||||
{
|
{
|
||||||
switch (wl_shm_format) {
|
switch (wl_shm_format) {
|
||||||
case WL_SHM_FORMAT_XBGR8888:
|
case WL_SHM_FORMAT_XBGR8888:
|
||||||
|
|
@ -399,6 +399,8 @@ wsi_wl_display_add_wl_shm_format(struct wsi_wl_display *display,
|
||||||
VK_FORMAT_B8G8R8A8_UNORM,
|
VK_FORMAT_B8G8R8A8_UNORM,
|
||||||
true, false);
|
true, false);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break; /* Ignore */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -451,7 +453,7 @@ wl_drm_format_for_vk_format(VkFormat vk_format, bool alpha)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
static enum wl_shm_format
|
||||||
wl_shm_format_for_vk_format(VkFormat vk_format, bool alpha)
|
wl_shm_format_for_vk_format(VkFormat vk_format, bool alpha)
|
||||||
{
|
{
|
||||||
switch (vk_format) {
|
switch (vk_format) {
|
||||||
|
|
@ -953,7 +955,7 @@ struct wsi_wl_swapchain {
|
||||||
VkExtent2D extent;
|
VkExtent2D extent;
|
||||||
VkFormat vk_format;
|
VkFormat vk_format;
|
||||||
uint32_t drm_format;
|
uint32_t drm_format;
|
||||||
uint32_t shm_format;
|
enum wl_shm_format shm_format;
|
||||||
|
|
||||||
uint32_t num_drm_modifiers;
|
uint32_t num_drm_modifiers;
|
||||||
const uint64_t * drm_modifiers;
|
const uint64_t * drm_modifiers;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue