Commit Graph

10 Commits

Author SHA1 Message Date
Jason Ekstrand
a1db0e87ff 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>
2016-10-06 16:52:31 -07:00
Kevin Strasser
71258e9462 anv/x11: Add support for Xlib platform
Some applications continue to use the Xlib client library and expect that
VK_KHR_xlib_surface will be available in the driver. Service these
applications by converting the Display pointer to xcb_connection_t and use
the existing xcb code in the driver.

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-08-15 09:47:06 -07:00
Lionel Landwerlin
dbbc4fb4cc anv/wsi: create swapchain images using specified image usage
The image usage specified by the caller of vkCreateSwapchainKHR should be
passed onto the internal image creation. Otherwise the driver might later
crash when the user tries to use the image as a combined sampler even though
the creation was explicitly created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT.

Leaving the previous VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT as this might be
expected even if the swapchain is created without any flag.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96791
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
2016-07-04 10:15:48 -07:00
Jason Ekstrand
be94a23b44 anv/wsi: Use vk_format_info for asserts rather than anv_format 2016-05-17 12:17:22 -07:00
Jason Ekstrand
eb6baa3174 anv/wsi: Make WSI per-physical-device rather than per-instance
This better maps to the Vulkan object model and also allows WSI to at least
know the hardware generation which is useful for format checks.
2016-05-17 12:17:22 -07:00
Jason Ekstrand
753ebe4457 anv/x11: Reset the SHM fence before presenting the pixmap
This seems to fix the flicker issue that I was seeing with dota2
2016-03-11 17:22:46 -08:00
Kristian Høgsberg Kristensen
9bff5266be anv/x11: Add present support
The old DRI3 implementation just used CopyArea instead of present.  We
still don't support all the MST fancyness, but it should at least avoid
some copies and allow for.

v2 (Jason Ekstrand):
   - Better object cleanup and destruction
   - Handle the CONFIGURE_NOTIFY event and return OUT_OF_DATE when needed
   - Track dirtyness via IDLE_NOTIFY rather than interating through the
     images sequentially
2016-03-11 16:54:17 -08:00
Jason Ekstrand
e920b184e9 anv/x11: Split image creation into a helper function
This lets us clean up error handling and make it correct.
2016-03-11 12:28:34 -08:00
Kristian Høgsberg Kristensen
353d5bf286 anv/x11: Free swapchain images and memory on destroy 2016-02-22 16:23:47 -08:00
Jason Ekstrand
9851c8285f Move the intel vulkan driver to src/intel/vulkan 2016-02-18 10:37:59 -08:00