anv/wsi/wayland: Advertise sRGB
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 1 Feb 2016 21:06:21 +0000 (13:06 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 1 Feb 2016 21:06:35 +0000 (13:06 -0800)
src/vulkan/anv_wsi_wayland.c

index 815218ecc6905b8f53b418bdd25328909e0179f6..31d5f836a9fe22adad54023972a914ac90250dd2 100644 (file)
@@ -103,9 +103,9 @@ wl_drm_format_for_vk_format(VkFormat vk_format, bool alpha)
    case VK_FORMAT_B5G5R5A1_UNORM:
       return alpha ? WL_DRM_FORMAT_XRGB1555 : WL_DRM_FORMAT_XRGB1555;
 #endif
-   case VK_FORMAT_B8G8R8_UNORM:
+   case VK_FORMAT_B8G8R8_SRGB:
       return WL_DRM_FORMAT_BGRX8888;
-   case VK_FORMAT_B8G8R8A8_UNORM:
+   case VK_FORMAT_B8G8R8A8_SRGB:
       return alpha ? WL_DRM_FORMAT_ARGB8888 : WL_DRM_FORMAT_XRGB8888;
 #if 0
    case VK_FORMAT_B10G10R10A2_UNORM:
@@ -159,10 +159,10 @@ drm_handle_format(void *data, struct wl_drm *drm, uint32_t wl_format)
       break;
 #endif
    case WL_DRM_FORMAT_XRGB8888:
-      wsi_wl_display_add_vk_format(display, VK_FORMAT_B8G8R8_UNORM);
+      wsi_wl_display_add_vk_format(display, VK_FORMAT_B8G8R8_SRGB);
       /* fallthrough */
    case WL_DRM_FORMAT_ARGB8888:
-      wsi_wl_display_add_vk_format(display, VK_FORMAT_B8G8R8A8_UNORM);
+      wsi_wl_display_add_vk_format(display, VK_FORMAT_B8G8R8A8_SRGB);
       break;
 #if 0
    case WL_DRM_FORMAT_ARGB2101010: