Commit graph

205418 commits

Author SHA1 Message Date
David Rosca
fb53eec720 radeonsi/uvd_enc: Remove unused stream_handle
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34807>
2025-05-13 09:36:47 +00:00
Natalie Vock
4339cf0aff driconf: Add workarounds for DOOM: The Dark Ages
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Like other idTech games, it needs radv_zero_vram and
radv_disable_dedicated_sparse_queue. It also needs
radv_force_64k_sparse_alignment.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34944>
2025-05-13 07:58:03 +00:00
Natalie Vock
e32a90b57c radv,driconf: Add radv_force_64k_sparse_alignment config
Needed by DOOM: The Dark Ages.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34944>
2025-05-13 07:58:03 +00:00
Tapani Pälli
720dae85f2 mesa: add missing stencil formats to _mesa_is_stencil_format
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13070
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34931>
2025-05-13 07:29:04 +00:00
Samuel Pitoiset
4b73d7e817 radv: fix SDMA copies for linear 96-bits formats
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The hardware requires a power of two bpe. To do that, the driver
needs to adjust the pitch/offset/extent based on a texel scale factor
which only applies to 96-bits formats.

This fixes new VKCTS coverage.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34927>
2025-05-13 06:15:55 +00:00
Marek Olšák
a1ee6d6730 nir: fix gathering color interp modes in nir_lower_color_inputs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 709ebd82 ("amd: expose nir_io_mix_convergent_flat_with_interpolated")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12800

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34942>
2025-05-13 00:05:37 -04:00
Mike Blumenkrantz
ef63e3e4d2 zink: fix broken comparison for dummy pipe surface sizing
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this should create a new surface if the existing one is too small,
not if it is too big

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34933>
2025-05-12 19:34:08 +00:00
Danylo Piliaiev
824194aa0b tu: Don't disable EARLY_Z if SampleMask is written without d/s write
With EARLY_Z depth is written before FS is executed, so if FS writes
gl_SampleMask - the d/s written before FS would be incorrect since
sample mask can kill samples. However, if there is no d/s write
it's ok to kill fragment before FS.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34900>
2025-05-12 19:04:54 +00:00
Konstantin Seurer
5926b63f66 nir: Print struct type declarations
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26267>
2025-05-12 18:28:50 +00:00
Konstantin Seurer
5981b5bb7e nir/print: Use get_name for types
This avoids an awkward "  " if the struct name is missing.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26267>
2025-05-12 18:28:50 +00:00
Konstantin Seurer
d21311504b nir/print: Add a get_name helper
get_name works for any identifier, not just variables.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26267>
2025-05-12 18:28:50 +00:00
Job Noorman
96e2cf64ae freedreno/ci: update expectations
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
53de95cb0d ir3/postsched: use legalize state for delay/sync calc
Switch to using the newly available ir3_legalize_state API in
ir3_postsched. This has a few advantages:
- Prevents duplication of delay/sync logic. ir3_postsched is currently
  missing a lot of the complexities implemented in ir3_legalize. Reusing
  the logic makes sure ir3_postsched is kept up to date with these
  complexities.
- Allows ir3_postsched to have a global view (i.e., across blocks) on
  delay and sync state. Currently, all information is cleared at the
  start of blocks which makes us underestimate required delays.
- Allows ir3_postsched to have a more accurate view on required sync
  flags. We currently calculate requirement once based on whether an
  instruction's sources come from a ss/sy-producer. This does not take
  into account whether sources have already been synced. Now we can do
  this.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
ca014c7c24 ir3/legalize: make ir3_legalize_state and helpers public
Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
631a105148 ir3/legalize: apply ss/sy to state in sync_update
This will keep the state consistent without having to worry about
calling apply_ss/sy.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
a0c2fdd152 ir3/legalize: add syncs based on previous instr to sync_update
sync_update currently only deals with the current instruction but there
are a few cases where syncs depend on the previous instruction (e.g.,
barriers). Add those to sync_update/ir3_required_sync_flags to have all
the sync logic centralized.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
7a44d832d3 ir3/legalize: add ir3_update_legalize_state helper
This is a convenience helper that updates 1) the sync state, 2) the
delay state, and 3) the block's current cycle value.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
0e9b7c6ff3 ir3/legalize: remove unused parameter from delay_update
Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
0c05839fcd ir3/legalize: extract ir3_merge_pred_legalize_states helper
We will want to use this functionality in ir3_postsched.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
d4503b01b7 ir3/legalize: add ir3_init_legalize_state helper
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
ee430745fe ir3/legalize: extract sync_update helper
We will want to use this functionality in ir3_postsched.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
b91828d553 ir3/legalize: extract ir3_required_sync_flags helper
We will want to use this functionality in ir3_postsched.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
540cee6c3b ir3/legalize: remove ctx argument from delay_calc/update
In preparation for making these functions usable outside of
ir3_legalize.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:05 +00:00
Job Noorman
f7002802c3 ir3/legalize: normalize nop state at block start
Now that we have the block's final cycle value available in its state,
we don't have to subtract it at the end of a block anymore, but we can
do it at the beginning when merging it into its successor state. This
will save us one iteration over all its ready slots.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:04 +00:00
Job Noorman
03ee7c7c0f ir3/legalize: add cycle to ir3_legalize_state
Having the cycle as part of the state will become convenient for two
reasons:
- It will allow us to merge the state of predecessors without having to
  normalize states at the end of blocks (i.e., we now have to subtract
  the block's final cycle value from its ready slots at the end of the
  block; having its final cycle value available in its state will allow
  us to do this when merging predecessor states at the start of the
  block).
