Samuel Pitoiset
b44dc98cde
radv/sdma: remove redundant check for compression when getting metadata
...
It's already checked by the caller.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517 >
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
d3d5d2fe86
radv/sdma: use SDMA5_DCC_xxx bitfields
...
It's cleaner.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517 >
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
f44342199a
radv/sdma: simplify configuring the number of uncompressed DCC blocks
...
SDMA doesn't support MSAA, so the value can be
V_028C78_MAX_BLOCK_SIZE_256B.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34517 >
2025-04-16 06:57:00 +00:00
Samuel Pitoiset
13db408e59
ac/perfcounter: add support for GFX12
...
Sourced from PAL to add SPM support.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34524 >
2025-04-16 06:35:33 +00:00
Samuel Pitoiset
c42d43e8eb
radv: print more error messages during SPM initialization
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34524 >
2025-04-16 06:35:33 +00:00
Marek Olšák
177427877b
radeonsi: use nir_opt_shrink_vectors
...
It reduces VGPR usage, but the impact is almost none.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Marek Olšák
b7eff9cd87
radeonsi: always scalarize shared memory instructions
...
to get ds_load_2addr/ds_store_2addr more often and to prevent code size
regressions from nir_opt_shrink_vectors.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Marek Olšák
78cacfd9ce
ac/surface: select 3D tile mode without overallocating too much for gfx6-8
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12466
Fixes: c87ce78d - ac/surface: enable thick tiling for 3D textures for better perf on gfx6-8
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Marek Olšák
195e7b4f75
ac/surface: make gfx12_estimate_size reusable by gfx6
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12466
Fixes: c87ce78d - ac/surface: enable thick tiling for 3D textures for better perf on gfx6-8
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Marek Olšák
2c122d478b
ac/nir: set X=0 for task->mesh shader dispatch when Y or Z is 0
...
The code set X=0 when Y and Z is 0, not "or".
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Marek Olšák
963147d7fd
ac/gpu_info: add 256 to payload_entry_size to increase future task shader perf
...
It has no effect because num_entries is 1K, but the table shows a lot of
potential.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Marek Olšák
d7c903f258
ac/gpu_info: add payload_entry_size into ac_task_info
...
to stop causing full RADV recompiles when it's changed.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Marek Olšák
0dafd04695
ac/gpu_info: remove has_tmz_support function
...
It's not needed since:
8b3056343f - ac/gpu_info: bump required DRM minor version to 3.42.0 (kernel 5.15+)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Marek Olšák
0be5a3559a
ac/gpu_info: increase the attribute ring size for gfx12
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34432 >
2025-04-16 06:08:48 +00:00
Ian Romanick
e783930b10
elk/algebraic: Don't optimize float SEL.CMOD to MOV
...
Floating point SEL.CMOD may flush denorms to zero. We don't have enough
information at this point in compilation to know whether or not it is
safe to remove that.
Integer SEL or SEL without a conditional modifier is just a fancy
MOV. Those are always safe to eliminate.
See also 3f782cdd25 .
Fixes: fab92fa1cb ("i965/fs: Optimize SEL with the same sources into a MOV.")
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192 >
2025-04-15 23:59:31 +00:00
Ian Romanick
f4ede9c10a
elk/algebraic: Clear condition modifier on optimized SEL instruction
...
The condition modifier on SEL means something completely different than
it means on MOV. On MOV it means to modify the flags based on the value
written to the destination. On SEL it means to compare the sources using
that mode and pick the result (i.e., as min() or max()) without
modifying the flags.
The resulting MOV should not have a condition modifier for the same
reason it (already) doesn't have a predicate. This bug was found by
inspection, so I added a unit test.
Fixes: fab92fa1cb ("i965/fs: Optimize SEL with the same sources into a MOV.")
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192 >
2025-04-15 23:59:31 +00:00
Ian Romanick
6a19d8915f
brw/algebraic: Don't optimize float SEL.CMOD to MOV
...
Floating point SEL.CMOD may flush denorms to zero. We don't have enough
information at this point in compilation to know whether or not it is
safe to remove that.
Integer SEL or SEL without a conditional modifier is just a fancy
MOV. Those are always safe to eliminate.
See also 3f782cdd25 .
Fixes: fab92fa1cb ("i965/fs: Optimize SEL with the same sources into a MOV.")
No shader-db changes on any Intel platform.
fossil-db:
All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 209903490 -> 209903492 (+0.00%)
Cycle count: 30546025224 -> 30546021980 (-0.00%); split: -0.00%, +0.00%
Max live registers: 65516231 -> 65516235 (+0.00%)
Totals from 2 (0.00% of 706657) affected shaders:
Instrs: 3197 -> 3199 (+0.06%)
Cycle count: 361650 -> 358406 (-0.90%); split: -10.05%, +9.15%
Max live registers: 300 -> 304 (+1.33%)
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192 >
2025-04-15 23:59:31 +00:00
Ian Romanick
07dc1d4043
brw/algebraic: Clear condition modifier on optimized SEL instruction
...
The condition modifier on SEL means something completely different than
it means on MOV. On MOV it means to modify the flags based on the value
written to the destination. On SEL it means to compare the sources using
that mode and pick the result (i.e., as min() or max()) without
modifying the flags.
The resulting MOV should not have a condition modifier for the same
reason it (already) doesn't have a predicate. This bug was found by
inspection, so I added a unit test.
No shader-db or shader-db changes on any Intel platform.
Fixes: fab92fa1cb ("i965/fs: Optimize SEL with the same sources into a MOV.")
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192 >
2025-04-15 23:59:31 +00:00
Ian Romanick
1d2ebeca17
nir/algebraic: Allow fmin(a,a) optimization when flush denorm to zero is not set
...
I was surprised this had any affect on Intel GPUs because we have been
unconditionally performing this optimization in the backend since June
2014.
Once that error is fixed (later in this MR), this change prevents a
couple dozen regressions in shader-db and around 90 regressions in
fossil-db. Many of the regressions in fossil-db were loss of SIMD32, and
that can be a big deal.
v2: Add 64-bit too. Suggested by Alyssa.
shader-db:
All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16970141 -> 16970139 (<.01%)
instructions in affected programs: 40 -> 38 (-5.00%)
helped: 2 / HURT: 0
total cycles in shared programs: 914617580 -> 914617548 (<.01%)
cycles in affected programs: 3428 -> 3396 (-0.93%)
helped: 2 / HURT: 0
fossil-db:
All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Cycle count: 30546028462 -> 30546025224 (-0.00%); split: -0.00%, +0.00%
Non SSA regs after NIR: 237017827 -> 237017731 (-0.00%)
Totals from 83 (0.01% of 706657) affected shaders:
Cycle count: 3042978 -> 3039740 (-0.11%); split: -0.13%, +0.02%
Non SSA regs after NIR: 78997 -> 78901 (-0.12%)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34192 >
2025-04-15 23:59:31 +00:00
Faith Ekstrand
44b01b55d5
nvk: Handle shifted QMD cbuf addrs in indirect command processing
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34443 >
2025-04-15 23:38:54 +00:00
Faith Ekstrand
8b2f0be254
nak/qmd: Add QMD version 4.0 for Hopper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34443 >
2025-04-15 23:38:54 +00:00
Faith Ekstrand
a62c59d7e0
nak/qmd: Add support for shifted cbuf addresses
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34443 >
2025-04-15 23:38:54 +00:00
Faith Ekstrand
7050a285a3
nak/qmd: Rework cbuf size suffix handling
...
Addresses will also be shifted starting with QMD version 4.0 and we'll
need something a little more general for that.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34443 >
2025-04-15 23:38:54 +00:00
Faith Ekstrand
c8a5086213
nvk: Disable VK_EXT_descriptor_buffer pre-Maxwell
...
Our strategy of covering the entire address space in buffer views
requires that we be able to create very large buffer views. The
pre-Maxwell texture unit doesn't allow for this.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34542 >
2025-04-15 18:03:53 -05:00
Faith Ekstrand
c135bd6542
nak: Get rid of RegRef::zero
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34538 >
2025-04-15 22:17:38 +00:00
Faith Ekstrand
7125b25800
nak/sm70: Add zero_reg() and true_reg() helpers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34538 >
2025-04-15 22:17:38 +00:00
Faith Ekstrand
c4452c5fa4
nak/sm50: Add zero_reg() and true_reg() helpers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34538 >
2025-04-15 22:17:38 +00:00
Faith Ekstrand
32570924cf
nak: Move some legalization helpers from sm50 to common code
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34538 >
2025-04-15 22:17:38 +00:00
Dave Airlie
6a4c1ac464
nak: add F2FP to sm75 instr latencies
...
hw_tests found this was missing, copy it from Ampere.
Fixes: 6b8a4e6bb7 ("nak: Add Turing latency information")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34537 >
2025-04-15 21:56:55 +00:00
Ryan Mckeever
1efa53ac17
panvk: shaderStorageImageWriteWithoutFormat support
...
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787 >
2025-04-15 21:30:41 +00:00
Ryan Mckeever
e79a568442
panvk: shaderStorageImageReadWithoutFormat support
...
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787 >
2025-04-15 21:30:41 +00:00
Ryan Mckeever
70b8056df1
panvk: Enable KHR_format_feature_flags2 and use them
...
We need to enable this to use
VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT and
VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT.
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787 >
2025-04-15 21:30:41 +00:00
Ryan Mckeever
d95423686f
pan/format: Add PAN_BIND_STORAGE_IMAGE flag
...
The HW does not support STORAGE_IMAGE for all formats that can be sampled
or used as render targets. The HW does not support STORAGE_TEXEL_BUFFER
for all formats that can be used as render targets.
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787 >
2025-04-15 21:30:41 +00:00
Ryan Mckeever
b9a9798c46
pan/format: Update format flags to follow HW spec
...
Fixes: 861e7dca ("panfrost: Switch formats to table")
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33787 >
2025-04-15 21:30:41 +00:00
Faith Ekstrand
58321cf2e5
nak: Add stubs for Fermi and Kepler A
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34536 >
2025-04-15 16:04:10 -05:00
Faith Ekstrand
c0cd01241a
nak: Add stubs for Kepler B
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34536 >
2025-04-15 16:04:10 -05:00
Faith Ekstrand
af6093a712
nak/legalize: Add a helper for lowering ineg
...
This is similar to the helper we have for lowering float modifiers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34536 >
2025-04-15 16:04:09 -05:00
Faith Ekstrand
d16e75e55f
nak: Lower texture inputs for Kepler B
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34535 >
2025-04-15 20:02:52 +00:00
Faith Ekstrand
9c5a0eca95
nak: Add False and True to IntCmpOp
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34535 >
2025-04-15 20:02:52 +00:00
Faith Ekstrand
eb4fb70bae
nak: Add a plop2 test
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34535 >
2025-04-15 20:02:52 +00:00
Faith Ekstrand
e84f210362
nak/hw_tests: Feed predicate/carry sources with 0/1 data
...
Instead of doing the &1 on the GPU, do it on the CPU. This saves an
instruction and also makes things easier to debug.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34535 >
2025-04-15 20:02:51 +00:00
Erik Faye-Lund
26a4a2ee18
docs/panvk: add missing new features
...
We missed these from the release notes, let's add them.
Fixes: fbb2805575 ("panvk: Advertise KHR_dynamic_rendering_local_read support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525 >
2025-04-15 20:54:09 +02:00
Erik Faye-Lund
c6025f6cb6
docs/panvk: document EXT extension aswell
...
We're supporting both, let's mention both in the release notes.
Fixes: 4fabd37a3c ("panvk: enable KHR_line_rasterization support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525 >
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
469985cfa4
docs/panvk: document ycbr in terms of extensions
...
We usually document these features in terms of extensions when they
exist, so let's do that here too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525 >
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
37e75da005
docs/panvk: add VK_-prefix for extension name
...
We're using the VK_-prefix elsewhere, let's be consistent.
Fixes: d4797b8ab7 ("panvk: enable KHR_spirv_1_4 on v10+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525 >
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
d5fce25fb0
docs/panvk: fixup docs around float controls
...
We both misnamed the extension, and missed the v10+ detail for the
second version.
Fixes: 22fa3e88dd ("panvk: advertise VK_KHR_float_controls2")
Fixes: 7612dc4713 ("panvk: advertise VK_KHR_shader_float_controls")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525 >
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
68669ba0c1
docs/panvk: remove disabled extension
...
We ended up reverting this one, let's remove it from the release notes
and features.txt.
Fixes: 305925c439 ("panvk: disable VK_KHR_shader_quad_control")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525 >
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
4efb1dac6b
docs/panvk: fixup extension support
...
This extension is now only supported on PanVK/v10+
Fixes: 23c0d64e24 ("panvk: disable VK_EXT_image_drm_format_modifier for arch < 10")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34525 >
2025-04-15 20:53:55 +02:00
Erik Faye-Lund
790093f625
panvk: enable dualSrcBlend
...
This is already implemented, we just didn't report it.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34520 >
2025-04-15 18:34:36 +00:00
Aleksi Sapon
9301b7098a
llvmpipe: improve aniso filtering
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34438 >
2025-04-15 18:03:22 +00:00