aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* vulkan: Update the XML and headers to 1.1.125Caio Marcelo de Oliveira Filho2019-10-141-5/+11
| | | | Acked-by: Jason Ekstrand <[email protected]>
* vulkan: Update the XML and headers to 1.1.124Caio Marcelo de Oliveira Filho2019-10-071-8/+119
| | | | Acked-by: Lionel Landwerlin <[email protected]>
* vulkan: Update the XML and headers to 1.1.123Jason Ekstrand2019-09-171-42/+64
| | | | Acked-by: Caio Marcelo de Oliveira Filho <[email protected]>
* vulkan: add vk_x11_strict_image_count optionLionel Landwerlin2019-09-152-1/+12
| | | | | | | | | | | | | | | | | | This option strictly allocate the minImageCount given by the application at swapchain creation. This works around application that do not deal with the fact that the implementation allocates more images than the minimum specified. v2: Add values in default drirc (Bas) v3: specify engine name/version (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111522 Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Cc: 19.2 <[email protected]>
* wsi: add minImageCount overrideEric Engestrom2019-09-064-3/+22
| | | | | | | Cc: [email protected] Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> (v1) Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/overlay: bounce image back to present layoutLionel Landwerlin2019-09-031-2/+30
| | | | | | | | | | Once we write the overlay to an image to be presented, we must not forget to put it back into present layout. Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111401 Cc: <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vulkan: Update the XML and headers to 1.1.119Jason Ekstrand2019-08-121-13/+162
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* meson: replace last uses of libxmlconfig with idep_xmlconfigEric Engestrom2019-08-031-2/+1
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* meson: replace libmesa_util with idep_mesautilEric Engestrom2019-08-031-2/+1
| | | | | | | | | | | This automates the include_directories and dependencies tracking so that all users of libmesa_util don't need to add them manually. Next commit will remove the ones that were only added for that reason. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* vulkan: Bump headers to 1.1.117Lionel Landwerlin2019-07-291-21/+145
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan/wsi/wayland: implement acquire timeoutLionel Landwerlin2019-07-291-25/+51
| | | | | | | | | | | | | | | v2: Eric's nits v3: Reuse timespec utils (Daniel) Deal with ppoll being interrupted by a signal (Daniel) v4: Remove unnecessary time check v5: Deal with EAGAIN from wl_display_prepare_read_queue() (Daniel) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v2) Reviewed-by: Daniel Stone <[email protected]>
* vulkan/wsi/x11: Increase the effective min. images for mailbox.Bas Nieuwenhuizen2019-07-261-2/+5
| | | | | | | | | | | We need 5 images: 1) CPU work 2) GPU work 3) idle 4) queued for flip 5) presenting Reviewed-by: Lionel Landwerlin <[email protected]>
* vulkan/wsi/x11: Wait for GPU work before present with mailbox.Bas Nieuwenhuizen2019-07-261-1/+12
| | | | | | | | | | | | Otherwise the wait only happens at flip time, which messes with keeping idle buffers around if the GPU work makes the image miss the next flip. I decided not to use the wait fences as those are still xshm fences, so that means we'd still have to wait in the application. Just doing it before presenting makes things simpler. Reviewed-by: Lionel Landwerlin <[email protected]>