- We can update the cycle value as part of delay/sync state update
  routines. This way, the user doesn't have to worry about which
  instructions should actually update the cycle as this logic is nicely
  encapsulated.

This is part of the preparation for making the delay/sync legalization
logic available outside of ir3_legalize.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:04 +00:00
Job Noorman
12fadd27d3 ir3: add mergedregs to ir3_compiler
Storing it only in ir3_shader is sometimes inconvenient because it's not
available everywhere.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:04 +00:00
Job Noorman
0977863a8e ir3: calculate sstall/systall across blocks
Resetting the ss/sy delays at the start of blocks would underestimate
the actual delays at runtime. Make the estimate more accurate by keeping
track of outstanding delays at the end of blocks and setting the initial
delays of blocks to the maximum of their predecessor blocks.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108>
2025-05-12 17:58:04 +00:00
Faith Ekstrand
13f9135e85 compiler/rust: Better document CFG
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
98deabfa90 nak: Fix some rusdoc warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
3459004104 nak: Improve documentation for RegRef
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
22056d5b08 nak: Improve documentation for PerRegFile
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
d9cd61dc23 nak: Improve documentation on RegFile
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
c022e22368 nak: Improve documentaiton for SSAValue and SSARef
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919>
2025-05-12 17:31:33 +00:00
Faith Ekstrand
b26b0211b6 nak: sm32: Add Texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329>
2025-05-12 16:41:48 +00:00
Lorenzo Rossi
2929dae1e8 nak: Initial SM32 support
This commit adds most operations to enable compute and basic draw tasks
for KeplerB (also known as Kepler 2.0, chips GK110 to GK180 or codename
NVF0-NVF1).  There are still major aspects such as as textures,
surfaces, shared atomics and scheduling that still need work and will be
added in other commits.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329>
2025-05-12 16:41:48 +00:00
Lorenzo Rossi
ee4cff7603 nvk: nak: Add OpViLd support
Kepler and earlier GPUs do not support the ISBERD instruction but have a
different VILD (Vertex Indirect Load) instruction that provides less
functionality.  This commit adds support for the op in nak and nir,
needed for the upcoming encoder commit.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329>
2025-05-12 16:41:48 +00:00
Konstantin Seurer
2d48b2cb47 radv: Use subgroup OPs for BVH updates on GFX12
This patch changes the update code to launch 8 invocations for every
internal node. The internal nodes update their child leaf nodes using
the geometry index and primitive index stored inside the primitive node.

Processing 8 child nodes in parallel is faster than looping over them.
Moving to one dispatch that updates all nodes in one go lets us get rid
of atomics and will also enable updatable BVHs to use pair compression.

Improves Elden Ring (high settings, max RT settings, 1080p) by around
10%.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:31 +02:00
Konstantin Seurer
c6fdf11303 radv: Make radv_update_memory non-static
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:25 +02:00
Konstantin Seurer
4a8e232e39 vulkan: Add more information to BVH update callbacks
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:16 +02:00
Konstantin Seurer
5da0810e5d vulkan/bvh: Add type information for vk_bvh_geometry_data
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:11 +02:00
Konstantin Seurer
8157f84246 radv: Refactor the update scratch layout code
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:06 +02:00
Konstantin Seurer
b2aa0647d5 radv: Use a specialized shader for in place updates
If src == dst, we only need to update aabbs for the internal nodes.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:45:00 +02:00
Konstantin Seurer
e1110d20f8 vulkan: Add acceleration structure update keys
The driver can use an optimized shader when src == dst.

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601>
2025-05-12 17:44:56 +02:00
Sergi Blanch Torne
0796d8c502 fluster: xfile update
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
During the maintenance, and proably the previous MR to the first attempt
to merge, fixed a failing test without testing on fluster because the
farm was disabled.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34922>
2025-05-12 14:25:54 +00:00
Sergi Blanch Torne
89d4f16c41 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit c06033955e.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34922>
2025-05-12 14:25:54 +00:00
Corentin Noël
77c0ff9fc7 virgl: Bail out on file descriptor duplication failure
Do not try to use a negative file descriptor.

CID: 1465120 Argument cannot be negative

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
965f41b550 virgl: Ensure to not overflow when encoding string marker
The maximal length is 65535 as an offset of 16 bits is being used to encode it.

Afterwards in VIRGL_CMD0, the buf_len equals 65536, so buf_len << 16 overflows its type which is uint32_t.

CID: 1604743 Overflowed constant
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
11a7b112cb vtest: Be more resilient when a resource creation has failed
Do not override the handle number with 0 if we fail to create a new resource.

Also make sure to store the handle consistently in an uint32_t.

CID: 1644460 Overflowed constant
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
Corentin Noël
5bec582e30 vtest: Silence some coverity issues
Add assertion about the returned read/written size being smaller than the size
left

CID: 1605126, 1604911
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816>
2025-05-12 14:08:04 +00:00
David Rosca
4fca9d9699 pipe/video: Remove st_rps_bits and UseStRpsBits
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34836>
2025-05-12 13:12:05 +00:00