Mike Blumenkrantz
6c83b9f219
vk/cmd_queue: fix up indentation a little
...
still kinda fucked
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26881 >
2024-01-09 15:24:12 +00:00
Mike Blumenkrantz
e977a2368b
vk/cmd_queue: generate maint6 functions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26881 >
2024-01-09 15:24:12 +00:00
Mike Blumenkrantz
2439982eac
vk/cmd_queue: stop using explicit casts
...
this just ends up being broken for complex types anyway
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26881 >
2024-01-09 15:24:12 +00:00
Yonggang Luo
d6c258d9ee
util: Add align_uintptr and use it treewide to replace ALIGN that works on size_t and uintptr_t
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26866 >
2024-01-05 21:54:35 +00:00
Mike Blumenkrantz
f60dafb4bd
vulkan: add wrappers for descriptor '2' functions
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26849 >
2024-01-02 11:28:07 +00:00
Chia-I Wu
d9ba75e2e1
Revert "vk/util: ignore unsupported feature structs"
...
This reverts commit eb5bb5c784 . The
commit broke drivers which do not initialize
vk_physical_device::properties.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26813 >
2023-12-25 20:36:34 +00:00
Chia-I Wu
eb5bb5c784
vk/util: ignore unsupported feature structs
...
vk_physical_device_check_device_features should ignore unsupported
feature structs:
Any component of the implementation (the loader, any enabled layers,
and drivers) must skip over, without processing (other than reading
the sType and pNext members) any extending structures in the chain not
defined by core versions or extensions supported by that component.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10177
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26767 >
2023-12-21 17:22:17 +00:00
Dave Airlie
b4cde1b2a6
vulkan/video: drop encode beta checks and rename EXT->KHR
...
The latest headers move encode support out of beta, so clean up the tree.
Reviewed-by: Lynne <dev@lynne.ee >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26763 >
2023-12-19 20:48:59 +00:00
Samuel Pitoiset
7afd7299bf
vulkan: drop VK_ENABLE_BETA_EXTENSIONS for video encode layouts
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26756 >
2023-12-19 14:44:07 +00:00
Mike Blumenkrantz
49759101a1
vk/cmd_queue: exempt more descriptor functions from autogeneration
...
void* sizeof
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26756 >
2023-12-19 14:44:07 +00:00
Samuel Pitoiset
cfa944635c
vulkan: bump headers/registry to 1.3.274
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26756 >
2023-12-19 14:44:07 +00:00
Dudemanguy
cef345129f
vulkan/wsi/wayland: fix wl_event_queue memory leak
...
When creating the swapchain, this queue is created, but it was never
freed in wsi_wl_swapchain_free along with the rest of the resources.
Signed-off-by: Dudemanguy <random342@airmail.cc >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26052 >
2023-12-18 16:28:53 +00:00
Yiwei Zhang
ddf2ca4faf
vulkan/wsi/wayland: ensure drm modifiers stored in chain are immutable
...
Chain stored modifiers point to the mapping of the current feedback
shmem of the surface. The surface tracked feedback mapping will be gone
and replaced with new mapping during surface_dmabuf_feedback_done. There
are two issues here:
1. One issue is that the existing mapping is closed before been used to
compare against new modifiers in sets_of_modifiers_are_the_same.
2. The other issue is that when the chain is still optimal, the chain
persists while the mapping is still replaced with the one from the
new format table shmem.
This change makes a deep copy of the modifiers to store in the chain to
ensure the modifiers used for the current chain are immutable through
the chain lifecycle.
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26618 >
2023-12-16 18:26:38 +00:00
George Ouzounoudis
d8945dd51e
vulkan: Fix dynamic graphics state enum usage
...
Simply replace the correct rasterization stream enum
Fixes: 9d0ed9cbcc ("vulkan: Add more dynamic rasterizer state")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872 >
2023-12-15 22:28:51 -06:00
Eric Engestrom
8043e8c4a6
vulkan/wsi: fix build when platform headers are installed in non-standard locations
...
Anything that uses the platform defines in `vulkan_wsi_list` will need
to be able to resole the includes they trigger, which are provided by
`vulkan_wsi_deps`.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10304
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26715 >
2023-12-15 18:35:54 +00:00
Colin Marc
a26119e124
vulkan video: correctly set SPS VUI bits
...
According to the spec section E.1 flags such as overscan_info_present_flag are
independent of aspect_ratio_info_present_flag.
Reviewed-by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26669 >
2023-12-15 07:13:13 +00:00
Jesse Natalie
2ea04ef69b
vulkan/wsi: Convert bit tests to bool with != 0
...
Otherwise the bool result could be some value other than 0 or 1.
Fixes: d7938de8 ("vulkan/wsi: don't support present with queues where blit is unsupported")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26706 >
2023-12-15 00:39:10 +00:00
Chris Spencer
342dba5102
vulkan/android: Only limit advertised extensions in strict mode
...
Signed-off-by: Chris Spencer <spencercw@gmail.com >
Acked-by: Chia-I Wu <olvaffe@gmail.com >
Acked-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25101 >
2023-12-13 20:09:37 +00:00
Samuel Pitoiset
24c755316b
vulkan/runtime: promote VK_EXT_vertex_attribute_divisor to KHR
...
Just rename existing structs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26595 >
2023-12-13 08:08:21 +00:00
Rhys Perry
dcbf31dce2
vulkan/wsi: always create command buffer for special blit queues
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Fixes: d7938de8fe ("vulkan/wsi: don't support present with queues where blit is unsupported")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10283
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26635 >
2023-12-12 20:02:43 +00:00
Echo J
9342635903
vulkan: Remove nonexistent output in vk_synchronization_helpers target
...
I noticed that my NVK build was always LTOing the library twice
(I managed to trace it to the vk_synchronization_helpers change)
This change fixes the double compilation/LTO issue (which should
definitely cut packaging times a bit) 🐸
Fixes: fe12c1c29e ("vulkan: Add some auto-generated synchronization helpers")
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26630 >
2023-12-12 17:01:00 +00:00
Samuel Pitoiset
c9e1758462
vulkan: bump headers/registry to 1.3.273
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26596 >
2023-12-11 08:26:02 +01:00
Rhys Perry
33f4e947d8
vulkan/wsi: fix win32 compilation
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Fixes: d7938de8fe ("vulkan/wsi: don't support present with queues where blit is unsupported")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26610 >
2023-12-09 11:56:32 +00:00
Rhys Perry
d7938de8fe
vulkan/wsi: don't support present with queues where blit is unsupported
...
Since we might have to perform a copy, video and sparse queues cannot be
used to present.
Attempting to create a command buffer on RADV for the sparse binding queue
causes a crash.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 748b7f80ef ("radv: Move sparse binding into a dedicated queue.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26523 >
2023-12-09 07:37:44 +00:00
Eric Engestrom
40c82b5f67
vk/update-aliases.py: only apply renames for the vulkan api (not vulkansc)
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484 >
2023-12-07 19:52:01 +00:00
Eric Engestrom
1b3fca1708
vk/update-aliases.py: enforce correct list order
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484 >
2023-12-07 19:52:01 +00:00
Eric Engestrom
2cf22af0a7
vk/update-aliases.py: handle more concatenated prefixes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484 >
2023-12-07 19:52:01 +00:00
Eric Engestrom
04517193c5
vk/update-aliases.py: simplify addition of other concatenated prefixes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484 >
2023-12-07 19:52:01 +00:00
Eric Engestrom
3fe90f2957
vk/update-aliases.py: sort files when informing the user of the matches
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484 >
2023-12-07 19:52:01 +00:00
Eric Engestrom
d8b38ec4a3
vk/update-aliases.py: handle "no match" grep call
...
This was not necessary before because there was always at least the
vk.xml file itself in the `src/` search path.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484 >
2023-12-07 19:52:00 +00:00
Eric Engestrom
c6ebf9d643
vk/update-aliases.py: allow specifying the files we want to update
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484 >
2023-12-07 19:52:00 +00:00
Eric Engestrom
e988b1975b
vk/update-aliases.py: drop dead --check-only
...
This was introduced for when it was intended for this script to run as
part of the build tests, but that was dropped, and so should this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26484 >
2023-12-07 19:52:00 +00:00
Yonggang Luo
e7c614bd20
util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template
...
This is for fixes the following error:
FAILED: src/vulkan/runtime/vk_synchronization_helpers.c src/vulkan/runtime/vk_synchronization_helpers.h
"C:\CI-Tools\msys64\mingw64\bin/python3.EXE" "../../src/vulkan/util/vk_synchronization_helpers_gen.py" "--xml" "../../src/vulkan/registry/vk.xml" "--out-c" "src/vulkan/runtime/vk_synchronization_helpers.c" "--beta" "false"
Traceback (most recent call last):
File "C:/work/xemu/mesa/src/vulkan/util/vk_synchronization_helpers_gen.py", line 213, in main
f.write(TEMPLATE_C.render(**environment))
UnicodeEncodeError: 'gbk' codec can't encode character '\xa9' in position 15: illegal multibyte sequence
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26515 >
2023-12-07 12:41:07 +00:00
Lionel Landwerlin
e8a96e6ba0
vulkan/runtime: retain video session creation flags
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26519 >
2023-12-06 19:17:17 +00:00
Eric Engestrom
f5297208d0
vk/overlay-layer: update symbols that have become aliases for newer ones
...
All of these have been renamed in the spec (usually by being promoted);
renamed them in our code too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26487 >
2023-12-04 23:27:29 +00:00
Eric Engestrom
d0df3834b4
vk/util: update symbols that have become aliases for newer ones
...
All of these have been renamed in the spec (usually by being promoted);
renamed them in our code too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26487 >
2023-12-04 23:27:29 +00:00
Eric Engestrom
d6144ba88f
vk/wsi: update symbols that have become aliases for newer ones
...
All of these have been renamed in the spec (usually by being promoted);
renamed them in our code too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26487 >
2023-12-04 23:27:29 +00:00
Eric Engestrom
84c27ea42c
vk/runtime: update symbols that have become aliases for newer ones
...
All of these have been renamed in the spec (usually by being promoted);
renamed them in our code too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26487 >
2023-12-04 23:27:29 +00:00
Faith Ekstrand
00e88584af
vulkan: Add helpers for access flags
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26407 >
2023-12-01 17:59:51 +00:00
Faith Ekstrand
44add595af
vulkan: Add helpers for pipeline stage flags
...
This adds hand-written helpers for detecting if a set of stage flags
contains shaders as well as expand helpers that properly handle
TOP/BOTTOM_OF_PIPE_BIT.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26407 >
2023-12-01 17:59:51 +00:00
Faith Ekstrand
fe12c1c29e
vulkan: Add some auto-generated synchronization helpers
...
These are helpful for drivers to implement synchronization rules
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26407 >
2023-12-01 17:59:51 +00:00
Faith Ekstrand
9ad51980de
vulkan: Move vk_synchronization2 to vk_synchronization
...
I'm about to add more stuff that isn't really for sync2 so it makes
sense to give it a slightly more generic name.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26407 >
2023-12-01 17:59:50 +00:00
Faith Ekstrand
93acce99f3
vulkan: Default override patch version to VK_HEADER_VERSION
...
The patch version shouldn't matter but, on the off chance it does, we
don't want to be advertising non-existent versions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26383 >
2023-11-28 23:52:27 +00:00
Hyunjun Ko
fbc9811241
vulkan/video: fix a typo
...
Fixes: d46162981a ("vulkan/video: add h264 headers encode")
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26139 >
2023-11-17 00:45:55 +00:00
Friedrich Vock
8ffdad731c
vulkan: Don't use set_foreach_remove when destroying pipeline caches
...
set_foreach_remove assumes no entries have been removed. That assumption
only holds if no errors occur, since pipeline cache objects can get
removed if an error occurs during deserialization.
This fixes
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
crashing on RADV.
Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
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/26164 >
2023-11-13 20:09:31 +00:00
antonino
2d49f834b2
vulkan: use instance allocator for object_name in some objects
...
The allocator passed to VkDevice won't be available once it is destroyed
and thefore it cannot be used to allocate `object_name` for instance
level objects such as `VkInstance` or `VkPhysicalDevice` or else there
would be no way of deallocating it when those objects are destroyed.
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Mark Collins <mark@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26085 >
2023-11-10 20:57:19 +00:00
Paulo Zanoni
17e135d3d4
vulkan: fix potential memory leak in create_rect_list_pipeline()
...
I was playing around with possible improvements to STACK_ARRAY(), and
one of my experiments made gcc point us that we were not freeing
'stages'.
Fixes: 514c10344e ("vulkan/meta: Add a concept of rect pipelines")
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26041 >
2023-11-09 18:22:36 +00:00
Vitaliy Triang3l Kuzmin
054188bff8
vulkan: Fix pipeline layout allocation scope
...
The lifetime of Mesa's vk_pipeline_layout may exceed that of the
VkPipelineLayout object as other objects on the device may hold references
to it. In other places in vk_pipeline_layout and vk_descriptor_set_layout,
the device allocation scope is used with this pattern, but there was an
inconsistency in vk_pipeline_layout_zalloc, which is fixed by this commit.
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24794 >
2023-11-07 10:09:52 +00:00
Connor Abbott
2e83aed8b3
vk/graphics_state: Add vk_pipeline_flags_feedback_loops helper
...
This will be useful for combining dynamic and static feedback loop
state.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25436 >
2023-11-06 14:33:51 +00:00
Connor Abbott
a02d1cfa9e
vk/graphics_state: Support VK_EXT_attachment_feedback_loop_dynamic_state
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25436 >
2023-11-06 14:33:51 +00:00