Commit graph

179113 commits

Author SHA1 Message Date
Eric Engestrom
042d256c1e util/xmlconfig: inline datadir
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21808>
2023-10-16 07:59:38 +00:00
Eric Engestrom
44b0764930 util/xmlconfig: drop driInjectDataDir() now that DRIRC_CONFIGDIR is always supported
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21808>
2023-10-16 07:59:38 +00:00
Erik Faye-Lund
128c2bdf73 meson: add src/util to the drirc search path
With this, we pick up new in-tree defaults for driconfig variables
when using meson devenv. This is useful for testing new config
variables.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21808>
2023-10-16 07:59:38 +00:00
Erik Faye-Lund
6c5a9ede64 util/xmlconfig: add an env-var for overriding drirc search dir
This adds an environment variable that can be used to override the
global drirc serach directory. This can be useful for debugging, and
meson devenv, as used in the following commit.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21808>
2023-10-16 07:59:38 +00:00
Karol Herbst
ccdea7bbeb rusticl/format: disable all sRGB formats
Fixes: 714e11fe04 ("rusticl/format: enable all trivial to support optional image formats")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25739>
2023-10-15 21:28:15 +00:00
Karol Herbst
bdd255bd04 rusticl/memory: use PIPE_BUFFER for IMAGE1D_BUFFER images
Fixes samplerless 1Dbuffer tests with Zink.

Fixes: 20c90fed5a ("rusticl: added")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25739>
2023-10-15 21:28:15 +00:00
Karol Herbst
e79d9a9cc8 rusticl/device: restrict 1Dbuffer images for RGB and RGBx
Fixes: 20c90fed5a ("rusticl: added")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25739>
2023-10-15 21:28:15 +00:00
Karol Herbst
832efd097c nir/lower_mem_access_bit_sizes: fix invalid shift bit_size
Shifts always need 32 bit for their second source.

Fixes: c70d94a889 ("nir_lower_mem_access_bit_sizes: Support unaligned stores via a pair of atomics")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25740>
2023-10-15 16:19:36 +00:00
Danylo Piliaiev
b3043434d9 freedreno: Fix field size of A6XX_TEX_CONST[3].ARRAY_PITCH
We silently dropped higher bits of layer size, which was not
caught by CTS because it requires image to be big.

Fixes rendering in shadowmappingcascade Vulkan demo.

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25717>
2023-10-15 13:58:50 +00:00
Karol Herbst
3fb822dbab zink: properly emit PhysicalStorageBufferAddresses cap
The PhysicalStorageBuffer64 addressing model requires this cap. Fixes
vulkan validation error.

Fixes: ddc5c30489 ("zink: handle global and scratch vars")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25736>
2023-10-15 12:19:05 +00:00
Karol Herbst
74363973ff zink: implement load_global_constant
This is just like load_global, just that the memory pointed to won't
change.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25736>
2023-10-15 12:19:05 +00:00
Lucas Stach
04260c3654 mesa: enable NV_texture_barrier in GLES2+ (again)
This re-enables NV_texture_barrier in GL ES2+ contexts. This had
previously been tried, but caused CI issues and thus had been
reverted.

c7da969f8f ("mesa: Enable NV_texture_barrier in GLES2+") was
buggy, as it added the es2 annotation to the category instead of
the function in the XML, which lead to the extension being
advertised, but calling glTextureBarrierNV in a GLES context
only yielded a GL_INVALID_OPERATION instead of the desired
barrier operation.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25728>
2023-10-15 10:33:47 +00:00
LingMan
8b6b405a01 rusticl/core: don't take a lock while dropping Context
We have exclusive access in Drop, so we can use `get_mut` instead of having to `lock`.

Since that borrows `self` mutably but `call` also needs to borrow `self`, we `take` the Vec with
callbacks out of `self` so the mutable borrow can end before running `call`.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:11 +00:00
LingMan
54c74164a8 rusticl: drop an #[allow(dead_code)] marker
These aliases are all in use.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:11 +00:00
LingMan
b10e750199 rusticl: mark the fields of callback structs private
These details are supposed to be inaccessbile and were only made pub during the initial
implementation phase.

