Commit graph

364 commits

Author SHA1 Message Date
Karmjit Mahil
ce6ed3da8b freedreno/decode,ir3: Mark decoded dwords as const
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40995>
2026-04-17 09:16:34 +00:00
Zan Dobersek
4d4a951ac6 fd: add a8xx perfcntr countables
Add the a8xx perfcntr countables lists for each supported perfcntr group,
as collected from the proprietary profiling tools.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40971>
2026-04-15 14:09:24 +00:00
Danylo Piliaiev
5b87bbfad3 tu: Support EXT_shader_image_atomic_int64
Required for SM6.6 in vkd3d-proton and used in a number of UE5 titles.
From descriptor side R64 images are R32G32_UINT, and to get storage_descriptor
we have to move early-return if format doesn't support rendering after
storage_descriptor setup.

Passes vkd3d-proton test:
test_shader_sm66_64bit_atomics

CTS tests:
dEQP-VK.image.atomic_operations.*.r64*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39932>
2026-04-11 19:46:13 +00:00
Karmjit Mahil
396201a9ab freedreno: Add fd{2,3,4,5}_hw.h and fd_hw_common.h
Add some wrapper header files so that we always include everything
that's needed by the generated header. This is in preparation for
setting up a script which enforces using these instead of importing
the xml generated headers directly.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:54:59 +00:00
Karmjit Mahil
35f6efac76 freedreno/a6xx: Add missing include to fd6_pack.h
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:54:59 +00:00
Karmjit Mahil
b6ddd10d21 freedreno/registers: Add some missing include in fd6_hw.h
The generated header can't be used stand-alone so add the includes
in fd6_hw.h

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40853>
2026-04-10 13:54:59 +00:00
Alexander Koskovich
f560760b27 freedreno/common: add support for the Adreno 810
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add support for the Adreno 810 found on the SM7635 (milos).

Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40613>
2026-04-10 01:24:59 +00:00
Dhruv Mark Collins
3fcec4762f tu/autotune: Add "Preempt Optimize" mode
This introduces a new option that makes autotune optimize for low
preemption latency which is crucial to ensure responsiveness on
systems with GPU-based composition. A large enough draw can entirely
block the compositor from running with draw-level preemption, this can
be mitigated by preferring to use GMEM which breaks up the draw into
smaller pieces and generally has a lower latency for preemption.

As a further mitigation, tiles in GMEM are then divided into smaller
and smaller pieces which lowers the non-preemptible duration. There
are static checks in place to avoid doing this when it would incur a
cost that is too large.

Uses performance counters read during ambles to detect preemption
latency events while rendering in SYSMEM. This approach is superior
to using RBBM draw time thresholds which could be imprecise as only
the average was calculated rather than true maximum draw time.

However, converting the preemption latency performance counter value
from CP ticks to wall clock is based on the average GPU frequency of
the whole period from the start of the RP until the switch-away amble
while the preemption latency stars counting from the request. Thus, if
the GPU frequency shifts rapidly throughout the RP, it may cause the
estimated wall clock time to be inaccurate, but it should be good enough
in the vast majority of cases.

Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Co-authored-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37802>
2026-04-06 14:19:29 +00:00
Rob Clark
6fb261147b freedreno: Add a829
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15124
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40655>
2026-03-28 21:19:58 +00:00
Rob Clark
04f9a82705 freedreno/common: Drop gen8 0x78000 offset
Initially I'd added the offset to make things match up to blob driver on
x2-85/a840.  But this gets in the way on parts with smaller GMEM.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40655>
2026-03-28 21:19:58 +00:00
Marek Olšák
353fe94c0e Rename SHA1 words to BLAKE3
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:28 +00:00
Marek Olšák
102d41799b Rename more sha and sha1 names to blake3
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:28 +00:00
Marek Olšák
d4831aaf5f Rename sha1_* and sha_* names to blake3_*
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:28 +00:00
Marek Olšák
c0ac992a2a Remove mesa-sha1.h
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:27 +00:00
Marek Olšák
699f9d7066 Inline _mesa_sha1_init/update/final functions
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:27 +00:00
Marek Olšák
a965ada6ee Inline mesa_sha1, SHA1_CTX
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:27 +00:00
Marek Olšák
110632f702 Inline SHA1_DIGEST_LENGTH
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
2026-03-23 07:03:27 +00:00
Zan Dobersek
e7f6c8ab7e fd: make RD dump output path configurable through FD_RD_DUMP_PATH
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Allow adjusting the location of RD dumps and trigger file through the
FD_RD_DUMP_PATH environment variable. When not present, the existing
defaults will be used.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40532>
2026-03-22 11:03:04 +00:00
Lucas Fryzek
3610953494 tu: fix reg size for a8xx_gen1
a8xx_gen1 seems to use the default reg_size_vec4 for gen8 of 96.

Fixes: 9da2ebf09c ("freedreno/common: set up a830 properties")
Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40521>
2026-03-20 19:32:19 +00:00
Rob Clark
48be91d14b freedreno/common: Fix upstream a830 chip_id
Add missing fuse bits (which are all `1` if no fuse).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40458>
2026-03-19 19:58:20 +00:00
Rob Clark
a4cabc1334 freedreno: Add --nvtop arg
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add a way to generate the table of gpu-ids that nvtop uses, to simplify
syncing nvtop with mesa when new gpu-ids are added.  For example:

  python3 src/freedreno/common/freedreno_devices.py -p ./$builddir/src/freedreno/registers/adreno/ --nvtop

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40283>
2026-03-11 22:20:45 +00:00
Rob Clark
fa90c2de03 freedreno: Split up freedreno_devices.py
Split up the data and code parts.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40283>
2026-03-11 22:20:45 +00:00
Rob Clark
cd1770a077 freedreno: Rename a830
Before it ends up in a release branch.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40283>
2026-03-11 22:20:45 +00:00
Rob Clark
78bab99812 freedreno: Move some draw regs into driver
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When these are correctly mapped to draw usage, we can't rely on them
being globally initialized in tu_init_hw().  They need to be re-
initialized after rp stomping.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Rob Clark
48c2e15117 freedreno/registers: Usage additions/corrections
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39819>
2026-02-19 00:56:43 +00:00
Zan Dobersek
9da2ebf09c freedreno/common: set up a830 properties
Adjust or fill out various properties for the a830 GPU, setting up a gen1
base. So far these mostly mirror the gen2 properties, except for gmem
config layouts, and they will probably further diverge down the line.

A new GPU ID for a830 is also added, Turnip there runs on top of KGSL.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39874>
2026-02-17 18:16:19 +00:00
Zan Dobersek
8151212293 freedreno/common: make a8xx magic regs common between all such devices
With a8xx a lot of chicken bit and other device-specific magic register
handling has moved into the kernel, which leaves a list of register writes
that could be more commonly shared between all a8xx devices.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39874>
2026-02-17 18:16:19 +00:00
Anna Maniscalco
e959dd0dd7 freedreno/common: set has_astc_hdr true for a7xx targets
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: dc07473524 ("freedreno/fdl: add astc hdr formats")
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39698>
2026-02-13 18:21:59 +00:00
Rob Clark
f0b4fbd80f ir3: Disasm shader descriptor stats
Extract stats about the descriptors used by a shader.  A later commit
will use this information to help filter the used descriptors and types.

Unfortunately a1.x usage throws a bit of a wrench into the gears, since
(like s2en) we don't know which tex/samp or even in some cases bindless
base is used.  This could perhaps be improved to detect the commmon case
of an immed value loaded into a1.x.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39636>
2026-02-04 18:28:28 +00:00
Emma Anholt
72c12f62ff tu: Implement VK_QCOM_image_processing.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This includes the block matching, box filtering, and weighted sample
features.  Passes all of the dEQP-VK.image_processing.* CTS tests that
were recently landed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38559>
2026-01-27 02:00:40 +00:00
Rob Clark
1d715662de freedreno/lrz: Correct lrz fc layout for gen8
Fixes: 14a23e8b3e ("freedreno/lrz: Add gen8 lrz layout support")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39375>
2026-01-23 21:07:16 +00:00
Rob Clark
53b879ac58 freedreno/common: Fix gen8 EFU float control
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reg should be programmed to zero like previous gens.

Fixes: 6e3598177b ("freedreno/common: Add A840 and X2-85")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39467>
2026-01-22 23:49:41 +00:00
Rob Clark
c6a4b8e9c7 ir3: Handle dual-wave reconvergence
With dual-wave dispatch, the hw needs (jp)s to also reflect where
co-issued waves might reconverge.  We should also consider this for
branchstack, but we do not need to consider it while generating
physical edges for uGPR (shared register) allocation.

Handle this by calling the reconvergence pass twice on devices with
dual-wave dispatch.  The first pass ignores the information we get
from nir about uniformity of branch conditions (because nir does not
distinguish between shader and warp level uniformity).  In this
first pass, we skip setting up physical edges, which is handled in
the second pass (since co-issued waves have their own uGPR resources).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39442>
2026-01-21 22:53:23 +00:00
Rob Clark
4e28ac2870 ir3: Use fd_dev_info from ir3_compiler
Rather than copying an ever growing list of params from fd_dev_info to
ir3_compiler, just store the info pointer in the compiler and use that
directly.

