Constantine Shablya
efaf3fd5fc
vulkan: delete trailing namespace
...
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
Constantine Shablya
b0b3b9e8b1
vulkan: relocate rmv to its correct home
...
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
2649ee0724
vulkan/runtime: implement vkGetBufferMemoryRequirements2()
...
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
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
Konstantin Seurer
ef5cba56a0
vulkan: Add vk_shader_module_init
...
This will be used for allocating shader modules using ralloc by RADV.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21707 >
2023-03-12 13:18:15 +00:00
Rob Clark
8e7511ea7f
vk/runtime: Use libdrm shim
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21636 >
2023-03-05 16:31:51 +00:00
Lionel Landwerlin
4ee1908ab6
vulkan/runtime: only consider slice info with 3D image views
...
Because we can have 2D views of 3D images, we want to consider the
slice info only with 3D *image views*.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 66e3ccbcac ("vulkan/runtime: store parameters of VK_EXT_sliced_view_of_3d")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21376 >
2023-03-04 06:12:46 +00:00
Faith Ekstrand
3384e4f768
vulkan/runtime: Rename and document storage image Z range
...
This makes it more clear that the fields specifically apply to the Z
range and aren't array slices.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21376 >
2023-03-04 06:12:46 +00:00
Lionel Landwerlin
66e3ccbcac
vulkan/runtime: store parameters of VK_EXT_sliced_view_of_3d
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21514 >
2023-02-27 07:49:48 +00:00
Rob Clark
73dfcbf7e8
vk/runtime: Allow enumerate and try_create_for_drm to coexist
...
For drivers that can support both drm and non-drm kernel mode drivers it
is useful to be able to provide both entrypoints.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394 >
2023-02-25 17:02:34 +00:00
Iván Briano
6e60612d42
vulkan: track the right value on CmdSetColorWriteMasks
...
Fixes: 092be5a329 ("vulkan: Add more dynamic color blend states")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21509 >
2023-02-24 22:07:52 +00:00
Eric Engestrom
fbd644c59d
meson: replace vk_wsi_args with dependencies to let meson take care of transitivity
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19497 >
2023-02-23 09:42:46 +00:00
Konstantin Seurer
eb33a1adb0
vulkan: Add vk_acceleration_structure
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21047 >
2023-02-22 11:58:57 +00:00
Faith Ekstrand
5021344fa6
vulkan: Move the features generator to vulkan/util
...
This makes it easier to start depending on vk_extensions.py
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21225 >
2023-02-17 03:42:34 +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
Erik Faye-Lund
29ffc79410
meson: don't pass vk wsi args where they don't belong
...
Only code that cares about Vulkan WSI should get the corresponding
arguments passed. Otherwise, the Vulkan headers might end up including
other headers that we don't have the correct dependencies passed for.
So let's give those a dedicated variable, and only pass that where it's
actually needed.
Fixes: b39958a3a1 ("anv,nir: Move the ANV YCbCr lowering pass to common code")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8193
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185 >
2023-02-15 18:35:14 +00:00
Erik Faye-Lund
7ea85871fe
vulkan: prefer vulkan_core.h over vulkan.h
...
If we include vulkan.h, we risk including the WSI bits as well, which we
don't need here. Only trouble can follow from including these where
they're not needed.
So let's include vulkan_core.h in these places instead.
Fixes: b39958a3a1 ("anv,nir: Move the ANV YCbCr lowering pass to common code")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185 >
2023-02-15 18:35:14 +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
Eric Engestrom
a654a303f8
vk/runtime: keep track of supported instance extensions
...
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
Alyssa Rosenzweig
2854dca898
tu,vulkan: Add common Get*OpaqueCaptureDescriptorDataEXT
...
In both tu and radv, these are all trivial. Move the trivial implementation from
tu to common code to deduplicate the boilerplate.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by; Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21230 >
2023-02-13 07:43:11 +00:00
Konstantin Seurer
9104dafb6f
vulkan,nir: Refactor ycbcr conversion state into a struct
...
This will be useful for RADV since it hashes the state.
v3dv changes:
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20731 >
2023-02-06 18:36:29 +00:00
Hyunjun Ko
c489b3eadb
vulkan/runtime: match the spec when taking pipeline subsets.
...
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21006 >
2023-01-31 11:21:22 +00:00
Dave Airlie
41dbeca4c2
vulkan/video: add common h264/h265 parameter set management code.
...
The video session and video session parameters objects can have a common
base class the drivers can inherit from if needed.
This creates code to parse the h264/h265 parameter sets into common
structs.
v2: add h265 VPS, add a macro for FIND/ADD generations, changes the API
to make generation easier.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20389 >
2023-01-18 06:36:27 +00:00
Jason Ekstrand
1cc342f5e1
vulkan: Add a common vk_ycbcr_conversion struct
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19950 >
2023-01-16 14:10:21 +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
Lionel Landwerlin
662e05c9fb
vulkan/debug_utils: copy debug util labels
...
The copied structures currently can point to freed memory.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16655 >
2023-01-13 01:22:15 +00:00
Dave Airlie
3ec428bb32
vk_cmd_queue: add a callback to free push descriptors set khr
...
This should clean this up properly.
Fixes: eb7eccc76f ("lavapipe: Use generated command queue code")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20630 >
2023-01-12 01:46:26 +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
Chad Versace
0a256f79d4
vulkan/runtime: Preserve pNext when upgrading to synchronization2 structs
...
The functions that upgraded VkFooMemoryBarrier to VkFooMemoryBarrier2
dropped the pNext pointers. It loses VkSampleLocationsInfoEXT, and may
lose additional structs too if VkFooMemoryBarrier receives further
extensions in the future.
Signed-off-by: Chad Versace <chadversary@chromium.org >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20477 >
2023-01-03 17:20:30 +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
Dave Airlie
c90e5ddc71
vulkan: update headers/registry to 1.3.238 for video decode
...
This moves the video decoding to KHR and out of beta.
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Acked-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20384 >
2022-12-20 07:28:07 +10:00
Connor Abbott
b28899a261
vk/descriptor_set_layout: Add optional destructor
...
Drivers implementing descriptor buffers will want to allocate and free
descriptors with the layout for embedded samplers, so we need a hook to
allow them to free any GPU buffers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19849 >
2022-12-12 17:38:19 +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
Iván Briano
e1ab7629f8
vulkan: VkPolygonMode has a bit more than two values
...
Fixes: 9d0ed9cbcc ("vulkan: Add more dynamic rasterizer state")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20212 >
2022-12-08 00:40:11 +00:00
Konstantin Seurer
f89708c2c5
vulkan: Use vk_image_sanitize_extent
...
We set the image type before the extend which allows us to use
vk_image_sanitize_extent.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20112 >
2022-12-02 20:46:33 +00:00
Bas Nieuwenhuizen
13d755441c
vulkan: Remove asserts that weren't valid for RADV ETC2 emulation.
...
Wasn't caught when radv was modified to use these helpers ...
Tried to move the aspects assert so it still checks application inputs.
Fixes: d9048e31a0 ("radv: Use vk_image_view as the base for radv_image_view")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19914 >
2022-11-25 17:16:14 +00:00
Hans-Kristian Arntzen
f2e535e4fe
vk/runtime: Fix narrowing of timeline signal and wait value to u32.
...
They are u64. Fixes deadlock in
dEQP-VK.wsi.xcb.present_id_wait.wait.past_no_timeout.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Fixes: 9bffd81f1c ("vulkan: Add common implementations of vkQueueSubmit
and vkQueueWaitIdle")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19951 >
2022-11-23 16:02:27 +00:00
Jason Ekstrand
9cec1ed51d
vulkan: Add a dummy vk_common_CmdSetColorBlendAdvancedEXT()
...
The entrypoint needs to exist but we don't need to do anything with it.
Fixes: 13c422e1b2 ("anv: toggle on EXT_extended_dynamic_state3")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19817 >
2022-11-22 05:09:17 +00:00
Jason Ekstrand
182aa9eb15
vulkan: Add a common implementation of CmdSetSampleLocationsEnableEXT
...
Fixes: 13c422e1b2 ("anv: toggle on EXT_extended_dynamic_state3")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19817 >
2022-11-22 05:09:17 +00:00
Jason Ekstrand
b172fd62f5
vulkan: Add state for extraPrimitiveOverestimationSize
...
Fixes: 13c422e1b2 ("anv: toggle on EXT_extended_dynamic_state3")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19817 >
2022-11-22 05:09:17 +00:00
Konstantin Seurer
08b194fb46
vulkan,radv: Remove vk_shader_module_clone
...
The helper used ralloc which is unusual for vulkan objects, did not
handle allocation failures properly and was only useful for RADV.
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19700 >
2022-11-14 20:56:27 +00:00
Jason Ekstrand
11b2a063bf
vulkan: Unconditionally add barriers for missing external subpass deps
...
This is a very scorched-earth approach which doesn't take into account
whether or not there are any explicitly provided dependencies. We could
take a finer-grained approach in theory but it's unlikely to matter in
practice since you usually stall in Begin/EndRenderPass anyway.
Fixes: 1d726940d2 ("vulkan: Add a common CmdBegin/EndRederPass implementation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6203
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7650
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19599 >
2022-11-13 20:34:29 +00:00
Jason Ekstrand
4ff5051944
vulkan: Handle VK_SUBPASS_EXTERNAL at the end of a subpass
...
Fixes: 1d726940d2 ("vulkan: Add a common CmdBegin/EndRederPass implementation")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19599 >
2022-11-13 20:34:29 +00:00
Dave Airlie
a26755458e
vulkan: Add common cmd buffer state tracking
...
For drivers already using vk_common_ResetCommandBuffer(), it now only
calls the driver's reset hook if the command buffer is not in the
INITIAL state. Pulled this trick from the PowerVR driver.
v2 (Jason Ekstrand):
- Rename from "status" to "state" since that's what's in the spec
- Add vk_command_buffer_begin/end instead of drivers setting it all
manually
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16922 >
2022-11-11 05:01:24 +00:00
Yonggang Luo
e399dc3544
util: normalize include files under src/util/*.h with util/ prefix in mesa code base
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19546 >
2022-11-10 06:27:25 +00:00
Yonggang Luo
956935abaf
vulkan: Replace _Alignas with alignas
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19565 >
2022-11-10 05:04:12 +00:00
Boris Brezillon
457e9deee1
vulkan: Provide a vk_image_create_get_format_list() helper
...
Some drivers need to know the full list of formats that can be used
when VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT or
VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT is set (dozen needs
that at least). While VkImageFormatListCreateInfo is a nice way to
get the actual of formats the user intends to use at view creation time,
this paramter is optional, and when it's missing, we need to know the
full list of compatible formats if we want things to work properly.
Provide a helper that hides all the complexity and return a format list
even when VkImageFormatListCreateInfo is missing.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17339 >
2022-11-04 17:39:46 +00:00
Boris Brezillon
d65f439661
vulkan: Automatically generate helpers to retrieve format information
...
In Vulkan, formats are classified in compatible groups, allowing
formats to be cast to other formats in the same group. Some drivers
might need to have access to the full compatible format list, so let's
auto-generate helpers to allow that.
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17339 >
2022-11-04 17:39:46 +00: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