Place the convention so that distro packagers know that they can
rely on it, and not following it is a bug.
This is the same convention that Meson uses for Cargo subprojects,
but Mesa is not using them as they are experimental and not really
usable yet.
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36284>
Use the convention for Rust subprojects that was adopted by Meson 1.5.0
and newer.
Distros would prefer to avoid vendored crate sources, and instead use
local sources from e.g. /usr/share/cargo/registry. While Meson does not
support a local registry, it can be emulated with MESON_PACKAGE_CACHE_DIR.
However, because the distro might not be using the exact version of the
package, but only one that has the same semver, packagers need to add
some hacks to rewrite the wrap files. For example, in Fedora:
export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/"
# So... Meson can't actually find them without tweaks
%define inst_crate_nameversion() %(basename %{cargo_registry}/%{1}-*)
%define rewrite_wrap_file() sed -e "/source.*/d" -e "s/%{1}-.*/%{inst_crate_nameversion %{1}}/" -i subprojects/%{1}.wrap
%rewrite_wrap_file proc-macro2
%rewrite_wrap_file quote
%rewrite_wrap_file syn
%rewrite_wrap_file unicode-ident
%rewrite_wrap_file paste
Having a common convention for the name of Rust wraps makes it possible
to perform this transformation with a script without listing
the wraps one by one, and to share the script across multiple packages
(which will be useful when QEMU starts using Rust in a similar way to Mesa).
For an example of such a script, see
https://lore.kernel.org/r/20250722083507.678542-1-pbonzini@redhat.com/.
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36284>
In the dri3_handle_present_event() function, it uses an event enum
and two macros. So I suggest to change these all to use enums for
consistency.
Signed-off-by: Luc Ma <luc@sietium.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30461>
information
This information (otherwise invisible to the guest) may be used in the
future in some other guest-only functionality
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36330>
... in GfxstreamConnectionManager, to acquire the threadLocalInstance
of the connectionManager. Using thread_local attribute storage to store
some CPP primitives (i.e. unique_ptr) can cause issues on some
platforms.
Better to do all TLS as explicit as possible, using the available
utilities from common src/util. Don't need to wrap it in
a std::unique_ptr either, as the instance is just managed by the
destructor in the TLS interface.
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36302>
Drop the custom fluster-runner.sh script and add a deqp-runner suite for
the `radeonsi-raven-vaapi-fluster` job.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36316>
The compiled image function is derived from the image view, which is
supposed to match what is declared in the shader, however we did fixups
for array targets that only had one layer, since pipe_shader_image
actually doesn't have a target (derived from the resource instead).
But this is not correct at least for vulkan, since then the layer
coord is completely ignored, so we never got OOB behavior wrt the
layer coord.
Use single_layer_view field in pipe_shader_image to denote non-array
targets (the GL state tracker uses this in a similar way already,
although llvmpipe ignored it).
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36304>
As we are already updating tmu_dirty_rcl based on the the
shader usage of tmu writes at v3d_emit_gl_shader_state we
can avoid setting it everytime we have a SSBO or image
attached.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36343>
Allows detecting if the queue ends up going idle due to
a cross-queue dependency. Since we're only considering delays from
specific queues, we would not be able to detect low-latency situations
arising from the start of a frame happening on async queues.
Until we observe real work happening for a queue in a frame context,
submit timestamps ahead of any other waits.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34242>
VkLayer_MESA_anti_lag is a lightweight implicit layer which provides
an open-source implementation of the VK_AMD_anti_lag vulkan extension.
The algorithm used by this layer is very simplistic and only aims to
minimize the delay between calls to vkQueueSubmit or vkQueueSubmit2
and the begin of the execution of the submission.
In order to build VkLayer_MESA_anti_lag, pass -Dlayers=anti-lag to meson.
It is possible to either install the layer or to use
VK_ADD_IMPLICIT_LAYER_PATH=<buildpath>/share/vulkan/implicit_layer.d/
for testing purposes.
(Keep in mind that you have to adjust the library_path in the json file in that case.)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34242>
Replace incorrect MIN2 clamping with proper 5.8 signed fixed point
encoding. The hardware expects LOD values in 5.8 format with a range
of -16.0 to +15.99609375. Clamp input values to this valid range
before conversion to handle overflow correctly.
Passes dEQP-GLES3.functional.texture.mipmap.*.max_lod.* on GC7000.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36303>
It crashes in LLVM when the type is not scalar integer.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35950>
LLVM removed typed pointers a long time ago. These types and bitcasts
had no effect.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35950>
The alignment change allows LLVM to select 32-bit stores when 8-bit and
16-bit stores are properly aligned.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35950>
These are only memory loads.
We could do the same for LDS loads, which are not truly speculatable
in merged shaders (can't be moved before the barrier), but that's fine
because LICM only moves code out of loops, which can't have barriers.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35950>
LLVM also generates better code with this.
(-0.51% code size in 153 shaders, less SGPR spilling)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35950>
This pulls in the newest version of the file form
open-gpu-kernel-modules version 575.64.05. This should give us updated
names that correspond to our new hardware support.
The new version also added a ton of lines where the name was "(null)".
Since these would only make our device names more confusing, I've
removed all of these lines in the new version using a script that is
also included in this commit.
Backport-to: 25.2
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36333>
The old Nouveau GL driver has no support for GPUs after Ada. Instead,
users will always get NVK+Zink on Hopper+. Right now, if the user sets
NOUVEAU_USE_ZINK=false, the loader will return "nouveau" and EGL/GLX
will try to load that, fail, and then fall back to Zink. With this
patch, we instead print a warning message and then load Zink anyway.
Backport-to: 25.2
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36329>