Commit graph

210176 commits

Author SHA1 Message Date
Samuel Pitoiset
b6a9ed48c9 radv: validate dynamic states earlier
This will be needed to emit the GFX12 alternative HIZ wa.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36739>
2025-08-12 13:48:10 +00:00
Samuel Pitoiset
3de108da66 radv/meta: update HiZ metadata after depth/stencil image clears
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36739>
2025-08-12 13:48:10 +00:00
Samuel Pitoiset
e6c485afb0 radv: initialize HiZ metadata during image layout transitions
This will allow us to enable HiZ for all levels of the image.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36739>
2025-08-12 13:48:10 +00:00
Samuel Pitoiset
297cf6f1aa radv/meta: add a pass to clear HiZ surfaces
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36739>
2025-08-12 13:48:09 +00:00
Samuel Pitoiset
8886a3385b radv: add a function to create an image view for HiZ surfaces
Only for storage because that's the only use case.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36739>
2025-08-12 13:48:09 +00:00
Samuel Pitoiset
d89922a6a8 radv: allocate image metadata to implement a workaround for HiZ on GFX12
This will be used to determine if HiZ can enabled per level.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36739>
2025-08-12 13:48:09 +00:00
Samuel Pitoiset
a2d996b70c ac/descriptors: add a function to create a descriptor for HiZ surfaces
HiZ is a separate image using standard image layout and tiling.
No need to support HiS which isn't available in any production chips.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36739>
2025-08-12 13:48:09 +00:00
Mike Blumenkrantz
c7045e3e63 perfetto: unify init
util_perfetto_init() was called in some places, util_cpu_trace_init()
was called in other places, and some places used tracing without ever
calling either of them

util_cpu_trace_init() is now guaranteed to be called:
* on gallium screen create
* on VK instance create

thus no driver/frontend/etc should ever need to call this manually

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36628>
2025-08-12 13:17:43 +00:00
Caterina Shablia
f53bf77d47 panvk/csf: plop the stage and access masks into panvk_sync_scope
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Stage and access masks often go together. Representing the two
with a single value lets us have neater code.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36176>
2025-08-12 12:43:10 +00:00
Caterina Shablia
1f7af54da9 panvk: do not zero AFBC when an image is being bound
Binding an image must not write anything into the memory it's
being bound to.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36176>
2025-08-12 12:43:10 +00:00
Caterina Shablia
ed6f6c723f panvk: call cmd_transition_image_layout for each image memory barrier
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36176>
2025-08-12 12:43:10 +00:00
Caterina Shablia
c95f899305 panvk: add a meta command for transitioning image layout
Currently the only thing this function ever does is clear AFBC
metadata when transitioning away from UNDEFINED.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36176>
2025-08-12 12:43:10 +00:00
Caterina Shablia
8e3fb838ac panvk/csf: change get_cs_deps to be add_cs_deps
Make get_cs_deps accumulate the dependencies. This is useful when
implementing layout transitions. Layout transitions away from
UNDEFINED are implemented with a compute dispatch sandwiched
in-between src and dst, specified in the image barrier. When
implementing device event wait and the event dependency needs a
layout transition, we can defer emitting the barrier that syncs
layout transition dispatches with dst until after we have emitted
all dispatches, avoiding sync between the said transition
dispatches.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36176>
2025-08-12 12:43:10 +00:00
Caterina Shablia
e6d2a426e6 vulkan/runtime: add vk_image_subresource_slice_count
vk_image_subresource_slice_count is useful when implementing image
barriers. When maintenance9 is enabled,
VkImageSubresourceRange::{baseArrayLayer,layerCount} specify the
slices, rather than layers, to transition. This helper returns
the number of slices specified in the subresource range, accounting
for the VK_REMAINING_ARRAY_LAYERS sentinel.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36176>
2025-08-12 12:43:10 +00:00
Erico Nunes
d4fdcdc13c Revert "ci: lima farm maintenance"
This reverts commit 12a9bf968d.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36738>
2025-08-12 11:25:21 +00:00
Georg Lehmann
8818d7367d nir/opt_load_skip_helpers: optionally handle intrinsics
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610>
2025-08-12 08:56:37 +00:00
Georg Lehmann
cd687e277f nir: add access for scratch loads
To be able to use ACCESS_SKIP_HELPERS.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610>
2025-08-12 08:56:37 +00:00
Georg Lehmann
2d16f457c5 nir: add ACCESS_SKIP_HELPERS
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36610>
2025-08-12 08:56:37 +00:00
Georg Lehmann
91572a99bb nir: rename to nir_opt_load_skip_helpers and add options struct
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/36610>
2025-08-12 08:56:37 +00:00
Georg Lehmann
fbae0893a6 nir: print skip_helpers for tex instrs
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/36610>
2025-08-12 08:56:37 +00:00
Georg Lehmann
6577f68ad4 nir/opt_tex_skip_helpers: never require helpers for stores/atomics
Helpers never execute stores/atomics.

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/36610>
2025-08-12 08:56:37 +00:00
Georg Lehmann
26e6c4c092 nir/opt_tex_skip_helpers: don't skip helpers for terminate_if source
Helpers must be terminated correctly.

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/36610>
2025-08-12 08:56:37 +00:00
Jordan Justen
12eb51fb0a intel/dev: Add BMG 0xe209 PCI ID
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Backport-to: 25.1, 25.2
Ref: ccfb15b815
Ref: bspec 68090
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36668>
2025-08-12 01:17:26 -07:00
Corentin Noël
4465a63456 docs/features: Add missing virgl extensions
Add all some missing available extensions for virgl

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36735>
2025-08-12 08:04:30 +00:00
Samuel Pitoiset
0c9f079295 radv/amdgpu: fix creation with different but unused RADV_PERFTEST flags
This fixes an issue with Hellblade Senua's Sacrifice because
RADV_PERFTEST_RT_WAVE_64 is set using drirc, but if two devices are
created RADV_PERFTEST flags might differ.

