Erik Faye-Lund
c69dc01796
vulkan: avoid needless constant-folding
...
While we're at it, also switch to the nir_f{add,mul}_imm helpers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855 >
2023-06-29 07:08:18 +00:00
Kiskae
e67337bebf
vulkan/wsi: check for dri3 buffer initialization failure
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8427
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Lina Versace <linyaa@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23081 >
2023-06-28 14:45:01 +00:00
Yonggang Luo
05b840521a
treewide: Replace the usage of TRUE/FALSE with true/false
...
this is a separate patch as it's won't affect the code style
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577 >
2023-06-27 18:18:28 +08:00
Konstantin Seurer
b0beca8c7a
vulkan/rmv,radv: Use common trace trigger
...
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
Konstantin Seurer
291fa05545
vulkan/wsi/x11: Capture traces using a hotkey
...
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
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
Konstantin Seurer
3b83a60c95
meson: Add a xcb-keysyms dependency
...
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
Hyunjun Ko
e2f95ad296
vulkan/video: keep delta weight and offsets of predicted weight tables in h265 slice parsing
...
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23790 >
2023-06-26 15:07:53 +09:00
Caio Oliveira
c421ecea56
vulkan: Update XML and headers to 1.3.255
...
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23837 >
2023-06-25 15:52:55 +00:00
Caio Oliveira
73af0475cb
vulkan: Add NV suffix to VK_NV_cooperative_matrix feature names
...
In the new Vulkan Headers, VK_KHR_cooperative_matrix gets added and the feature
names are the same.
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23837 >
2023-06-25 15:52:55 +00:00
Tatsuyuki Ishi
b69a1b4153
vulkan: Migrate shader module hash to BLAKE3.
...
Shaders are the largest thing we hash now, so they benefit from a faster
hash.
Change the field name from `sha1` to `hash` to avoid tying the definition
to a particular algorithm. This doubles down as a precaution against
callers still assuming a 20-byte hash (in which case the compilation will
error out).
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22571 >
2023-06-23 09:28:04 +00:00
Michel Zou
badb85edb8
util: reinstate ENUM_PACKED
...
gets rid of warning: 'gcc_struct' attribute ignored [-Wattributes] introduced by !23338
Fixes: 86532fa21d ("util: Use the gcc_struct attribute for packed structures in mingw")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23478 >
2023-06-21 21:51:59 +00:00
Hyunjun Ko
240b419c03
vulkan/video: consider removed bits when calculating the size of comsumed data.
...
Closes : mesa/mesa#9170
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23688 >
2023-06-21 19:24:49 +09:00
Hyunjun Ko
6f2e260d2b
vulkan/video: move parsing longterm rps in h265 slice parsing.
...
It was just by mistake.
Fixes: efdcacb230 ("vulkan/video: add to parse h265 slice.")
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23688 >
2023-06-21 19:24:08 +09:00
Hyunjun Ko
b10631865d
vulkan/video: adds more conditions for setting loop_filter_across_slices_enable in h265 slice parsing.
...
Fixes: efdcacb230 ("vulkan/video: add to parse h265 slice.")
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23688 >
2023-06-21 19:20:59 +09:00
Caio Oliveira
59a72570b6
compiler: Move spirv into a module of its own
...
For historical reasons, nir and vtn were compiled together,
and a bunch of vtn specific targets were defined in
src/compiler/meson.build.
Now that we can, make src/compiler/spirv produce an internal
library that depends on NIR, and is used by the drivers/tools.
Also move the vtn specific targets into that directory's
meson.build.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23668 >
2023-06-20 16:18:08 +00:00
Samuel Pitoiset
0432a748ee
vulkan/runtime: call CmdSetDepthBias2EXT() from CmdSetDepthBias()
...
Signed-off-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/23696 >
2023-06-20 12:46:28 +00:00
Lionel Landwerlin
f39fa39809
vulkan/runtime: add support for EXT_depth_bias_control
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23716 >
2023-06-20 03:05:01 +00:00
Lionel Landwerlin
6249ff17ca
vulkan: registry/headers bump to 1.3.254
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Constantine Shablya <constantine.shablya@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23716 >
2023-06-20 03:05:01 +00:00
Yonggang Luo
785ca13323
wsi: Fixes passing argument 1 of ‘mtx_unlock’ from incompatible pointer type
...
../../src/vulkan/wsi/wsi_common_display.c:2908:15: error: passing argument 1 of ‘mtx_unlock’ from incompatible pointer type [-Werror=incompatible-pointer-types]
2908 | mtx_unlock(&wsi->wait_mutex);
| ^~~~~~~~~~~~~~~~
| |
| pthread_mutex_t *
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23733 >
2023-06-20 00:05:48 +00:00
Mike Blumenkrantz
6650d89d4c
vk: make vk_format_map[] public
...
having to go through a function call for non-planar mappings can be
very slow
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23599 >
2023-06-13 18:38:27 +00:00
Vinson Lee
a62a22c922
vulkan/wsi: Remove duplicate NULL check
...
Fix defect reported by Coverity Scan.
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return NULL;.
Fixes: eadc64ab24 ("vulkan/wsi/display: do not dereference a NULL pointer")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23415 >
2023-06-07 11:41:29 +00:00
Yonggang Luo
b687fa4ccb
vulkan: move nir_convert_ycbcr into vulkan runtime
...
This only used by vulkan drivers and depends on vulkan util, so do the move to decouple
nir from vulkan utils
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23444 >
2023-06-07 08:42:03 +00:00
Iván Briano
39e057028c
vulkan/wsi: fix double free on error condition
...
On error during wsi_wl_surface_create_swapchain(),
wsi_wl_swapchain_chain_free() is called, followed by vk_free() of the
recently freed chain.
Move the vk_free() to wsi_wl_swapchain_destroy() to avoid the double
free.
Fixes dEQP-VK.wsi.wayland.swapchain.simulate_oom.*
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23383 >
2023-06-02 15:12:19 -07:00
Mike Blumenkrantz
0a3ddcbe8b
vulkan: use cmd size array for queued cmd allocations
...
minor simplification for consistency
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23322 >
2023-05-31 03:13:22 +00:00
Mike Blumenkrantz
fd45ab843f
vulkan/cmd_queue: expose cmd sizes
...
now that cmds are more precisely allocated, it's necessary for drivers
to have some way to determine what the allocation size is
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23322 >
2023-05-31 03:13:22 +00:00
Mike Blumenkrantz
5759ab668e
vulkan/cmd_queue: allocate cmds based on the size of the cmd
...
the base size of a vk_cmd_queue_entry is massive since there are a couple
union entries that have a trillion params. by allocating conditionally using
the union member size, memory can be reduced, which will affect some user-facing
api properties
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23322 >
2023-05-31 03:13:22 +00:00
Mike Blumenkrantz
96a404cf82
vulkan: reorder vk_cmd_queue_entry
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23322 >
2023-05-31 03:13:22 +00:00
Dave Airlie
45a92f14b2
vk/video: add a common function to get block alignments for profiles
...
This is to be used by drivers for internal image alignments.
This just adds a common profile to alignment helper.
Cc: mesa-stable
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Samuel Pitoiset
3e6b0f43dc
vulkan: Update XML and headers to 1.3.251
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23292 >
2023-05-29 13:41:02 +00:00
Víctor Manuel Jáquez Leal
0e886a93ce
vulkan: complete the usage flags for video layouts
...
Otherwise Vulkan decoding with FFmpeg crashes on anv.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23184 >
2023-05-29 02:59:05 +00:00
Eric Engestrom
d240a630e7
wsi/display: drop unused parameters from local functions
...
These are all local functions, so it's trivial to add back any parameter
should they become useful.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20566 >
2023-05-26 14:34:17 +00:00
Jesse Natalie
e965b5d291
wsi/win32: Handle acquiring an image while one is already acquired
...
In the case where the app is attempting to acquire both (since the
min/max num images is 2) swapchain images, we need to wait on the
fence for the next image in the chain.
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23222 >
2023-05-25 20:43:32 +00:00
Samuel Pitoiset
8126e0287d
vulkan/pipeline_cache: remove a bogus assert when inserting objects
...
If two threads deserialize the raw object at the same time, the
refcount could be more than 1 temporarily.
This can be reproduced with Granite during the multi-threaded pipeline
cache pre-warm on startup, and also with Dota2.
Fixes: cbab396f54 ("vulkan/pipeline_cache: replace raw data objects on cache insertion of real objects")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22853 >
2023-05-25 10:07:35 +00:00
Mike Blumenkrantz
dfc01aea83
vk/graphics_state: handle null pipeline state structs in creation
...
when these members are null, the corresponding graphics states should be
initialized with sensible default values
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22236 >
2023-05-22 23:51:22 +00:00
Hyunjun Ko
b08614b96b
vulkan/video: add h265 reference structures and relevant util functions.
...
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202 >
2023-05-19 06:15:01 +00:00
Hyunjun Ko
efdcacb230
vulkan/video: add to parse h265 slice.
...
Vulkan spec doesn't provide any interface for slice decoding while some
devices may require them. So we need to keep this inside.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202 >
2023-05-19 06:15:01 +00:00
Daniel Schürmann
8bfd18b8c5
vulkan/pipeline_cache: don't log warnings for client-invisible caches
...
Fixes: d3f06cf5ce ('vulkan/pipeline_cache: don't log warnings for internal caches')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22986 >
2023-05-17 20:40:12 +00:00
Mike Blumenkrantz
1effbccc5c
vulkan/wsi: add feedback loop usage to swapchain caps if supported
...
this is needed by some apps
cc: mesa-stable
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22959 >
2023-05-17 11:16:00 +00:00
Jesse Natalie
c9146794d4
vulkan: Win32 sync import/export support
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22879 >
2023-05-15 17:14:20 +00:00
Chia-I Wu
47b37651f8
vulkan: add vk_image_format_to_ahb_format
...
There should be no functional change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:03 +00:00
Chia-I Wu
380180516c
anv,hasvk,radv: do not fall back to AHARDWAREBUFFER_FORMAT_BLOB
...
When allocating a VkDeviceMemory exportable as AHB, it seems incorrect
to fall back to AHARDWAREBUFFER_FORMAT_BLOB when the image has no known
AHB format. We should fail the allocation instead.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:03 +00:00
Chia-I Wu
50e703f347
vulkan: add vk_ahb_format_to_image_format
...
There should be no functional change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Chia-I Wu
2bbe0462e8
vulkan: define inline stubs when android api level < 26
...
This allows us to reduce ANDROID #ifdef's.
v2: always include vk_android.h in radv_formats.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Chia-I Wu
f81dce9bcc
vulkan: rename vk_image::ahardware_buffer_format
...
Rename it to ahb_format.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Chia-I Wu
5561abcb2c
vulkan: make sure vk_image_view::format is never UNDEFINED
...
Remove redundant override in anv and hasvk as well.
Fixed
android.graphics.cts.BasicVulkanGpuTest#testBasicBufferImportAndRenderingExternalFormat
for radv.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Chia-I Wu
df8ec99c81
vulkan: make sure vk_image::format is never UNDEFINED
...
vk_image::android_external_format is only used for sanity check and is
removed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22619 >
2023-05-11 22:18:02 +00:00
Daniel Schürmann
d3f06cf5ce
vulkan/pipeline_cache: don't log warnings for internal caches
...
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22850 >
2023-05-11 08:36:12 +00:00
Simon Ser
c140a456b7
vulkan/wsi/wayland: add 16-bit formats
...
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20234 >
2023-05-10 11:58:19 +00:00
Mike Blumenkrantz
ae4692db49
vulkan/runtime: add VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22849 >
2023-05-09 13:29:34 +00:00