Konstantin Seurer
70489edce4
vulkan: Common trace capturing infrastructure
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20573 >
2023-06-27 06:25:56 +00:00
Faith Ekstrand
b4497e54be
vulkan: Provide wrappers for VK_EXT_map_memory2 functions
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Iván Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22031 >
2023-03-20 23:11:09 +00:00
Constantine Shablya
723825f5c7
vulkan: use vk_features for vk_device::enabled_features
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21754 >
2023-03-16 08:23:28 +00:00
Mohamed Ahmed
10a4412966
vulkan/runtime: move common buffer related entrypoints to vk_buffer.c
...
Signed-off-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21898 >
2023-03-15 00:30:35 +00:00
Faith Ekstrand
15e332073c
Revert "vk/runtime: turn vk.xml extension requirements into asserts"
...
This reverts commit 6ac830ccb1 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21225 >
2023-02-17 03:42:34 +00:00
Eric Engestrom
6ac830ccb1
vk/runtime: turn vk.xml extension requirements into asserts
...
More specifically, turn
<extension name="VK_KHR_foo" requires="VK_KHR_bar">
into
assert(!ext->KHR_foo || ext->KHR_bar);
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21261 >
2023-02-14 23:28:29 +00:00
Konstantin Seurer
2d738803b5
vulkan: Track the nullDescriptor feature
...
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20539 >
2023-01-15 21:30:21 +00:00
Friedrich Vock
defed48104
vulkan: Add common RMV tracing infrastructure
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17331 >
2023-01-11 06:55:04 +00:00
Konstantin Seurer
b0e55c4d60
vulkan: Allow passing NULL dispatch tables to vk_device_init
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20439 >
2023-01-02 14:39:23 +00:00
Rebecca Mckeever
83400af043
vulkan/runtime: Add VK_KHR_device_group provided entrypoints
...
Add entrypoints vk_common_CmdDispatch, vk_common_CmdSetDeviceMask,
and vk_common_GetDeviceGroupPeerMemoryFeatures in Mesa Vulkan runtime so
that they are available to all drivers.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20218 >
2022-12-09 14:06:14 -06:00
Eric Engestrom
c6c5949ff7
vk/runtime: drop incorrect UNUSED annotation
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458 >
2022-11-03 14:16:11 +01:00
Illia Abernikhin
aa4ac5ff8b
utils: Merge util/debug.* into util/u_debug.* and remove util/debug.*
...
Rename env_var_as_unsigned() -> debug_get_num_option(), because duplicate
Rename env_var_as_bool() -> debug_get_bool_option(), because duplicate
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7177
Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19336 >
2022-11-02 07:25:39 +00:00
Jason Ekstrand
10485ee415
vulkan: Record more enabled robustness features
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18690 >
2022-09-20 23:53:51 +00:00
Igor Torrente
8c73b37e59
vulkan: Add vk_clock_gettime and vk_time_max_deviation
...
These two new function are based on {anv,radv}_clock_gettime
and some other common code between radv and anv.
These new functions allow these drivers to share code and
more drivers can use it in the future.
v2: Drop the anv/radv changes in this commit (Yiwei Zhang)
v3: Add #ifndef _WIN32
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com > (v1)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com > (v1)
Signed-off-by: Igor Torrente <igor.torrente@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18281 >
2022-09-02 00:54:24 +00:00
Chad Versace
d46a78e74e
vulkan: Make vk_copy_struct_guts() public
...
Venus wants to copy struct guts too.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18000 >
2022-08-30 08:09:55 +00:00
Eric Engestrom
c3d8395a14
vulkan/runtime: use updated tokens from vk.xml
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17342 >
2022-07-12 15:53:11 +00:00
Boris Brezillon
b78d3ebe72
vulkan/util: Fill VkPhysicalDeviceIDProperties::deviceNodeMask
...
This field copy was missing in
vk_get_physical_device_core_1_1_property_ext().
Fixes: 19ff5019b7 ("vulkan: Add helpers for filling exts for core features and properties.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Jason Ekstrand
6899cd2b6e
vulkan: Start collecting enabled features in vk_device
...
We're not trying to make this 100% complete. For now, all we care about
is robustBufferAccess.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16276 >
2022-05-12 10:53:16 +00:00
Jason Ekstrand
51077e821a
vulkan: Allow the driver to manually enable threaded submit
...
This is useful for drivers that wish to be able to block inside their
vk_queue::driver_submit hook.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Jason Ekstrand
08512aea09
vulkan: Replace various uses of device->timeline_mode
...
What we really care about is if we're DEFERRED so we need to do a flush
and if there can be any other threads we might race against. We don't
really care about the timeline mode itself.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Jason Ekstrand
e0ffdc8ce0
vulkan/queue: Rework submit thread enabling
...
Now that we have a threading mode in the device, we can set that based
on the environment variable instead of delaying it to submit time. This
allows us to avoid the static variable trickery we use to avoid reading
environment variables over and over again. We also move the enabling of
the submit thread up a level or two and give it a bit more obvious
condition.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Jason Ekstrand
9ddab162b7
vulkan/queue: Add a submit mode enum
...
This encapsulates all three possible submit modes: immediate, deferred,
and threaded. It's more clear than the has_thread boolean combined with
device-level checks.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Jason Ekstrand
cc8eb6f5df
vulkan/runtime: Implement 1.3 features/properties
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14707 >
2022-01-25 15:57:53 +00:00
Jason Ekstrand
7b19c9d19b
vulkan/device: Log the timeline mode when lost
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427 >
2021-11-16 10:54:27 -06:00
Jason Ekstrand
9bffd81f1c
vulkan: Add common implementations of vkQueueSubmit and vkQueueWaitIdle
...
This adds a new vk_queue_submit object which contains a list of command
buffers as well as wait and signal operations along with a driver hook
which takes a vk_queue and a vk_queue_submit and does the actual submit.
The common code then handles spawning a submit thread if needed, waiting
for timeline points to materialize, dealing with timeline semaphore
emulation via vk_timeline, etc. All the driver sees are vk_queue.submit
calls with fully materialized vk_sync objects which it can wait on
unconditionally.
This implementation takes a page from RADV's book and only ever spawns
the submit thread if it sees a timeline wait on a time point that has
not yet materialized. If this never happens, it calls vk_queue.submit
directly from vkQueueSubmit() and the thread is never spawned.
One other nicety of the new framework is that there is no longer a
distinction, from the driver's PoV, between fences and semaphores. The
fence, if any, is included as just one more signal operation on the
final vk_queue_submit in the batch.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427 >
2021-11-16 10:54:27 -06:00
Jason Ekstrand
fdb636e3a6
vulkan/vk_device: Add a drm_fd field
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427 >
2021-11-16 10:02:08 -06:00
Jason Ekstrand
dd89ef96d7
vulkan: Pull the device lost framework from ANV
...
It's a bit on the over-complicated side but the objective is to make the
debug log messages show up in the same thread as the first
VK_ERROR_DEVICE_LOST so we don't massively confuse the app. It's
unknown if this is actually ever a problem but, with submit happening
off on its own thread, logging errors from threads the client doesn't
know about doesn't seem like a massively great plan.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427 >
2021-11-16 10:02:08 -06:00
Jason Ekstrand
4108fda426
vulkan: Move all the common object code to runtime/
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156 >
2021-10-29 23:12:32 +00:00