The proposed solution is to filter out unused RADV_PERFTEST flags for
the winsys.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36727>
2025-08-12 07:46:04 +00:00
Samuel Pitoiset
b2ea120732 ac,radv,radeonsi: fix programming PA_SU_PRIM_FILTER_CNTL on GFX12
GFX12 seems to behave slightly differently. Setting these bits to TRUE
causes zero-area triangles to not pass the primitive clipping stage.
So, the actual number of primitives output by the primitive clipping
stage was wrong.

After digging a lot, it seems PAL doesn't set these bits either on
GFX12.

CC: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36670>
2025-08-12 07:06:36 +00:00
Samuel Pitoiset
f23d211b16 radv: fix destroying CS with RADV_PERFTEST=dmashaders
Typo during this huge refactor with radv_cmd_stream.

Fixes: 3ccb48ec46 ("radv: switch to radv_cmd_stream everywhere")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36706>
2025-08-12 06:48:20 +00:00
Gert Wollny
8746397461 r600/sfn: allow skipping RA for shader ID ranges
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This helps identifying problems with RA when many shaders
are compiled.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36554>
2025-08-11 22:28:36 +00:00
Gert Wollny
db8c3aae8d r600: Update GPR count when adding a GDS instruction
CC: mesa-stable

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36554>
2025-08-11 22:28:35 +00:00
Gert Wollny
ed04848770 r600/sfn: update readports before trying to schedule group instrutions
We only do minimal checks to ensure that copy propagation doesn't break
the readport setup, but we don't update the groups readport setup. So
before scheduling the group do this update. Also check the readport
constellation when scheduling a group is finished.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36572>
2025-08-11 22:10:08 +00:00
Gert Wollny
070f56237f r600/sfn: Fix update readports method
- If a readport reservation is not successful then we have to reset the
  readport reservation.
- Since the scheduler can add instructions in any order, we have to
  update the readports in the same order the slots were filled when
  re-evaluating.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36572>