Add an `#[allow(dead_code)]` marker since the CreateContextCB isn't hooked up yet which would cause
a warning about unused fields otherwise.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:11 +00:00
Karol Herbst
503d084d01 rusticl/api: remove cl_closure macro
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:11 +00:00
LingMan
cda52a04e3 rusticl/api: drop a few include paths
`c_void` is already imported at the top of the file.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
0b9c926dd2 rusticl: add a safe abstraction to execute a ProgramCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
b1b0ca1acb rusticl: add a safe abstraction to execute a CreateContextCB
Since running CreateContextCBs isn't implemented yet, it's unused for now.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
6e2ba679ff rusticl: add a safe abstraction to execute an SVMFreeCb
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
8b1d73ff23 rusticl: add a safe abstraction to execute a MemCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
241d16c9e8 rusticl: add a safe abstraction to execute an EventCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
d9e2463ef3 rusticl: add a safe abstraction to execute a DeleteContextCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
16383332a9 rusticl: Make EventSig take ownership of its environment
Needed because some events may consume their inputs. E.g. it will shortly be needed for the SVMFreeCb.
SVMMemFill will also soon require mutable access.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
bef50d164f rusticl: use SVMFreeCb
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
b8171ab372 rusticl: use ProgramCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
07ca0df72e rusticl: use MemCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
c5c4cc4137 rusticl: use EventCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
250f6e9b2e rusticl: use DeleteContextCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
f34ff1daa5 rusticl: use CreateContextCB
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
e461944060 rusticl: add structs to hold the C callbacks
Keeps function pointers and their provided user data together. Since these callbacks are guaranteed
to be thread-safe by the OpenCL spec, they are marked Send and Sync.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
LingMan
157c743a27 rusticl: Rename XyzCB aliases to FuncXyzCB
This happens so the XyzCB names can be used for structs containing both the function pointer and
the provided user data. Since these aliases represent raw unsafe function pointers the `Func`
prefix was chosen over `Fn`, which is generally used for safe functions.

Unfortunately it is not possible to concatinate identifiers to create new ones without a proc macro.
Thus, specify the new alias manually instead of generating them from the existing XyzCB names.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>
2023-10-15 00:17:10 +00:00
Yiwei Zhang
5df194e2ae zink: sync queue access for vkQueueWaitIdle
Ensure VkQueue external sync between flush_queue and TC.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25733>
2023-10-14 23:43:36 +00:00
Karol Herbst
d2e1bc33b0 zink: implement PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS
We have to return at least 1.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25731>
2023-10-14 22:14:34 +00:00
Rob Clark
d97427f41c radeonsi: Add PIPE_CAP_HAS_CONST_BW support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
2023-10-14 17:28:29 +00:00
Rob Clark
01f0cce003 iris: Add PIPE_CAP_HAS_CONST_BW support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
2023-10-14 17:28:28 +00:00
Rob Clark
1fe201f7a3 panfrost: Add PIPE_CAP_HAS_CONST_BW support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
2023-10-14 17:28:28 +00:00
Rob Clark
c1968e54d9 freedreno: Add PIPE_CAP_HAS_CONST_BW support
Allow for tiled layouts rather than having mesa/st force us back to
linear.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
2023-10-14 17:28:28 +00:00
Rob Clark
5cccd6d689 mesa: Implement MESA_texture_const_bandwidth
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9891
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
2023-10-14 17:28:28 +00:00
Rob Clark
d0c81e12f3 mesa: Introduce MESA_texture_const_bandwidth
A simple extension that builds on EXT_memory_object to allow the
application to request that constant bandwidth (non-data-dependent)
tiling layouts be used for a specified texture.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
2023-10-14 17:28:28 +00:00
Kai Wasserbäch
2320ad1da6 fix: clover: warning: ignoring return value of ‘int posix_memalign(…)’ [-Wunused-result]
During builds GCC 13.2 issues the following warning:
src/gallium/frontends/clover/api/memory.cpp:612:21: warning: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  612 |       posix_memalign(&ptr, alignment, size);
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~

Fix this by checking the returned value is actually 0 and if not we now
report a nullptr.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25724>
2023-10-14 17:12:37 +00:00
Karol Herbst
10e3de37bf rusticl/memory: use get_mut instead of lock in drop
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25727>
2023-10-14 15:32:14 +00:00
David Heidelberg
0b31cda678 ci: ci_marge_queue.py
Show currently assigned jobs to Marge and return 0 when it's free.

Useful for combination with ci_run_n_monitor.py .

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20347>
2023-10-14 11:28:56 +00:00
Karol Herbst
3083b854e0 rusticl/kernel: get rid of Arcs in KernelDevStateVariant
We only used Arcs as we wanted to deal with either getting a reference or
having an owned temporary. But we can also just use a local variable for
temporary storage.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
2023-10-14 09:34:56 +00:00
Karol Herbst
d3d94818ed rusticl/queue: make it Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
2023-10-14 09:34:56 +00:00
Karol Herbst
57bafe51d2 rusticl/queue: get rid of pointless Option around our worker thread handle
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
2023-10-14 09:34:56 +00:00
Karol Herbst
aa1d746a8e rusticl/cl: mark _cl_image_desc as Send and Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
2023-10-14 09:34:56 +00:00
Karol Herbst
e994935c1f rusticl/mesa: mark PipeTransfer as Send
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
2023-10-14 09:34:56 +00:00
Karol Herbst
5492046240 rusticl/mesa: mark PipeResource as Send and Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
2023-10-14 09:34:56 +00:00
Karol Herbst
dde84568ad rusticl/mesa/nir: Mark NirShader and NirPrintfInfo as Send and Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
2023-10-14 09:34:56 +00:00