Commit graph

204548 commits

Author SHA1 Message Date
Marek Olšák
6d9e708642 ac/gpu_info: reduce the tess offchip ring size and compute it proportionately
.. to the CU count. We allocated too much.

This reduces the tess offchip ring size as follows (examples):
- GFX11-12:
  - Navi31, Navi33, and Navi48 get 75% decrease.
  - Navi32 gets 68.75% decrease.
  - Phoenix gets 81.25% decrease.
  - Phoenix2 gets 93.75% decrease.
- GFX10.3:
  - Navi21 and Navi22 get 37.5% decrease.
  - Navi23 and Navi24 get 50% decrease.
  - Rembrandt gets 62.5% decrease.
  - VanGogh gets 75% decrease.
  - Raphael gets 93.75% decrease.
- GFX8-9:
  - Vega10 gets 0% decrease.
  - Vega20 gets 49.6% decrease.
  - Raven gets 65.3% decrease.
  - Raven2 gets 93.7% decrease.
  - Stoney gets 81% decrease.

No difference in performance was measured.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
9333c0a1ed ac/gpu_info: compute the tess factor ring size proportionately to the CU count
No change in the size on GPUs with 16 CUs per SE such as Navi31 and Navi48.
Navi21 and Navi32 get 25% increase. (20 CUs per SE)

APUs get a significant decrease. For example:
- Phoenix gets 25% decrease
- Vangogh gets 50% decrease
- Phoenix2 gets 75% decrease
- Raphael and Stoney get 87.5% decrease

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
5fb2de9454 ac/nir: don't include TCS offchip size in LDS_SIZE
This drastically reduces LDS usage for TCS.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
b8f2fb81f6 ac/gpu_info: print tessellation ring info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
b8d15fee3d ac: minor cleanup of ac_compute_num_tess_patches
No change in behavior.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
a905a17f39 ac: use HS offchip wg size from radeon_info in ac_compute_num_tess_patches
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
d82eda72a1 ac/gpu_info: move HS info into radeon_info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:55:00 -04:00
Marek Olšák
ea294349bd radv: move the tess factor ring after the tess offchip ring
to match radeonsi

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:54:59 -04:00
Marek Olšák
c057d9105f ac/gpu_info: add total_tess_ring_size
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:54:59 -04:00
Marek Olšák
97119d980c ac/gpu_info: clean up ac_get_hs_info, use standard terms like workgroup
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:54:59 -04:00
Pierre-Eric Pelloux-Prayer
ac6351fd23 radeonsi/tests: use proper skip file
gbm-skips.txt has been renamed all-skips.txt in f9564e1754
("ci/piglit: Consolidate identical skip lists for X11 and gbm")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
2025-04-19 22:54:59 -04:00
Janne Grunau
3d3ca9b65e venus: virtgpu: Require stable wire format
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When VMMs do not support VIRTGPU_DRM_CAPSET_VENUS the capset data
remains zeroed. By requiring the stable wire_format_version 1 this can
be detected early without initialising the renderer.

Avoids triggering `assert(capset->supports_blob_id_0);` in debug builds
under such circumstances.

Cc: mesa-stable
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34613>
2025-04-19 21:02:17 +00:00
Yiwei Zhang
2a4675ee9f venus: fix missing renderer destructions
With failed compatibility check, the created renderer must be destroyed
within vn_instance_init_renderer.

