Commit graph

210161 commits

Author SHA1 Message Date
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
Marek Olšák
9cede6e8b0 radeonsi: bitcast shader args to float in LLVM IR manually
This will allow us to merge AC_ARG_FLOAT/INT because nothing else uses
the type.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36696>
2025-08-11 15:32:27 -04:00
Marek Olšák
324a7f7e24 ac/llvm: make ac_get_arg non-inline
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36696>
2025-08-11 15:32:25 -04:00
Marek Olšák
54fe9aa664 ac: simplify AC_ARG_CONST_*PTR enums
The pointer type doesn't matter 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:23 -04:00
Marek Olšák
d5d5726908 ac/nir: remove unused ac_get_ptr_arg & ac_arg_type_to_pointee_type
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36696>
2025-08-11 15:32:19 -04:00
Marek Olšák
dbefe0c26d ac/nir: inline ac_get_ptr_arg
so that we can get rid of ac_get_ptr_args.

RADV uses AC_ARG_CONST_PTR for num_work_groups, which maps to i8, which
seems wrong.

No functional change.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36696>
2025-08-11 15:32:17 -04:00
Marek Olšák
4edcd8a87f ac/llvm: inline ac_array_in_const*_addr_space
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36696>
2025-08-11 15:32:15 -04:00
Job Noorman
a1278095d3 ir3: align alias sequences to work around hardware bug
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There seems to be a hardware bug that sometimes causes a GPU hang when
an alias...sam sequence crosses an instruction cache line boundary. This
commit adds a workaround pass that inserts padding nops to ensure no
such sequence cross a cache line. Until an alternative solution is
found, this is the best we can do.

While the number of nops we have to insert is fixed at this point, we
can try to minimize the number of nops executed at runtime by replacing
nops encoded in instructions by standalone nops. That is, if this pass
has to insert one nop, it will try to make one of the following
replacements:
- (rptN)nop -> (rptN-1)nop; nop
- (nopN)foo -> (nopN-1)foo; nop

It does so by keeping track of "insert points". Each insert point keeps
track of the instruction and the maximum number of nops that can be
inserted there without pushing any subsequent alias sequences over the
next cache line. Whenever we need to insert nops, we first try it at the
encountered insert points and only if that doesn't work, we insert them
right before the first alias. The pass makes sure the insert points are
only visited a bounded number of times in total to keep the whole pass
O(n).

Totals:
Instrs: 48207402 -> 48278230 (+0.15%)
CodeSize: 101907026 -> 102294524 (+0.38%)
NOPs: 8386320 -> 8457148 (+0.84%)
(ss)-stall: 4013046 -> 4012931 (-0.00%)
(sy)-stall: 16741190 -> 16741033 (-0.00%)
Preamble Instrs: 11506988 -> 11520671 (+0.12%)
Last helper: 11686328 -> 11701615 (+0.13%)
Cat0: 9241457 -> 9312285 (+0.77%)

Totals from 25237 (15.32% of 164705) affected shaders:
Instrs: 22172360 -> 22243188 (+0.32%)
CodeSize: 44372164 -> 44759662 (+0.87%)
NOPs: 4201698 -> 4272526 (+1.69%)
(ss)-stall: 1982473 -> 1982358 (-0.01%)
(sy)-stall: 7379552 -> 7379395 (-0.00%)
Preamble Instrs: 4552074 -> 4565757 (+0.30%)
Last helper: 6260280 -> 6275567 (+0.24%)
Cat0: 4616677 -> 4687505 (+1.53%)

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36639>
2025-08-11 17:07:10 +00:00
Eric Engestrom
b24709960d ci: move setting python path for structured_logger.py to where it's actually used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36685>
2025-08-11 16:36:45 +00:00
Eric Engestrom
2161b47d3f ci/init-stage2: drop no-op "copy python path into python path"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36685>
2025-08-11 16:36:45 +00:00
Eric Engestrom
aef01d73d8 ci: uprev vkd3d
Fixes all the workgraph failures, but also introduces two new failures
for lavapipe.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36712>
2025-08-11 15:57:35 +00:00
Corentin Noël
de55edade7 docs/features: Add missing llvmpipe extensions
Also mark GL 4.6, GLSL 4.60 as all DONE for llvmpipe.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36721>
2025-08-11 15:52:38 +00:00
Erik Faye-Lund
657080fe59 nvk: drop some needless definitions and deps
We already have these two:
- dep_android comes from vulkan_lite_runtime_deps, through
  idep_vulkan_runtime.
- VK_USE_PLATFORM_ANDROID_KHR comes from idep_vulkan_wsi_defines,
  through idep_vulkan_runtime.

So let's remove these two, as they don't really add anything new.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36716>
2025-08-11 15:35:24 +00:00
Aleksi Sapon
3bd0badd3a util: SWAP macro implementation for older MSVC versions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36682>
2025-08-11 13:50:02 +00:00
Erik Faye-Lund
fe42a3d0eb meson/util: properly detect sysconf
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
There's two functions that use sysconf(), and they don't seem to agree
on what combination of platforms supports the function. Let's perform
proper function detection instead.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:23 +00:00
Erik Faye-Lund
e636991c78 prefer _SC_PAGESIZE over _SC_PAGE_SIZE
The POSIX spec says that_SC_PAGE_SIZE is a synonym for _SC_PAGESIZE, and
both will have the same value. Let's be consistent in which one we use,
and let's use the one that points directly to the authoritative
documentation.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:23 +00:00