Commit graph

206081 commits

Author SHA1 Message Date
Karol Herbst
c7d09eca27 rusticl: add memory debugging
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
da4de8d7e3 rusticl: add support for coarse-grain buffer SVM
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
6e13e438d1 rusticl/kernel: add an SVM kernel argument value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
2fb8bb3c49 rusticl: move SVM allocation into core
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
b65652b4be rusticl: implement cl_ext_buffer_device_address
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
35a9829391 rusticl/kernel: rework validation in clSetKernelExecInfo
We should use the cl_slice code to get proper validation, which also makes
it simpler to read out data and gets rid of some UB there.

This also fixes CL_KERNEL_EXEC_INFO_SVM_PTRS with param_value being null.

Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
c5411351ad rusticl/mesa: add util_vma_heap wrapper
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
875fc911b6 rusticl/mesa: wrap new VM interfaces SVM edition
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
1ff64f6ac1 rusticl/mesa: wrap new VM interfaces
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
4027f0f30a lp: implement resource_get_address
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
c449d1d063 zink: implement resource_get_address
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
a04569b2ea zink: set unordered_read/write after buffer_barrier in set_global_binding
Fixes: a6e9e0f0d7 ("zink: add set_global_binding")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
8658529e88 gallium: new VM interfaces for SVM
The old interfaces added back in clover's time were modeled after a very
bindful resource model.

However SVM (shared virtual memory) requires us to be way more flexible.

The new interfaces allow frontends to create a cut-out in the GPU's vm and
to assign addresses themselves. This gives us the following benefits:
 - The frontend is empowered to synchronize resource addresses between
   several devices. cl_mem objects in OpenCL span across a set of multiple
   devices and SVM requires them to have the same VMA across all of them.
 - Coarse grain SVM can be implemented without bothering drivers too much
   as the frontend can be responsible to make sure a host allocation with
   a specific VMA matches a GPU allocation with the identical VMA.
 - Support for Global variables in the CrossWorkgroup storage class
   Initializers. Those can depend on addresses of CrossWorkgroup memory,
   if the frontend can just assign a VMA, this address can be passed as a
   constant to spirv_to_nir and folded without the need to support
   spilling of constant initializers.

Drivers not able to give us a vm-cutout are left with implementing
cl_ext_buffer_device_address instead.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
9d7441dcb0 gallium: add fixed address resource API
cl_ext_buffer_device_address requires us to set a fixed address for a
given memory allocation. As this extension is intended to be implemented
on top of vulkan we have to take its limitations into account.

For SVM we'll add proper VM management interfaces, but zink won't be able
to implement those, so here we are.

The old interfaces added back in clover's time were modeled after a very
bindful resource model and the frontend was require to bind all the used
resources ahead of launch_grid.

cl_ext_buffer_device_address and also SVM however will require us to
dynamically attach a list of buffers used in a dispatch with known
addresses, hence set_global_binding isn't really suited for those use
cases.

So PIPE_RESOURCE_FLAG_FIXED_ADDRESS is added to tell a driver that the
address of a resource needs to stay the same over its lifetime, which then
can be queried via pipe_screen::resource_get_address.

All such buffers then can be either bound via set_global_binding or passed
in via pipe_grid_info::globals.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Karol Herbst
833bd74291 include: sync CL headers
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
Valentine Burley
4986c650f6 ci: Don't forward long environment variables
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Filter out the CI_COMMIT_DESCRIPTION, CI_COMMIT_MESSAGE, and
CI_MERGE_REQUEST_DESCRIPTION variables, which were causing issues in LAVA.

Fixes: cc83b3db5f ("ci: Forward all environment variables to DUTs and crosvm")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35196>
2025-05-28 18:44:16 +00:00
Yiwei Zhang
28f051a024 panvk: drop bo refcount from panvk_image
The bound bo validity is blessed by the spec VU. No need to beat VVL in
userspace icd.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35197>
2025-05-28 18:06:57 +00:00
Yiwei Zhang
e9b7c88775 panvk: drop bo tracking from panvk_buffer
No longer needed.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35197>
2025-05-28 18:06:57 +00:00
Yiwei Zhang
7e2fe6d1c1 panvk: fix memory binding for wsi image alias
Fixes: f77fe432c1 ("panvk: support binding swapchain memory")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35197>
2025-05-28 18:06:57 +00:00
Eric Engestrom
1a6ad85c6c docs: add sha sum for 25.0.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35211>
2025-05-28 18:01:31 +00:00
Eric Engestrom
0937689d40 docs: add release notes for 25.0.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35211>
2025-05-28 18:01:31 +00:00
Eric Engestrom
4bf45ce167 docs: update calendar for 25.0.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35211>
2025-05-28 18:01:31 +00:00
Mary Guillemard
f6f5bee080 pan/genxml: Fix typo for NEXT_SB_ENTRY
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
"NEXT_SB_ENTR" -> "NEXT_SB_ENTRY"

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 811525b543 ("pan/genxml: Build libpanfrost_decode for v12")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
172dead3df panvk: Increase CSF scratch limits on v12+
We have way more registers to work with and we are going to need an
additional register for indirect scoreboard handling so let's increase
our scratch limits.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
50dc885eb2 panvk: Set proper upper limit for IDVS reg blacklist on v12+
This was forgotten when introducing v12+ support.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
bacd87ba3c panfrost: Fix codestyle issue with cs_nop
We never use this kind of form in that header and that was bumping on
clang-format a lot.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
3a5d1d74ec panfrost: Add indirect mode for async operations on v11+
v11 and later allows to indirectly wait on a scoreboard mask and signal
a scoreboard (as set via SET_STATE)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
a0826ad205 panfrost: Add cs_* helpers for v11 CSF instructions
This adds all bit operations and an helper to indirectly wait on
scorebards.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
d0c76cd2ac panvk: Depends on Panthor scoreboard information
Instead of hardcoding scoreboard count and mask, we now derive those
informations from Panthor CSIF properties.