Mechanical change.  But deletes code and removes an extra step from
adding compiler related dev info props.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39442>
2026-01-21 22:53:23 +00:00
Rob Clark
1dc7d0ade9 ir3: Skip shading_rate lowering when unneeded
Some newer gen8 devices (like a840/kaanapali, but not x2-85 which is
otherwise similar) flip the hw shading rate value around to match
vulkan/gl instead of DX.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39167>
2026-01-20 02:27:32 +00:00
Rob Clark
6f1faceb6a ir3: Avoid narrowing int conversions from GPR on SALU
Narrowing integer conversions on SALU with GPR src do not behave as one
would expect on gen8, so avoid them.  This does not apply to uGPR srcs
or float conversions.

See, for example:
dEQP-VK.glsl.builtin.function.integer.bitcount.int_highp_compute

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39167>
2026-01-20 02:27:31 +00:00
Rob Clark
74484da82f freedreno/registers: Update gen8 FDM regs
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39167>
2026-01-20 02:27:31 +00:00
Rob Clark
eb43e95d61 freedreno: Disable supports_double_threadsize for gen8
Gone is thread128.  Instead the hw can co-dispatch thread64.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39167>
2026-01-20 02:27:27 +00:00
Rob Clark
7958a19ee9 freedreno: Disable has_rt_workaround for gen8
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39167>
2026-01-20 02:27:26 +00:00
Rob Clark
284f2ec0cd tu: Fix zero length pkt4
At least on gen8 (unsure if hw or fw change) this makes things pissy and
results in writes to undefined offsets.

Non-zero chance that this was even UB on older gens, but ended up
writing somewhere harmless(ish).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39254>
2026-01-14 00:06:49 +00:00
Zan Dobersek
fd18304e9f tu: enable storageBuffer8BitAccess on all a7xx hardware
Move the enabled storage_8bit property toggle into the base a7xx GPUProps
class. This enables storageBuffer8BitAccess Vulkan feature on all a7xx
hardware, much like the proprietary driver does. It's also a required
feature with Vulkan 1.4.

Fixes: dEQP-VK.info.device_mandatory_features on pre-a750 a7xx hardware.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39124>
2026-01-08 10:57:26 +00:00
Anna Maniscalco
dc07473524 freedreno/fdl: add astc hdr formats
Add astc hdr (float) formats, those get treated identically as the ldr
formats as the blocks have enough metadata to be decoded as float.

Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38859>
2026-01-03 16:51:10 +01:00
Job Noorman
9fbb202172 tu,freedreno: add chicken bit to enable (eolm)
(eolm) does not have any effect without this chicken bit set.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31885>
2026-01-02 14:08:48 +01:00
Rob Clark
d197ea37d1 freedreno/a6xx: Extract out GMEM cache helper
Extract out a helper to calculate placement of various caches that live
in GMEM.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39052>
2025-12-30 07:42:07 -08:00
Rob Clark
31d757495e freedreno/registers: Reintroduce FD_NO_DEPRECATED_PACK
The non-variant reg packers were removed in commit fd6489c026 ("tu:
Drop emitting of deprecated packing."), along with
FD_NO_DEPRECATED_PACK.

Add support to mark the even older reg builders as deprecated, and
re-introduce FD_NO_DEPRECATED_PACK to control this.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39029>
2025-12-20 00:23:08 +00:00
Rob Clark
14a23e8b3e freedreno/lrz: Add gen8 lrz layout support
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
2025-12-16 19:38:37 +00:00
Rob Clark
17b567485a freedreno/devices: Add num_slices
Add num_slices param to the device info.  This will be needed for
calculating LRZ layout.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38930>
2025-12-16 19:38:37 +00:00
Emma Anholt
67c6abb20b tu,freedreno: Drop the ".bo_write" flag.
It's been unused since my commit 064f395a89 ("freedreno: Tell the kernel
that all BOs are for writing.") back in 2020.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38762>
2025-12-11 22:22:34 +00:00
Rob Clark
6e3598177b freedreno/common: Add A840 and X2-85
Add support for A840 and X2-85.  Despite slice count, differences in
memory bus and clks, they are architecturally similar from the PoV of
the UMD.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:12 +00:00
Rob Clark
d1df3b4e39 ir3: Limit CS lock/unlock quirk
We don't need this universally for everything >= gen7.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38450>
2025-12-08 22:12:01 +00:00