2025-08-11 22:10:08 +00:00
Gert Wollny
316d3a3f95 r600/sfn: reuse readport for already loaded registers
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36572>
2025-08-11 22:10:07 +00:00
Gert Wollny
68d5f1c456 r600/sfn: unify and fix naming of group readport reserver
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36572>
2025-08-11 22:10:07 +00:00
Gert Wollny
9ce6d9ff1f r600/sfn: Simplify test code when scheduling a vec instr into trans
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that we track the free slots right away, we can make use of this
information when testing whether a vec instruction can be scheduled into
a trans slot.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36584>
2025-08-11 21:54:38 +00:00
Gert Wollny
a6d97070a7 r600/sfn: rename free_slots and improve updating it
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36584>
2025-08-11 21:54:38 +00:00
Gert Wollny
67d0f51029 r600/sfn: check number of fsat64 source uses properly
Fixes: 255eee10ac
    r600/sfn: Implement fsat for 64 bit ops

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36585>
2025-08-11 21:40:10 +00:00
Gert Wollny
206ec1ff77 r600/sfn: lower u2f64 and i2f64 in nir
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36587>
2025-08-11 21:26:20 +00:00
Gert Wollny
f7552429ef r600/sfn: remove first call to r600_split_64bit_alu_and_phi
The pass is run later a second time, but there is no need to do it twice.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36587>
2025-08-11 21:26:20 +00:00
Gert Wollny
6fea840c2c r600/sfn: Allow f2f64 to use vec2
Lowering u2f64 and i2f64 will create such instructions and with that
the ALU groups are filled without the need to do scheduler trickery with
two-slot ops that have also two dest registers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36587>
2025-08-11 21:26:20 +00:00
Gert Wollny
fdaf105178 r600/sfn: lower b2f64 in nir
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36587>
2025-08-11 21:26:20 +00:00
Yonggang Luo
f12ad5da70 microsoft/clc: Improve clc_compiler_test.cpp to use defined expect value
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36723>
2025-08-11 21:11:18 +00:00
Yonggang Luo
c2f6efbc8a microsoft/clc: {} for struct initialize to avoid warning
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36723>
2025-08-11 21:11:18 +00:00
Faith Ekstrand
6ece4f3fa0 vulkan: Add a vk_video_session_finish() helper
It's always better if init/finish come in pairs.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36646>
2025-08-11 20:34:56 +00:00
Faith Ekstrand
22a1f34728 radv: Delete radv_video_session_params
It was just a dummy wrapper around the runtime struct.  We do, however,
have to keep at least the Create/Update entrypoints because RADV has to
do some patching for video encode.  Since we're keeping Create, we keep
Destroy as well.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36646>
2025-08-11 20:34:56 +00:00
Faith Ekstrand
e0b25e78ff anv: Delete anv_video_session_params
It's just a dummy wrapper around the common struct.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36646>
2025-08-11 20:34:56 +00:00
Faith Ekstrand
8f03f9b443 vulkan: Add common VideoSessionParametersKHR entrypoints
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36646>
2025-08-11 20:34:56 +00:00
Faith Ekstrand
9d6f65db9a vulkan: Add handle casts for vk_video_session[_parameters]
This also allows us to simplify the interface to
vk_video_session_parameters_create().

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36646>
2025-08-11 20:34:56 +00:00
Faith Ekstrand
f8086c6472 vulkan/video: Switch vk_video_session_parameters to create/destroy
These are never created on the stack or deep inside other objects so it
makes sense to use create/destroy instead of init/finish.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36646>
2025-08-11 20:34:56 +00:00
Marek Olšák
d93156c2a2 ac: merge AC_ARG_INT & AC_ARG_FLOAT into single AC_ARG_VALUE
nothing uses the type anymore

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36696>
2025-08-11 15:32:30 -04:00
Marek Olšák
bb8d2e55d1 ac/llvm: make AC_ARG_FLOAT equal to AC_ARG_INT
Nothing cares about the type anymore.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36696>
2025-08-11 15:32:29 -04:00