summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_wsi_x11.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-10-05 13:23:22 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-10-06 16:52:31 -0700
commita1db0e87ffe8cbb567d0f7eb3a9036288eb1036c (patch)
treedcc17be049bf9e4e99d8d43b74a21b67c1496f22 /src/intel/vulkan/anv_wsi_x11.c
parent5267124648d8382038ce35304c5a8a4fa5c5d2b7 (diff)
downloadexternal_mesa3d-a1db0e87ffe8cbb567d0f7eb3a9036288eb1036c.tar.gz
external_mesa3d-a1db0e87ffe8cbb567d0f7eb3a9036288eb1036c.tar.bz2
external_mesa3d-a1db0e87ffe8cbb567d0f7eb3a9036288eb1036c.zip
anv/wsi: Advertise UNORM formats as well as sRGB
Because WSI images are created with VkImageCreateInfo::flags explicitly set to 0, they don't ever have the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT set. This means that you can't create an image view of it with a different format so applications can't render directly in sRGB (without automatic encoding) unless we actually advertise UNORM formats. There are a lot of applications that want to do their own sRGB conversion, so we should allow for that. We do, however, make UNORM come after sRGB in the list so that the default for dumb apps that just grab the first thing is to render in linear and let the sRGB conversion happen automatically. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/intel/vulkan/anv_wsi_x11.c')
-rw-r--r--src/intel/vulkan/anv_wsi_x11.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index 7c6ef97833..25c585f22c 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -123,6 +123,7 @@ wsi_x11_get_connection(struct anv_physical_device *device,
static const VkSurfaceFormatKHR formats[] = {
{ .format = VK_FORMAT_B8G8R8A8_SRGB, },
+ { .format = VK_FORMAT_B8G8R8A8_UNORM, },
};
static const VkPresentModeKHR present_modes[] = {