We still limit iters to 5 as we currently don't support more.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Mary Guillemard
80b06fb82f panfrost: Allow up to 16 for scoreboards on CSF instructions on v11+
The max value on v11+ is 16.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35089>
2025-05-28 17:03:30 +00:00
Alyssa Rosenzweig
d696b19dd0 nir/lower_int64: add bitfield_reverse lowering
now that we can represent 64-bit bitfield_reverse in NIR, we need a lowering for
it as well.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35198>
2025-05-28 16:29:30 +00:00
Alyssa Rosenzweig
c3fb0645d8 nir/lower_alu: compact bitcount lowering
while in the area.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35198>
2025-05-28 16:29:30 +00:00
Alyssa Rosenzweig
759dc70bde nir: generalize bitfield_reverse bit size
No reason we can't reverse other bit sizes, we just need to generalize the
constant folding & bit size lowering.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35198>
2025-05-28 16:29:30 +00:00
Christian Gmeiner
2e6c565b77 vc4: Use nir_shader_intrinsics_pass(..) for vc4_nir_lower_blend(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35205>
2025-05-28 16:12:22 +00:00
Christian Gmeiner
f2b03202e7 vc4: Use nir_shader_intrinsics_pass(..) for vc4_nir_lower_io(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35205>
2025-05-28 16:12:22 +00:00
Alyssa Rosenzweig
d7c0355725 asahi: advertise ASTC HDR formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
be74e9ffaf pan/lib: wire up ASTC HDR formats
This exposes GL_KHR_texture_compression_astc_hdr, which makes a few
piglit tests go from fail to pass.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
d9dbf5cebf panfrost: set decode_hdr when needed
When using the HDR-formats, we need to set decode_hdr to actually get
HDR values.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
33ad5d447e panfrost: correct texfeat-bit for ASTC LDR
These formats don't depend on the ASTC HDR texfeat, they depend on the
ASTC HDR texfeat. The ASTC HDR texfeat simply adds support for more
endpoint encodings to these formats.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
95d7df1ce3 gallium/st: enable KHR_texture_compression_astc_hdr when supported
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
fd42cdfc01 mesa/main: support astc_hdr formats
This gets a bit annoying because Vulkan has separate format enums for
the LDR and HDR ASTC formats, whereas OpenGL uses the same format enums,
but allows additional color-endpoint encodings when HDR is supported.

Either of these behaviors makes sense on their own, but since we share
pipe_format definitions between the APIs, we need to resolve this. This
patch does that by checking if the HDR extension is supported, and
always using the HDR formats. This works, because the HDR formats are
supersets of the LDR formats in terms of features.

Not all of the LDR formats have HDR variants, either because they're
sRGB or 3D, which either is nonsensical or just not exposed by the
ASTC HDR extensions. So we only need to map a subset of the ASTC formats
with this HDR-aware mapping.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
6cd898dbc2 util/format: add util_format_is_astc_hdr()-helper
This will be used later in the series.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Erik Faye-Lund
ccc7833f16 util/format: add ASTC HDR formats
These are just the float variations of the normal LDR formats. Not all
LDR formats have an HDR variant.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35132>
2025-05-28 14:49:06 +00:00
Daniel Stone
ae8704fbdb ci/panfrost: Demote T720 to nightly runs only
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We only have two of these boards, and can't get more as they're EOL.
Demote them to nightly until we can source different boards with this
SoC, and more of them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35200>
2025-05-28 12:48:45 +00:00
Mary Guillemard
8965e60118 panfrost: Fix varying descriptors on v12+
Since introduction of support for more than 16 varyings, support for
v12+ has been broken on certain apps.

This manifest with a black screen on all GL Core 1.x apps like glxgears
or xonotic in legacy mode.

The issue is a wrong buffer index being used on v12 for the varying
descriptors.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: cd2ca0ac22 ("panfrost: Enable more than 16 varyings on v9+")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35201>
2025-05-28 12:16:35 +00:00
Marek Olšák
2b716972c6 radeonsi: enable 16-bit ALU, LDS, uniforms on gfx8
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Dieter Nützel Dieter@nuetzel-hh.de on gfx8 (Polaris 20)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34959>
2025-05-28 11:01:12 +00:00
Marek Olšák
45cbd60c3b glsl,gallium: add an option not to lower mediump tex & image dst
ACO doesn't support it for gfx8.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Dieter Nützel Dieter@nuetzel-hh.de on gfx8 (Polaris 20)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34959>
2025-05-28 11:01:12 +00:00
Marek Olšák
bd5d623674 glsl: fix sampler and image type checking in lower_precision
Use the param type, not the referenced variable. The referenced variable
can be a structure, which wouldn't be recognized as a sampler or image.

Fixes: 733bee57eb - glsl: lower samplers with highp coordinates correctly

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Dieter Nützel Dieter@nuetzel-hh.de on gfx8 (Polaris 20)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34959>
2025-05-28 11:01:12 +00:00
Marek Olšák
0dc5d649ea winsys/amdgpu: fall back to a normal priority without root in the winsys
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:15 +00:00
Marek Olšák
2ef6aa5934 winsys/amdgpu: pass PIPE_CONTEXT_* flags to ctx_create
instead of using our own flags; also REALTIME_PRIORITY is never used,
so the relevant code is removed

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
2025-05-28 10:23:15 +00:00