aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* vulkan: Update Vulkan XML and headers to 1.2.140Joshua Ashton2020-05-051-20/+152
| | | | | | | Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4878>
* vulkan/wsi: Make wsi_swapchain inherit from vk_object_baseJason Ekstrand2020-05-044-26/+19
| | | | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
* vulkan: Add run-time object type asserts in handle castsJason Ekstrand2020-05-042-2/+22
| | | | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
* vulkan,anv: Move the DEFINE_HANDLE_CASTS macros to vk_object.hJason Ekstrand2020-05-041-0/+31
| | | | | | | | | | | | | | | | | | We've already got these duplicated a bunch of places. They should really probably live in common code. The new versions take two more arguments: 1. The struct member which gets you from __driver_type to the vk_object_base. This requires drivers which use this to also use vk_object_base. 2. The VkObjectType enum which represents that object type. Reviewed-by: Lionel Landwerlin <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
* vulkan,anv: Add a base object struct typeJason Ekstrand2020-05-042-2/+28
| | | | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
* vulkan,anv: Add a common base object type for VkDeviceJason Ekstrand2020-05-044-0/+96
| | | | | | | | | | | | We should keep this very minimal; I don't know that we need to go all struct gl_context on it. However, this gives us at least a tiny base on which we can start building some common functionality. Reviewed-by: Lionel Landwerlin <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
* vulkan: Allow destroying NULL debug report callbacksJason Ekstrand2020-05-041-0/+3
| | | | | | | | | Fixes: 086cfa5652 "anv: implementation of VK_EXT_debug_report extension" Reviewed-by: Lionel Landwerlin <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4690>
* vulkan: Update Vulkan XML and headers to 1.2.139Jason Ekstrand2020-04-281-415/+1213
| | | | | Acked-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4767>
* vulkan: add initial device selection layer. (v6.1)Dave Airlie2020-04-277-0/+869
| | | | | | | | | | | | | | This is code Bas has out of tree but I think mesa should be shipping it, and I've improved it. Initially-written-by: Bas Nieuwenhuizen <[email protected]> v2: add infinite recursion fix (Bas) v3: Fix wayland/xcb barrier, whitespace v4: use a macro for getting apis, shorten some lines, use outarray v5: rewrite in C, use hash_table/mutex. v6: use once_init to init the mutex, fix freeing ht Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1766>
* vulkan/wsi: Add callback to set ownership of buffer.Bas Nieuwenhuizen2020-04-272-0/+26
| | | | | | | | For radv BO list pruning. Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4306>
* vulkan: drop unused include directoriesEric Engestrom2020-03-283-3/+3
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* meson: inline `inc_common`Eric Engestrom2020-03-283-3/+3
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* vulkan/overlay: Add a workaround semaphore for application presenting ↵Lionel Landwerlin2020-03-251-19/+53
| | | | | | | | | | | | | | without one When an application calls vkQueuePresent() on a different queue than the one we run our drawing on and it doesn't give a semaphore to wait on, let's insert our own semaphore so that we don't race the application's drawing. Signed-off-by: Lionel Landwerlin <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2540 Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3893> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3893>
* vulkan/wsi: fix cleanup when dup() failsEric Engestrom2020-03-101-1/+1
| | | | | | | | Fixes: f5433e4d6ce247b86dae ("vulkan/wsi: Add modifiers support to wsi_create_native_image") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4137> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4137>
* vulkan/wsi: Return an error if dup() failsJason Ekstrand2020-03-101-0/+1
| | | | | | | Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4135> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4135>
* vulkan/wsi: Don't leak the FD when GetImageDrmFormatModifierProperties failsJason Ekstrand2020-03-101-1/+3
| | | | | | Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4135>
* util/format: add missing BC4/BC5 vulkan formatsJonathan Marek2020-02-281-0/+4
| | | | | | | | Enables these formats for turnip. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3806>
* vulkan: Update the XML and headers to 1.2.133Jason Ekstrand2020-02-181-8/+16
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3856>
* Vulkan overlay: use the corresponding image index for each swapchainGeorg Lehmann2020-02-101-3/+8
| | | | | | | | | | pImageIndices should be a pointer to the current image index otherwise every swapchain but the first one could have a wrong image index Cc: <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3741> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3741>
* Vulkan Overlay: Don't try to change the image layout to present twiceGeorg Lehmann2020-02-071-22/+27
| | | | | | | | | | The render pass already does the transition. The pipeline barrier is still needed to transfer the queue family ownership. Fixes: 320b0f66c274 ("vulkan/overlay: bounce image back to present layout") Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3740> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3740>
* Correctly wait in the fragment stage until all semaphores are signaledGeorg Lehmann2020-02-061-2/+10
| | | | | | | | | | | This fixes two issues: - a crash if the application uses more than one semaphore for presenting because the driver expects one stage per semaphore - the swapchain image could be not ready yet if the semaphores aren't signaled, #946 is possible related Cc: <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3718> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3718>
* vulkan/wsi: Fix compiler warning when no WSI platforms are enabled.Eric Anholt2020-01-281-2/+5
| | | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3539>
* vulkan/wsi: remove unused image_get_modifierJonathan Marek2020-01-231-2/+0
| | | | | | | Signed-off-by: Jonathan Marek <[email protected]> Acked-by: Eric Anholt <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3485>
* vulkan/wsi: Implement VK_KHR_swapchain_mutable_formatJason Ekstrand2020-01-171-1/+32
| | | | | | | | | | This is only the core WSI code for the extension. It adds the image format list and the flags to vkCreateImage as well as handling things properly in the modifier queries. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3434>
* vulkan/wsi: Filter modifiers with ImageFormatPropertiesJason Ekstrand2020-01-172-1/+34
| | | | | | | | | | Just because a modifier is returned for the given format, that doesn't mean it works with all usages and flags. We need to filter the list by calling vkGetPhysicalDeviceImageFormatProperties2. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3434>
* vulkan/wsi: Use the interface from the real modifiers extensionJason Ekstrand2020-01-172-39/+35
| | | | | | | | | | | The anv implementation still isn't quite complete, but we can at least start using the structs from the real extension. v2: Fix circular pNext list (Lionel) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3434>
* vulkan/wsi: Move the ImageCreateInfo higher upJason Ekstrand2020-01-171-21/+23
| | | | | | | | | Future changes will be easier if we can modify it based on whether or not we're using modifiers. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3434>
* vulkan/wsi: disable the hardware cursorAndres Rodriguez2020-01-171-0/+9
| | | | | | | | | | | | | | | | | Ensure the hardware cursor is disabled when we set the mode for a VkDisplayKHR object. The extension doesn't expose any mechanisms to program the hardware cursor, so we need to ensure it is hidden. Currently, it seems like X is responsible for disabling the cursor before handing over the lease. But that seems a little frail, and we should be disabling the cursor ourselves so it works correctly independently of how the lease was prepared for us. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1922> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1922>
* vulkan/overlay: Fix for Vulkan 1.2Samuel Pitoiset2020-01-151-10/+13
| | | | | | | | | v2 (Jason Ekstrand): - Add duplicate hooks for both the 1.2 and KHR versions of vkCmdDraw[Indexed]IndirectCount. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan: Update the XML and headers to 1.2.131Jason Ekstrand2020-01-151-398/+946
| | | | | Acked-by: Lionel Landwerlin <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* vulkan/wsi: Add a driconf option to force WSI to advertise BGRA8_UNORM firstJason Ekstrand2020-01-145-8/+74
| | | | | | | | | | | The Aztec Ruins benchmark just grabs the first format in the list and SRGB causes it to render washed out. With this workaround, it renders the same as OpenGL. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3350> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3350>
* android: util: Add a mapping from VkFormat to PIPE_FORMAT.Mauro Rossi2019-12-272-1/+3
| | | | | | | | | | | | | | | Updates Makefile.sources and fixes the following building error: In file included from external/mesa/src/vulkan/util/vk_format.c:24: In file included from external/mesa/src/vulkan/util/vk_format.h:28: external/mesa/src/util/format/u_format.h:33:10: fatal error: 'pipe/p_format.h' file not found #include "pipe/p_format.h" ^~~~~~~~~~~~~~~~~ 1 error generated. Fixes: 3a28281 ("util: Add a mapping from VkFormat to PIPE_FORMAT.") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* util/format: add missing vulkan formatsJonathan Marek2019-12-191-4/+27
| | | | | | | | | Add some missing vulkan formats to util/format, this solves all the missing pipe format cases for the formats that turnip supports. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3170>
* vulkan/wsi: error out when image fence doesn't signalLionel Landwerlin2019-12-161-3/+9
| | | | | | | | | | | | | If for some reason the fence associated with an image doesn't signal, we're likely in a device lost scenario, we should report that error. We can't really wait for a given amount of time because we could get a timeout and that is not a valid error to report for vkQueuePresentKHR, so just wait forever. Signed-off-by: Lionel Landwerlin <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/830 Reviewed-by: Tapani Pälli <[email protected]>
* vulkan/overlay: Update docs.Rafael Antognolli2019-12-131-0/+35
| | | | | | Add mention to overlay control socket. Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: Add basic overlay control script.Rafael Antognolli2019-12-132-0/+210
| | | | | | | | | | This can be used to start/stop statistics capturing from the command line. v3: - Install script (Lionel) Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: Add a command to start capturing data to a file.Rafael Antognolli2019-12-131-3/+44
| | | | | | | | | | | | | By default, if an output_file is specified, the overlay layer will start capturing data immediately. After this commit, when a control socket is used, the capture starts disabled by default, and is only enabled when a command ":capture=1;" is received. when the capture is enabled, we might have already accumulated some stats. To avoid capturing such noise, we discard and reset the fps and stats, updating the display and capturing only data from that point on. Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: Add support for a control socket.Rafael Antognolli2019-12-131-0/+198
| | | | | | | | | Add support for socket from which the overlay layer can receive commands. This control socket can be useful to allow setting options once the application is already running. For instance, triggering the capture of fps data at a certain point. Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: Add a control socket.Rafael Antognolli2019-12-133-0/+25
| | | | | | v2: Use a socket instead of named pipe. Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/wsi: Add a hooks for signaling semaphores and fencesJason Ekstrand2019-12-062-1/+38
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/wsi: Provide the implicitly synchronized BO to vkQueueSubmitJason Ekstrand2019-12-062-3/+19
| | | | | | | | | | | | | This lets us treat the implicit synchronization that we need for X11 and Wayland like a semaphore. Instead of trusting the driver to somehow figure out when that memory object needs to be signaled, we provide an explicit point where the driver can set EXEC_OBJECT_WRITE and signal the dma_fence on the BO. Without this, we have to somehow track inside the driver when WSI buffers are actually used to avoid extra synchronization dependencies. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan: Update the XML and headers to 1.1.129Jason Ekstrand2019-11-261-48/+273
| | | | Acked-by: Lionel Landwerlin <[email protected]>
* vulkan/enum_to_str: Handle out-of-order aliasesJason Ekstrand2019-11-261-3/+21
| | | | | | | | | The current code can only handle enum aliases if the original enum is declared first followed by the alias as we walk the XML in a linear fashion. This commit allows us to handle aliases where the alias declaration comes before the thing it's aliasing. Reviewed-by: Lionel Landwerlin <[email protected]>
* meson: only build imgui when neededSamuel Pitoiset2019-11-251-1/+1
| | | | | | | Only required for Intel tools or the Vulkan overlay layer. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vk_util: drop duplicate formats in vk_format_map[]Eric Engestrom2019-11-211-2/+0
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: add missing R8G8B8A8_SRGB format to vk_format_mapJonathan Marek2019-11-211-0/+1
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* util: Add a mapping from VkFormat to PIPE_FORMAT.Eric Anholt2019-11-193-0/+262
| | | | | | | I'm planning on using this from radv and tu for queries about formats. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* vulkan: bump headers/registry to 1.1.127Lionel Landwerlin2019-11-041-4/+49
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* util: rename list_empty() to list_is_empty()Timothy Arceri2019-10-282-3/+3
| | | | | | | This makes it clear that it's a boolean test and not an action (eg. "empty the list"). Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_INITHEAD macroTimothy Arceri2019-10-281-1/+1
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>