summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_wsi.c
Commit message (Collapse)AuthorAgeFilesLines
* anv: Handle null in all destructorsJason Ekstrand2016-11-241-0/+6
| | | | | | | | | | | | | | | | This fixes a bunch of new CTS tests which look for exactly this. Even in the cases where we just call vk_free to free a CPU data structure, we still handle NULL explicitly. This way we're less likely to forget to handle NULL later should we actually do something less trivial. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 49f08ad77f51cc344e4bfe60ba9f8d9fccfbd753) [Emil Velikov: color_rt_surface_state is still around] Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Conflicts: src/intel/vulkan/anv_image.c
* anv: Rework fencesJason Ekstrand2016-11-231-1/+1
| | | | | | | | | | | | | | | | Our previous fence implementation was very simple. Fences had two states: signaled and unsignaled. However, this didn't properly handle all of the edge-cases that we need to handle. In order to handle the case where the client calls vkGetFenceStatus on a fence that has not yet been submitted via vkQueueSubmit, we need a three-status system. In order to handle the case where the client calls vkWaitForFences on fences which have not yet been submitted, we need more complex logic and a condition variable. It's rather annoying but, so long as the client doesn't do that, we should still hit the fast path and use i915_gem_wait to do all our waiting. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Cc: "13.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 843775bab78a6b4d5cb4f02bd95d9d0e95c1c5e3)
* anv/wsi: Set the fence to signaled in AcquireNextImageKHRJason Ekstrand2016-11-231-3/+10
| | | | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Chad Versace <chadversary@chromium.org> Cc: "13.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 73701be667ae408772bf20cb504b70d1775d4a4b)
* anv/wsi: remove all anv references from WSI common codeDave Airlie2016-10-191-19/+19
| | | | | | the WSI code should be now be clean for sharing. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: move common wsi code to x11/wayland common files.Dave Airlie2016-10-191-1/+2
| | | | | | | Next task is to rename all the anv_ out of this, and move to a common location Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/wayland: add callback to get device format properties.Dave Airlie2016-10-191-1/+7
| | | | | | This avoids having to know the toplevel API name. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/wl: stop using device in more placesDave Airlie2016-10-191-2/+3
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: move further away from passing anv displays aroundDave Airlie2016-10-191-9/+19
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: split image alloc/free out to separate fns.Dave Airlie2016-10-191-2/+119
| | | | | | | This moves these outside the wsi platform code, so we can reuse that code Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: switch to using VkDevice in swapchainDave Airlie2016-10-191-1/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: drop device from get formatDave Airlie2016-10-191-1/+1
| | | | | | Just use the wsi_device instead. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: remove device from get_support interfaceDave Airlie2016-10-191-1/+3
| | | | | | replace with wsi_device and allocator. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi/x11: push anv_device out of the init/finish routinesDave Airlie2016-10-191-3/+3
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: abstract wsi interfaces away from device a bit more.Dave Airlie2016-10-191-6/+6
| | | | | | This is a step towards separating out the wsi code for sharing Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: drop device from get capsDave Airlie2016-10-191-1/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: drop get present modes device argDave Airlie2016-10-191-1/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* radv/anv/wsi: drop unneeded parameterDave Airlie2016-10-191-1/+1
| | | | Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: move to using vk_alloc helpers.Dave Airlie2016-10-191-1/+1
| | | | | | | This moves all the alloc/free in anv to the generic helpers. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* anv: resolve wayland-only buildEmil Velikov2016-05-301-0/+2
| | | | | | | | | | | Ensure that the final X11/XCB hunk is guarded by the correct macro. Otherwise we'll require the symbol even when building without said platform. Cc: Cedric Sodhi <manday@openmail.cc> Reported-by: Cedric Sodhi <manday@openmail.cc> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: Make WSI per-physical-device rather than per-instanceJason Ekstrand2016-05-171-12/+15
| | | | | 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.
* anv: factor out the X11/XCB buildEmil Velikov2016-05-011-0/+4
| | | | | | | | | | | Similar to earlier commit - move all the common bits into a single place, thus improving readability and allowing us to see what's missing. Also don't forget to add the missing bits. This commit should allows us to build wayland only vulkan ;-) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: kill of custom define HAVE_WAYLAND_PLATFORMEmil Velikov2016-05-011-2/+2
| | | | | | | Vulkan API already has equivalent, so simplify things as just use it. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
* anv/wsi: Throttle rendering to no more than 2 frames aheadJason Ekstrand2016-03-111-0/+38
| | | | | | | | Right now, Vulkan apps can pretty easily DOS the GPU by simply submitting a lot of batches. This commit makes us wait until the rendering for earlier frames is comlete before continuing. By waiting 2 frames out, we can still keep the pipe reasonably full but without taking the entire system down. This is similar to what the GL driver does today.
* Move the intel vulkan driver to src/intel/vulkanJason Ekstrand2016-02-181-0/+196