Commit graph

210186 commits

Author SHA1 Message Date
Valentine Burley
7a71e2e41b ci: Separate build and test container tags
Rebuilding all the test containers for a change that only affects the
build containers is costly and unnecessary. Split the `DEBIAN_BASE_TAG`
into `DEBIAN_BUILD_BASE_TAG` and `DEBIAN_TEST_BASE_TAG` to make it
possible to rebuild only the relevant half of the containers.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36736>
2025-08-12 17:16:35 +00:00
Aaron Ruby
796e11008d vulkan/wsi: No commandPool allocation required for WSI_SWAPCHAIN_NO_BLIT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
commandPools/cmdBuffers are only required for swapchain configurations
that use a blit-queue. They do not need to be allocated at all in the
"no blit" configuration.

There are some validUsage issues with the commandPool allocation, namely
that the WSI impl assumes that the logical device was created with all
queueFamilies made available to it. This is an invalid assumption that
can result in: VUID-vkCreateCommandPool-queueFamilyIndex-01937 invalid
usage on the eventual call to the driver. Note: invalid usage by WSI
wouldn't normally be detectable without virtualization.

This change reduces the scope of that invalid usage.

Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36361>
2025-08-12 11:44:24 -04:00
Gert Wollny
8c65da0c9d r600/sfn: cleanup GS shader emission
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 lower all load_per_vertex_input to
r600_load_per_vertex_input we can remove some dead code
and also change the intrinsic to use only one source value.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36488>
2025-08-12 14:30:17 +00:00
Gert Wollny
eccd178f0b r600/sfn: Lower all GS indirect input loads after lowering IO
Extend the lowering of indirect GS array inputs to include
all indirect access. This replaces
   r600_gs_load_deref_io_to_indirect_per_vertex_input
which was restricted to vec4 POS inputs. The
new lowering pass works in all vayings and all types, so we
can also drop the call to nir_lower_indirect_derefs.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36488>
2025-08-12 14:30:16 +00:00
Gert Wollny
356bc41797 r600/sfn: resolve constant indices into local arrays better
When the code is first generated constants are loaded to registers, so to
avoid indirect array register access that can be resolved as a direct direct
access we have to check whether the address register is loaded
with a constant value.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36488>
2025-08-12 14:30:15 +00:00
Gert Wollny
874005aeb7 r00/sfn: Fix copy propagation into buffer load address
A buffer load can not use an indirect register as address.

Fixes: 79ca456b48 ("r600/sfn: rewrite NIR backend")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36488>
2025-08-12 14:30:14 +00:00
Gert Wollny
39543f6b5c r600/sfn: Handle indirect access to GS input arrays
nir_intrinsic_load_per_vertex_input has two source values, indirect access
by using the first value is already handled, but accessing arrays with
the second index was missing but became relevant with handling most IO
optimizations with nir_opt_varyings.

Fixes: 37ae4df3e4 ("glsl: remove most IO optimizations that are replaced by nir_opt_varyings")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36488>
2025-08-12 14:30:14 +00:00
Gert Wollny
9c8d8cfa07 r600/sfn: factor out adding an input in GS
This is a preparation for the next patch that will fix
indirect access using the second index of load_per_vertex_input

Fixes: 37ae4df3e4 ("glsl: remove most IO optimizations that are replaced by nir_opt_varyings")

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36488>
2025-08-12 14:30:13 +00:00
Derek Foreman
b94add2977 dril: Skip some pipe formats to avoid breaking X
In the case where gbm fails to init, we use our entire format list. That
became a problem in commit 642c4cf2b2 when some formats were added to the
list that X can't handle. This leads to X crashing when using glx and
trying to use certain visuals.

An easily testable manifestation of this crash is to run piglit's
glx-create-context-ext-no-config-context under Xwayland in a virtual
machine that has no gpu, whilst using zink. Much like our CI does for some
jobs.

Fixes: 642c4cf2b2 ("dril: add BGR{X,A}8888 and RGB{X,A}8888")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36575>
2025-08-12 14:06:05 +00:00
Samuel Pitoiset
0d4d73a780 radv: implement an alternative workaround for HiZ on GFX12
This disables HiZ on-demand when both depth/stencil are enabled and
depth writes are enabled to prevent potential issues.

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
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