Faith Ekstrand
81c6ea9507
nak/lower_tex: Re-order arguments to put can_speculate at the end
...
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
...
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()
...
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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
David Rosca
8f6ceed8f5
radv/video: Set encodeInputPictureGranularity for AV1 encode
...
Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
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
David Rosca
fd0c70aded
radv/video: Add bit depth and profile check for VP9 decode
...
Fixes: b8ac2d47e7 ("radv/video: add KHR_video_decode_vp9 support.")
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
David Rosca
bdad9e7e48
radv/video: Add bit depth and profile check for AV1 encode
...
Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311 >
2025-07-25 07:28:39 +00:00
Mike Blumenkrantz
0b82452b19
ci: disable xwm decorations in weston
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36320 >
2025-07-25 00:43:08 +00:00
Ian Romanick
fa74c31b22
brw: Allow additional flags registers on Xe2+
...
Xe2 adds two more flags registers. We barely use the second flags
register on previous platforms, so the omission was not previously
noticed.
There are several efforts in progress that will add using of more flags
registers.
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35415 >
2025-07-24 23:08:08 +00:00
Ian Romanick
1279f12c84
brw: Implement Wa_22012725308 for flags via SWSB too
...
At this point, using the per-register granularity will only help in
conjuction with fragment shader discard (which is implemented using f1).
v2: Loop restructuring and code cleanups. Suggested by Curro.
v3: Only apply Wa on Gfx12.5+. Suggested by Curro.
v4: Also apply to implicit flag reads. Suggested by Curro. This version
affects a *lot* more shaders (10,936 on Meteor Lake shader-db versus
4,482 before). The results are still very much in the 🤷 territory.
v5: Add missing dependency. I thought I got them all the previous
time. :( Noticed by Curro.
shader-db:
Lunar Lake
total cycles in shared programs: 886315282 -> 886391040 (<.01%)
cycles in affected programs: 204907250 -> 204983008 (0.04%)
helped: 1 / HURT: 6716
LOST: 0
GAINED: 1
Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total cycles in shared programs: 883774789 -> 883921507 (0.02%)
cycles in affected programs: 481836784 -> 481983502 (0.03%)
helped: 4 / HURT: 10936
LOST: 3
GAINED: 7
fossil-db:
Lunar Lake
Totals:
Cycle count: 32600441334 -> 32601862658 (+0.00%); split: -0.00%, +0.00%
Totals from 90283 (11.44% of 789260) affected shaders:
Cycle count: 17265933202 -> 17267354526 (+0.01%); split: -0.00%, +0.01%
Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Cycle count: 26477292677 -> 26480321805 (+0.01%); split: -0.00%, +0.01%
Max dispatch width: 8010440 -> 8010984 (+0.01%)
Totals from 132952 (14.71% of 903925) affected shaders:
Cycle count: 15349555348 -> 15352584476 (+0.02%); split: -0.00%, +0.02%
Max dispatch width: 1085416 -> 1085960 (+0.05%)
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35415 >
2025-07-24 23:08:07 +00:00
Ian Romanick
1fdcc9039b
brw: Add and use brw_reg_is_arf to test for a specific ARF
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35415 >
2025-07-24 23:08:07 +00:00
Maíra Canal
a06e1e81e0
broadcom/ci: remove synchronization-related flakes and skips
...
After commit "vulkan: don't destroy vk_sync_timeline if a point is
still pending", dEQP-VK.synchronization*.timeline_semaphore.* is
no longer hurting other tests.
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35921 >
2025-07-24 18:49:12 -03:00
Maíra Canal
ab3aaad957
vulkan: don't destroy vk_sync_timeline if a point is still pending
...
Currently, vk_sync_timeline_wait() may report idle while we still have
time points outstanding in vk_queue. This race between vk_sync_timeline
and vk_queue is problematic as vk_queue_submit_cleanup() can end-up
trying to unref a timeline point that was already destroyed in
vk_sync_timeline_finish(), leading to an use-after-free.
Address this race-condition by introducing a reference counter to the
timeline. Each timeline point takes a reference to the timeline when
it's checked out and drops the reference when it's freed. Now, the
timeline is only destroyed when all the references had been dropped.
To guarantee that all references will be dropped and the timeline will
be destroyed, vk_sync_timeline_finish() waits for all pending points
to be checked out.
This commit fixes several Mesa CI flakes in v3dv related to timeline
semaphores.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12648
Signed-off-by: Maíra Canal <mcanal@igalia.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35921 >
2025-07-24 18:49:02 -03:00
Faith Ekstrand
088a979e79
vulkan: Hold a reference to pending vk_sync_timeline_points
...
Previously, we had a sort of double reference count with refcount being
used to track how many waits were holding a reference and pending being
used to track whether or not it was in the pending list. This meant
that the unref operation actually had to look at both refcount and
pending in order to determine if it could free the time point. This is
way too confusing. Instead, we should just always take a reference
while we're pending.
This also simplifies the over-all interface because there's no longer a
difference between free and release. `struct vk_sync_timeline_point` is
now just a reference-counted API.
Reviewed-by: Maíra Canal <mcanal@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35921 >
2025-07-24 18:49:02 -03:00