Cc: mesa-stable
Fixes: 25b8f4f714 ("venus: handle device probing properly.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34613>
2025-04-19 21:02:17 +00:00
Janne Grunau
39e4fd98ce venus: Do not use instance pointer before NULL check
Fixes: a753f50668 ("venus: break up vn_device.c")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34613>
2025-04-19 21:02:17 +00:00
Faith Ekstrand
7d3a99a46c nak/sm20: Use the correct index field for OpS2R
It's 10 bits, not 6.

Fixes: 078ffb860b ("nak/sm20: Add initial SM20 encoding")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34619>
2025-04-19 14:58:35 -05:00
Lorenzo Rossi
4d8d6a28c8 nak: Use s2r for SV_CLOCK on Kepler
cs2r is new starting with Maxwell.  Prior to that we need to use s2r
which still works just fine, it's just slower.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34619>
2025-04-19 14:58:35 -05:00
Faith Ekstrand
142fb563c4 nak/sm20: Improve folding of ffma and dfma
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34619>
2025-04-19 11:06:19 -05:00
David Heidelberg
9855467ed0 docs: Rename distro to distribution
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32880>
2025-04-19 15:52:17 +02:00
David Heidelberg
5251c82404 docs: Drop distro unmaintained and deprecated file.
Pretty much useless.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32880>
2025-04-19 15:52:12 +02:00
Sushma Venkatesh Reddy
4084527876 intel/compiler: Always run opt_algebraic after descriptor_lowering
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This change ensures that `brw_opt_algebraic` is always executed after
`brw_lower_send_descriptors` in `brw_opt.cpp`. By doing so, redundant
logical operations are optimized, resulting in cleaner and more
compact assembly output.

fossil-db results on LNL:
- Totals:
  - Instructions: 215857290 -> 215857028 (-0.00%)
  - Cycle count: 32008929636 -> 32008935384 (+0.00%); split: -0.00%, +0.00%
  - Max live registers: 66940643 -> 66940557 (-0.00%)

- Affected shaders (104 out of 713963):
  - Instructions: 31090 -> 30828 (-0.84%)
  - Cycle count: 5955908 -> 5961656 (+0.10%); split: -0.16%, +0.26%
  - Max live registers: 10888 -> 10802 (-0.79%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34615>
2025-04-19 07:05:54 +00:00
Faith Ekstrand
c0f56fc64c nvk: Return an error for Kepler storage images instead of asserting
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This lets us fail without restarting dEQP, making CTS runs faster.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Faith Ekstrand
f6b9d13a15 nak/sm20: Implement OpBar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Faith Ekstrand
8401a60840 nak/sm20: Add double ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Faith Ekstrand
608eef01d6 nak/sm20: Add subgroup ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Faith Ekstrand
5a140e7c3e nak/sm20: Add more memory ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34616>
2025-04-19 03:40:08 +00:00
Arunpravin Paneer Selvam
84f18f31ad amdgpu: Add queue id support to the user queue wait IOCTL
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add queue id support to the user queue wait IOCTL
drm_amdgpu_userq_wait structure.

This is required to retrieve the wait user queue and maintain
the fence driver references in it so that the user queue in
the same context releases their reference to the fence drivers
at some point before queue destruction.

Otherwise, we would gather those references until we
don't have any more space left and crash.

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34493>
2025-04-18 21:55:53 +00:00
Iván Briano
949d2e507d anv: expose promoted KHR_depth_clamp_zero_one
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34614>
2025-04-18 21:31:37 +00:00
Lorenzo Rossi
ddbf2ec883 nak: Add a new OpFSwz and use it for derivatives on Kepler
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/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
309c48cbb7 nak/sm20: Add texture ops
The current NIR lowering is good for at least SM30+.  When someone
decides to enable Fermi, we'll have to add lowering for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
8d41221158 nak/nir: Use Kepler texture source ordering on SM30
SM30 (i.e. Kepler A) has Fermi's instruction encoding but it uses the
same texture source ordering as Kepler B.  It also supports bindless,
unlike Fermi.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Lorenzo Rossi
b8c7d937fe nak: Add OpTexDepBar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
043995220a nak/sm20: Add control-flow ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
9a62a76c46 nak/sm20: Add shader I/O ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
bdbe6447ed nak/nir: Use Maxwell input interpolation for SM20+
It appears to be the same at least as far back as Kepler A.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
0105a75c53 nak/sm20: Add conversion ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
b27fc463da nak: Record and set DOES_FP64 in the SPH
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
d249e7ddac nak: Lower 64-bit shifts in NIR on Kepler A and earlier
SHF is introduced on Kepler B.  Without it, there's nothing we can do
that's more efficient than NIR's lowering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
9fbf63b584 nak/sm20: Add integer ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
a3330f1d46 nak/sm20: Add float ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Faith Ekstrand
078ffb860b nak/sm20: Add initial SM20 encoding
This is enough to get all the hardware unit tests passing and run
dEQP-VK.api.smoke.triangle.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34540>
2025-04-18 19:30:41 +00:00
Alyssa Rosenzweig
84505c5d99 asahi: fix possible null deref
with indirect non-indexed draws.

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34612>
2025-04-18 18:34:55 +00:00
Alyssa Rosenzweig
b756e7da65 agx: delete more inots
noticed in dEQP-GLES31.functional.geometry_shading.input.basic_primitive.triangles

total instrs in shared programs: 2852257 -> 2850958 (-0.05%)
instrs in affected programs: 291488 -> 290189 (-0.45%)

total alu in shared programs: 2335534 -> 2334236 (-0.06%)
alu in affected programs: 236924 -> 235626 (-0.55%)

total fscib in shared programs: 2333895 -> 2332597 (-0.06%)
fscib in affected programs: 236924 -> 235626 (-0.55%)

total code size in shared programs: 20529508 -> 20520338 (-0.04%)
code size in affected programs: 2074254 -> 2065084 (-0.44%)

total gprs in shared programs: 901327 -> 901307 (<.01%)
gprs in affected programs: 756 -> 736 (-2.65%)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34612>
2025-04-18 18:34:55 +00:00
Alyssa Rosenzweig
e541ffcbe8 hk: fix patch count = 0 handling
fixes fault in dEQP-VK.tessellation.misc_draw.triangles_no_patches

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34612>
2025-04-18 18:34:55 +00:00
Daniel Lang
21b12b540f etnaviv: hwdb: update gc_feature_database from NXP
Updates the existing gc_feature_database.h file with changes from
https://github.com/nxp-imx/linux-imx/blob/lf-6.12.y/drivers/mxc/gpu-viv/hal/kernel/inc/gc_feature_database.h

git commit: 1bb08951917684136bf0c61ce7391902b2d6518b

Removed fields:
- NN_ZDP18
- NN_TP_SYSTEM_FIX
- DPP_SUPPORT_REF_OUTPUT_CROPING
- RGB_TO_RAW

Renamed fields:
- SHADER_TRIGGER_NN -> TC_SHADER_TRIGGER_NN

Signed-off-by: Daniel Lang <dalang@gmx.at>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34608>
2025-04-18 19:07:52 +02:00
Daniel Lang
d7c957c474 etnaviv: hwdb: update gc_feature_database from ST
Updates the existing gc_feature_database.h file with changes from
https://github.com/STMicroelectronics/gcnano-binaries/blob/gcnano-6.4.19-binaries/gcnano-driver-stm32mp/hal/kernel/inc/gc_feature_database.h

git commit: 359d5007ef19575f6b8ca3071cf90d3848778ae7

Removed fields:
- NN_TP_SYSTEM_FIX
- NN_ZDP18
- NN_FP8

New entry for CNANOULTRA31_VIP2 (GC8000 rev 6205) with EcoID set to 1.

Signed-off-by: Daniel Lang <dalang@gmx.at>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34608>
2025-04-18 19:07:20 +02:00
Job Noorman
e7c6037d12 ir3: use opt_shrink_vectors
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is useful to remove unused components from IO loads. This is not
only helpful for reducing the size of memory loads, but also for reducing
register pressure (as we need smaller vector registers).

Totals from 55567 (33.76% of 164575) affected shaders:
MaxWaves: 665780 -> 666690 (+0.14%); split: +0.15%, -0.01%
Instrs: 30850106 -> 30825516 (-0.08%); split: -0.33%, +0.25%
CodeSize: 62502952 -> 62336580 (-0.27%); split: -0.42%, +0.15%
NOPs: 5468972 -> 5463654 (-0.10%); split: -1.39%, +1.30%
MOVs: 1078607 -> 1060627 (-1.67%); split: -3.48%, +1.81%
Full: 807907 -> 805134 (-0.34%); split: -0.49%, +0.15%
(ss): 755846 -> 747963 (-1.04%); split: -2.51%, +1.46%
(sy): 367032 -> 363947 (-0.84%); split: -1.88%, +1.04%
(ss)-stall: 2907874 -> 2900183 (-0.26%); split: -1.97%, +1.71%
(sy)-stall: 10812082 -> 10599944 (-1.96%); split: -3.43%, +1.47%
STPs: 23062 -> 22980 (-0.36%)
LDPs: 35076 -> 32286 (-7.95%)
Preamble Instrs: 6668422 -> 6612037 (-0.85%); split: -1.35%, +0.51%
Early Preamble: 36055 -> 36169 (+0.32%); split: +0.32%, -0.01%
Cat0: 6015654 -> 6009409 (-0.10%); split: -1.29%, +1.18%
Cat1: 1631110 -> 1610537 (-1.26%); split: -2.54%, +1.28%
Cat2: 11783599 -> 11783634 (+0.00%); split: -0.02%, +0.02%
Cat3: 8198147 -> 8198526 (+0.00%); split: -0.00%, +0.01%
Cat5: 968517 -> 967899 (-0.06%); split: -0.06%, +0.00%
Cat6: 349200 -> 351795 (+0.74%); split: -0.01%, +0.75%
Cat7: 1009072 -> 1008909 (-0.02%); split: -0.58%, +0.56%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34600>
2025-04-18 15:56:02 +00:00
Job Noorman
f269c7b3b5 nir/opt_shrink_vectors: enable for load_ubo_vec4
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34600>
2025-04-18 15:56:02 +00:00
Samuel Pitoiset
792c30dd32 radv/meta: remove redundant parameter to blit_surf_for_image_level_layer()
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34558>
2025-04-18 17:21:24 +02:00
Samuel Pitoiset
a3f2c5f05e radv/meta: remove unnecessary radv_meta_blit2d_buffer::bs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34558>
2025-04-18 17:21:24 +02:00
Samuel Pitoiset
78c2feed00 radv/meta: rename more buffer->memory for fill/copy/update operations
Recently, I renamed most of the helpers for future work but I forgot
few things like meta keys, etc.

This is for consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34558>
2025-04-18 17:21:24 +02:00