aboutsummaryrefslogtreecommitdiffstats
path: root/src/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* Switch from cElementTree to ElementTree.Vinson Lee2020-06-053-3/+3
| | | | | | | | | | | | | | The xml.etree.cElementTree module will be removed in Python 3.9. Since Python 3.3 the xml.etree.cElementTree module has been deprecated, the xml.etree.ElementTree module uses a fast implementation whenever available. Builds using Python 2.7 can still work but with the slower implementation. Signed-off-by: Vinson Lee <[email protected]> Acked-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5349>
* vulkan-overlay/meson: use install_data instead of configure_fileDylan Baker2020-06-011-5/+4
| | | | | | | | | | | | | We don't want to copy the file into the build directory, we want to install it. That's what install_data is for. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2924 Fixes: 56ccea58ae7f6fd56cf4a1697d2cceb68866b552 ("vulkan/overlay: Add basic overlay control script.") Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-014-5/+9
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* util/format: Add more multi-planar formats.Bas Nieuwenhuizen2020-05-301-0/+16
| | | | | | | | These don't have a fourcc code as far as I can tell, but we want them for internal Vulkan use. Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195>
* util/format: Use correct pipe format for VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM.Bas Nieuwenhuizen2020-05-301-1/+1
| | | | | | | | | | | | | | NV12 is UVUVUV (https://wiki.videolan.org/YUV#NV12) and in Vulkan is VK_FORMAT_G8_B8R8_2PLANE_420_UNORM. So U=B and V=R. So plane order in VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM is YUV, which is PIPE_FORMAT_IYUV. Further confirmation: https://fourcc.org/yuv.php U=Cb V=Cr. From the nir ycbcr conversion, B=Cb and R=Cr. Fixes: 75d7ee80291 "util/format: translate 422_UNORM and 420_UNORM vulkan formats" Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195>
* util/format: Add VK_FORMAT_D16_UNORM_S8_UINT.Bas Nieuwenhuizen2020-05-301-1/+1
| | | | | | | | Not participating in packing/unpacking/stencil-only/depth-only, because it doesn't mix well in a single plane. Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195>
* util/format: translate 422_UNORM and 420_UNORM vulkan formatsJonathan Marek2020-05-201-2/+14
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4590>
* vulkan: import common code for generating extensionsSamuel Pitoiset2020-05-132-0/+370
| | | | | | | | | | | ANV and RADV have similar Python code for generating extensions and dispatch tables. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4987>
* vulkan: Handle vkGet/SetPrivateDataEXT on Android swapchainsJason Ekstrand2020-05-122-9/+107
| | | | | | | | | | There is an annoying spec corner on Android. Because VkSwapchain is implemented in the Vulkan loader on Android which may not know about this extension, we have to handle it as a special case inside the driver. We only have to do this on Android and only for VkSwapchainKHR. Acked-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4882>
* anv,vulkan: Implement VK_EXT_private_dataJason Ekstrand2020-05-122-1/+123
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4882>
* vulkan/object: Always include the typeJason Ekstrand2020-05-082-4/+0
| | | | | | | | | | | | This was causing problems for some of the ANV unit tests when run in release mode. Having a public struct whose layout depends on NDEBUG seems kind-of sketchy anyway. Fixes: 32f20783a51 "vulkan: Add run-time object type asserts in..." Closes: #2903 Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4959>
* 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]>