Job Noorman
1d45e1431f
ir3/postsched/legalize: ignore prefetch sam dummy src
...
A sam used as descriptor prefetch has a dummy src which is hard-coded
to r48.x. Neither postsched nor legalization are aware this is a dummy
src though, causing false dependencies to be added. This often results
in unnecessary syncs and/or sub-optimal scheduling decisions.
Fix this by adding a "dummy" register flag and teaching postsched and
legalization to ignore registers with that flag set.
Totals from 24681 (15.00% of 164575) affected shaders:
Instrs: 17953856 -> 17953751 (-0.00%); split: -0.00%, +0.00%
CodeSize: 36166530 -> 36163008 (-0.01%); split: -0.09%, +0.08%
NOPs: 3466012 -> 3465943 (-0.00%); split: -0.00%, +0.00%
MOVs: 550649 -> 550613 (-0.01%)
(ss): 460398 -> 460402 (+0.00%)
(ss)-stall: 1780969 -> 1780916 (-0.00%); split: -0.00%, +0.00%
(sy)-stall: 5876641 -> 5876604 (-0.00%); split: -0.00%, +0.00%
Preamble Instrs: 4118242 -> 4087950 (-0.74%); split: -1.13%, +0.39%
Last helper: 7258848 -> 7258837 (-0.00%); split: -0.00%, +0.00%
Cat0: 3795308 -> 3795239 (-0.00%); split: -0.00%, +0.00%
Cat1: 746570 -> 746534 (-0.00%)
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36365 >
2025-07-28 09:02:17 +02:00
Job Noorman
fb8d69893c
ir3/legalize: add asserts to prevent OOB array access
...
When invalid registers are passed to `get_ready_slot`, it may cause an
OOB array access. Instead of running into UB when this happens, catch it
early by asserting.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36365 >
2025-07-28 09:02:17 +02:00
Tomeu Vizoso
453ef73adb
teflon: Link to the rocket driver
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:38 +02:00
Tomeu Vizoso
5ef68894bb
pipe-loader: Load the rocket accel driver
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:38 +02:00
Tomeu Vizoso
5b829658f7
rocket: Initial commit of a driver for Rockchip's NPU
...
The programming model matches very closely to that of NVIDIA's NVDLA.
Enough is implemented to run SSDLite MobileDet with roughly the same
performance as the blob (when running on a single NPU core).
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:38 +02:00
Tomeu Vizoso
41eee4c3cc
etnaviv/ml: Implement ml_operation_supported() callback
...
Choose what operations are supported so Teflon can forward that
information to TensorFlow Lite.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:38 +02:00
Tomeu Vizoso
49bffdd797
teflon: Query drivers on what operations they support
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:38 +02:00
Tomeu Vizoso
2c2523f0d5
teflon/tests: Increase tolerance
...
On Rockchip, we need a tolerance of 8 to pass all tests (especifically
the whole MobileNetV1 model).
Though all other tests pass with a tolerance of just 2, 8 is still not
that high that we would risk letting bugs slip in.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:37 +02:00
Tomeu Vizoso
e21d6ee723
pipe-loader: Implement loading of /dev/accel devices
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:37 +02:00
Tomeu Vizoso
7614122153
teflon: Reformat with clang-format
...
And add to .clang-format-include so it hopefully stays clean.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:37 +02:00
Faith Ekstrand
81c6ea9507
nak/lower_tex: Re-order arguments to put can_speculate at the end
...
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36396 >
2025-07-26 19:15:30 -04:00
Karol Herbst
8037d22f01
nak: fix wrong argument order in calls to build_txq_size
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 688a639117 ("nir: add nir_tex_instr::can_speculate")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36394 >
2025-07-26 20:43:36 +02:00
Timothy Arceri
dd71263c21
glsl: rename setup_uniform_remap_tables()
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Remove the preceeding nir as that is generally reserved for helpers
used across files.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36366 >
2025-07-26 07:22:36 +00:00
Timothy Arceri
cb558b2b88
glsl: add mark_array_elements_referenced() fast path
...
Add a fast path for single dimension arrays. This is around 3x
faster on large arrays. For example when testing a shader from
issue 9953 compile time went from ~12 seconds down to ~4 seconds.
Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9953
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36366 >
2025-07-26 07:22:36 +00:00
Timothy Arceri
8579c21798
glsl: move mark_array_elements_referenced() with ubo code
...
Since we no longer share this with the old glsl ir linker just move
it to where it is called from.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36366 >
2025-07-26 07:22:35 +00:00
Yiwei Zhang
62ff99d9c3
venus: add code owners
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Based on shortlog of src/virtio/vulkan.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36387 >
2025-07-26 00:33:59 +00:00
Georg Lehmann
845961ab77
nir: remove NIR_PASS_V
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10409
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36381 >
2025-07-25 23:09:56 +00:00
Mike Blumenkrantz
8e82bafae6
zink: drop primitiveTopologyPatchListRestart from profile
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I thought this was required but actually it's just a broken test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36384 >
2025-07-25 15:11:18 -04:00
Rohit Athavale
1be3ee7c0c
mediafoundation: Add guids for the newly added Input Delta QP & Absolute QP APIs
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
While these GUIDs make their way through the SDK, add them for now
directly, to be able to perform Input QP related development.
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36379 >
2025-07-25 17:33:35 +00:00
Pohsiang (John) Hsu
d1691272b5
d3d12: Fix mediafoundation build
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36379 >
2025-07-25 17:33:35 +00:00
Jesse Natalie
d3a284660e
d3d12: Use NIR_PASS instead of NIR_PASS_V
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36299 >
2025-07-25 08:55:14 -07:00
Jesse Natalie
a8858fc96a
dozen: Use NIR_PASS instead of NIR_PASS_V
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36299 >
2025-07-25 08:55:14 -07:00
Jesse Natalie
4528ad5281
microsoft/clc: Use NIR_PASS instead of NIR_PASS_V
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36299 >
2025-07-25 08:55:14 -07:00
Jesse Natalie
2ca10a854f
microsoft/compiler: Use NIR_PASS instead of NIR_PASS_V
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36299 >
2025-07-25 08:55:14 -07:00
Jesse Natalie
f7db71949e
gallium/aux: nir_lower_pstipple_fs progress and metadata
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36299 >
2025-07-25 08:55:14 -07:00
Mike Blumenkrantz
a76f1cf3ee
zink: create a dummy image for shaderdb runs
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 0a2c395394 ("zink: require nullDescriptor feature")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13591
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36377 >
2025-07-25 14:30:19 +00:00
Pierre-Eric Pelloux-Prayer
718fd47dde
nir/lower_io: make sure range is not 0
...
For samplers the type_size() callback can return 0, which triggers
a NIR validation error.
In this case set range to ~0 which means the range is unknown.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36263 >
2025-07-25 15:47:20 +02:00
Georg Lehmann
004f8aa2f4
aco: optimize get_alu_src with constant source and size > 1
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Emulated FSR4, Navi31:
Totals from 14 (100.00% of 14) affected shaders:
MaxWaves: 130 -> 131 (+0.77%)
Instrs: 67887 -> 67470 (-0.61%); split: -0.70%, +0.09%
CodeSize: 464428 -> 461668 (-0.59%); split: -0.67%, +0.07%
VGPRs: 2544 -> 2520 (-0.94%)
SpillVGPRs: 92 -> 89 (-3.26%)
Latency: 256823 -> 257574 (+0.29%); split: -0.37%, +0.66%
InvThroughput: 253895 -> 252929 (-0.38%); split: -0.40%, +0.02%
VClause: 997 -> 984 (-1.30%); split: -2.11%, +0.80%
Copies: 4501 -> 3788 (-15.84%); split: -17.35%, +1.51%
PreSGPRs: 504 -> 519 (+2.98%)
PreVGPRs: 2460 -> 2448 (-0.49%)
VALU: 57202 -> 56726 (-0.83%); split: -0.88%, +0.05%
SALU: 1231 -> 1384 (+12.43%)
VMEM: 3807 -> 3801 (-0.16%)
VOPD: 2693 -> 2303 (-14.48%); split: +1.19%, -15.67%
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36090 >
2025-07-25 11:33:00 +00:00
David Rosca
cc7178b9eb
radv/video: Use the new defines for H264 SPS info flags
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Also set gaps_in_frame_num_value_allowed_flag.
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36225 >
2025-07-25 09:32:08 +00:00
Konstantin Seurer
48d15c3cf8
radv/bvh: Specialize the update shader for geometryCount==1
...
The geometry data can be loaded from push constants in that case.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35445 >
2025-07-25 09:05:13 +00:00
Konstantin Seurer
b20ab07e4a
radv/bvh: Update leaf nodes before refitting
...
This should reduce latency between refitting nodes and their parent
nodes.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35445 >
2025-07-25 09:05:13 +00:00
Konstantin Seurer
33a694fe9b
radv: Initialize base IDs when doing a BVH update with src!=dst
...
Fixes: 2d48b2c ("radv: Use subgroup OPs for BVH updates on GFX12")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35445 >
2025-07-25 09:05:12 +00:00
Konstantin Seurer
4a4251dc16
radv/bvh: Use a fixed indices midpoint on GFX12
...
This saves a couple of loads inside the update shader.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35445 >
2025-07-25 09:05:12 +00:00
Konstantin Seurer
7ad02416f6
radv/bvh: Fix flush in bit_writer_skip_to
...
If temp is not cleared, the next flushed dword will contain data from
the previous one.
Fixes: 97f6287 ("radv: Use the BVH8 format on GFX12")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35445 >
2025-07-25 09:05:11 +00:00
Konstantin Seurer
6201e24307
radv: Only write leaf node offsets when required
...
They are only used for serialization and position fetch which makes them
unnecessary most of the times.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35445 >
2025-07-25 09:05:11 +00:00
Konstantin Seurer
703a154f29
radv: Add and use RADV_OFFSET_UNUSED
...
This deduplicates the logic to figure out what needs to be written.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35445 >
2025-07-25 09:05:10 +00:00
David Rosca
1dda9d56cb
radv/video: Disable rate control modes for H265 encode on VCN1
...
VCN1 doesn't have FW interface to enable cu_qp_delta with rate control
disabled, which means we can only support either rate control enabled or
disabled. Spec requires VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR
to always be supported, thus the rate control modes needs to be disabled
on VCN1.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:14 +00:00
David Rosca
627fdb368d
radv/video: Fix session_init and rc_per_pic on VCN2
...
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:14 +00:00
David Rosca
c11508ad41
radv/video: Fix setting H265 encode cu_qp_delta on VCN2
...
Fixes H265 encoding with rate control disabled.
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:13 +00:00
David Rosca
70473690f5
radv/video: Fix encode bitstream buffer offset and alignment
...
Caused issues on VCN2.
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:13 +00:00
David Rosca
a30f91b71a
radv/video: Add more encode session params overrides
...
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:13 +00:00
David Rosca
e3715df4ee
radv/video: Send slice control, spec misc and deblocking params every frame
...
These params can change per frame, so we need to send the values
to firmware on every frame instead of only once at session init.
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:12 +00:00
David Rosca
947e647df8
radv/video: Always send the latency command
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:12 +00:00
David Rosca
8368e3519e
radv/video: Set H264 encode cabac_init_idc and Cb/Cr QP offsets
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:11 +00:00
David Rosca
df42301531
radv/video: Remove disabled slice header code for field encoding
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353 >
2025-07-25 08:46:11 +00:00
David Rosca
cefd4cfd83
radv/ci: Update navi10 and vega10 expected failures
...
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/36311 >
2025-07-25 07:28:41 +00:00
David Rosca
75c01206dc
radv: Reject linear modifier for video decode DPB
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311 >
2025-07-25 07:28:41 +00:00
David Rosca
b242c27c15
radv/video: Remove 10 to 8bit dithering support
...
Only one format is supported now, so this is not needed.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311 >
2025-07-25 07:28:41 +00:00
David Rosca
4659be2c8b
radv/video: Rework GetPhysicalDeviceVideoFormatPropertiesKHR
...
Check if the profile is supported. Only return one format that
is supported by all requested profiles. Return error if the
requested profiles can't share the same format.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311 >
2025-07-25 07:28:41 +00:00
David Rosca
52fa173557
radv/video: Add radv_video_is_profile_supported
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311 >
2025-07-25 07:28:40 +00:00