vulkan/device_select: don't pick a cpu driver as the default This should stop apps using vallium by accident, when there are better options. Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6552>
vulkan/wsi/x11: wait for acquirable images in FIFO mode In FIFO presentation mode we block either on our present-queue or on Present events after an image was transmitted. In case we receive completion events without idle events at some point we exhaust our acquire-queue and can not block anymore on present-queue. Ensure that the consumer has at least one image to acquire before blocking again on present-queue. Otherwise wait for one from the X server. CC: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3344 Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Simon Ser <contact@emersion.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6513>
vulkan/wsi/x11: add sent image counter Add a counter to count how many images from our swapchain are currently "sent" to the X server via Present extension. An image is sent when it has been presented but we have not yet received an idle event for it. CC: mesa-stable Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Simon Ser <contact@emersion.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6513>
vulkan: Fix memory leaks. Fix warnings reported by Coverity Scan. Resource leak (RESOURCE_LEAK) leaked_storage: Variable info going out of scope leaks the storage it points to. Fixes: 9bc5b2d169d3 ("vulkan: add initial device selection layer. (v6.1)") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6509>
vulkan/wsi: add sw support. (v2) This adds an option to the WSI support for a software path to be used with the vulkan sw drivers. There is probably some changes that could be made to improve this and use present, for now just use put image. v2: roll out flag across all drivers (Eric) Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082>
aco: add framework for testing isel and integration tests And add some simple tests to demonstrate/test the pipeline builder and glsl_scraper.py. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Daniel Schürmann <daniel@schuermann.dev> Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3521>
vulkan/util: add struct vk_pipeline_cache_header Header is defined at vkGetPipelineCacheData spec, in any vulkan version, and anv, tu and radv were using the same struct, and v3dv was about to do the same. Defining the same struct four times seemed odd, so let's define on a common place. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Acked-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6058>
vulkan/wsi: Convert usage of -1 to UINT32_MAX. The integers are unsigned so they do the same but this makes it locally more clear what happened. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6071>
vulkan/wsi/x11: report device-group present rectangles with prime. dEQP-VK.wsi.xlib.surface.query_devgroup_present_modes with prime fail when 0 rectangles are reported. While I believe that test tests this unintentionally (trying to test the VK_INCOMPLETE return), I believe it makes sense to always return a rectangle. In particular we require the data from the given rectangle for presentation even if we use prime and given that prime is completely transparent for the app it still counts as local from the perspective as the application. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6071>
meson: fix android vulkan build Android doesn't have `pthread_cancel()` and is unlikely to ever implement it [1], but `wsi_common_display.c` needs it (or an alternative). Let's just disable the platform on Android (as it used to be before 448eb19158f483d807ef). [1] https://android-review.googlesource.com/c/platform/bionic/+/1215779/1/docs/status.md Fixes: 448eb19158f483d807ef ("vulkan: automatically compile the `display` platform when available") Signed-off-by: Eric Engestrom <eric@engestrom.ch> Acked-by: Nataraj Deshpande <nataraj.deshpande@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5860>
vulkan: automatically compile the `display` platform when available Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
vulkan/wsi: Don't consider VK_SUBOPTIMAL_KHR to be an error condition This was causing vkAcquireNextImageKHR to not signal the fences and semaphores. In the case where the semaphore was brand new, this could cause an unsignalled syncobj to be passed into execbuffer2 which it will reject with -EINVAL leading to VK_ERROR_DEVICE_LOST. Thanks to Henrik Rydgård who works on the PPSSPP project for helping me figure this out. Fixes: ca3cfbf6f1e00 "vk: Add an initial implementation of the actual..." Fixes: 778b51f491cfe "vulkan/wsi: Add a hooks for signaling semaphores..." Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5672>