Marek Olšák
956868b06a
radeonsi: return false from si_update_ngg early on gfx11+
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849 >
2025-10-24 22:58:16 +00:00
Marek Olšák
d9408eec59
radeonsi: rename num_active_shader_queries -> streamout.num_ngg_queries
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849 >
2025-10-24 22:58:16 +00:00
Marek Olšák
cec9402542
radeonsi: rename si_get_strmout_en -> si_get_streamout_enable_state
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37849 >
2025-10-24 22:58:16 +00:00
Silvio Vilerino
53bcab0288
d3d12: Video Encode - Flush the pipe context async while submitting encode
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:58 +00:00
Silvio Vilerino
8be89cf426
d3d12: Video Encode - Remove redundant buffer barriers
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:58 +00:00
Silvio Vilerino
eea34f5950
d3d12: Video Encode - Remove unnecessary resource waits and syncs since we sync batch fence
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:58 +00:00
Silvio Vilerino
8fdaac83a9
d3d12: Remove redundant d3d12_promote_to_permanent_residency overload
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:57 +00:00
Silvio Vilerino
7e1982a7eb
d3d12: Use EnqueueMakeResident with GPU Wait for video permanent residency promotions
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:56 +00:00
Silvio Vilerino
ca3ba3f924
mediafoundation: Remove unused AllocatePipeResourceFromAllocator
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:56 +00:00
Silvio Vilerino
e873beb33c
mediafoundation: Cleanup MaxL1References variables
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:56 +00:00
Silvio Vilerino
4b75fcac47
mediafoundation: Optimize STL usage in reference_frames_tracker_hevc.cpp
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:56 +00:00
Silvio Vilerino
2b34f30e00
mediafoundation: encode.cpp: Remove redundant lock() and memset()
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:55 +00:00
Silvio Vilerino
9b97a2ef93
mediafoundation: Fix width/height typo in alignment calculation
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:55 +00:00
Silvio Vilerino
a1f602e17f
d3d12: Fix d3d12_promote_to_permanent_residency always making resident
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:55 +00:00
Silvio Vilerino
31c9874891
d3d12: d3d12_video_encoder_references_manager_hevc remove double resize() and add reserve() to cached vectors
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:54 +00:00
Silvio Vilerino
ed53936308
d3d12_video_encoder_nalu_writer_h264: Reuse per frame scratch allocations
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:54 +00:00
Silvio Vilerino
900cdf3a7c
d3d12_video_encoder_nalu_writer_hevc: Reuse per frame scratch allocations
...
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:54 +00:00
Pohsiang (John) Hsu
80da774734
mediafoundation: fix sporadic build failure with u_inlines.h not found on test target
...
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057 >
2025-10-24 19:45:54 +00:00
Alyssa Rosenzweig
b824ef83ab
util/dynarray: infer type in append
...
Most of the time, we can infer the type to append in
util_dynarray_append using __typeof__, which is standardized in C23 and
support in Jesse's MSMSVCV. This patch drops the type argument most of
the time, making util_dynarray a little more ergonomic to use.
This is done in four steps.
First, rename util_dynarray_append -> util_dynarray_append_typed
bash -c "find . -type f -exec sed -i -e 's/util_dynarray_append(/util_dynarray_append_typed(/g' \{} \;"
Then, add a new append that infers the type. This is much more ergonomic
for what you want most of the time.
Next, use type-inferred append as much as possible, via Coccinelle
patch (plus manual fixup):
@@
expression dynarray, element;
type type;
@@
-util_dynarray_append_typed(dynarray, type, element);
+util_dynarray_append(dynarray, element);
Finally, hand fixup cases that Coccinelle missed or incorrectly
translated, of which there were several because we can't used the
untyped append with a literal (since the sizeof won't do what you want).
All four steps are squashed to produce a single patch changing every
util_dynarray_append call site in tree to either drop a type parameter
(if possible) or insert a _typed suffix (if we can't infer). As such,
the final patch is best reviewed by hand even though it was
tool-assisted.
No Long Linguine Meals were involved in the making of this patch.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38038 >
2025-10-24 18:32:07 +00:00
Caio Oliveira
a8449171d3
iris: Enable GL_KHR_shader_subgroup_* extensions for Gfx >= 9 when possible
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For platforms that don't have native float64 support, skip the
arithmetic and clustered ops. While they would work, the lowering
for float64 for those increase significantly the shader for some
of those operations.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35844 >
2025-10-24 16:41:29 +00:00
Faith Ekstrand
13199c37c1
zink: Disable building the zink_check_requirements tool for now
...
The vulkan header update is going to break it. We'll re-enable as soon
as LunarG does a header update in Vulkan-profiles. Until then, I've
filed a tracker issue:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/14176
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38042 >
2025-10-24 16:00:55 +00:00
Benjamin Cheng
c7883e3a71
radeonsi/vcn: Check and override primary_ref_frame
...
The primary_ref_frame is used to load CDF data and has to match between
VCN and the header. Unless the default CDF tables are used, VCN
currently always assumes the CDF data will be loaded from
reference_frame_index (for VCN4) or lsm_reference_frame_index[0] (for
VCN5). This may cause conflict with the application provided
primary_ref_frame.
Check to make sure the primary_ref_frame is the same frame as the used
reference, and override it if necessary.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38030 >
2025-10-24 09:30:08 +00:00
Qiang Yu
e36c277af9
radeonsi: init task shader args
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:18 +00:00
Qiang Yu
69c10426a4
radeonsi: don't put descs in user sgpr for task shader
...
task shader know user sgprs after shader variant creation
for draw_id arg. Simply disable this optimization for task
shader now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:18 +00:00
Qiang Yu
a7bccad3f2
radeonsi: add radeon_emit_alt_hiz_packets for mesh shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:17 +00:00
Qiang Yu
644061fdbc
radeonsi: add si_emit_buffered_gfx_sh_regs_for_mesh
...
For mesh shader support.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:16 +00:00
Qiang Yu
04912c585c
radeonsi: lower mesh shader outputs
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:16 +00:00
Qiang Yu
ca43c361bd
radeonsi: handle primitive indices for mesh shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:15 +00:00
Qiang Yu
01fc4efd77
radeonsi: support fragment shader per primitive input
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:15 +00:00
Qiang Yu
dfc679e791
radeonsi: support mesh shader per primitive output
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:15 +00:00
Qiang Yu
16656ebaaf
radeonsi: compute vs_output_ps_input_cntl for mesh shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:14 +00:00
Qiang Yu
a982e5bb8a
radeonsi: add mesh shader bits for dirty_shaders_mask
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:14 +00:00
Qiang Yu
0ddc1d21f2
radeonsi: dump shader key for mesh shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:13 +00:00
Qiang Yu
f513d47266
radeonsi: compile mesh shader with ACO only
...
RADV only support mesh shader with ACO. So left LLVM
support later.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:13 +00:00
Qiang Yu
fc81d7e7d4
radeonsi: si_select_hw_stage support mesh shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:13 +00:00
Qiang Yu
351070c46c
radeonsi: si_get_output_prim_simplified support mesh shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:12 +00:00
Qiang Yu
8ef07d4d8b
radeonsi: support mesh shader per vertex output
...
mesh shader uses per vertex output store, and
si_nir_assign_param_offsets assert output store to be
scalar.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:12 +00:00
Qiang Yu
845f333111
radeonsi: select key for mesh shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:11 +00:00
Qiang Yu
e42ada1723
radeonsi: add mesh shader debug options
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:11 +00:00
Qiang Yu
282a0ae20c
radeonsi: add mesh shader state create/delete/bind
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:10 +00:00
Qiang Yu
8cae067adc
radeonsi: export si_set_user_data_base for mesh shader usage
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:10 +00:00
Qiang Yu
43cf109f47
radeonsi: emit shader pointer for mesh shader
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:09 +00:00
Qiang Yu
a44d91d065
radeonsi: call si_shader_change_notify when vs bind
...
vs may be null when mesh shader enabled. mesh shader and
vertex shader may share the GS user sgpr, so need to call
si_shader_change_notify to mark shader pointers dirty.
Also remove some init code which will be done anyway when
vs bind first shader in si_shader_change_notify now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37932 >
2025-10-24 02:07:09 +00:00
Rhys Perry
9babec1366
radv,radeonsi: use optimize_txd
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37561 >
2025-10-23 11:22:01 +00:00
Samuel Pitoiset
457d8926e1
amd,radv,radeonsi: add ac_emit_cp_release_mem()
...
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/37956 >
2025-10-23 08:29:27 +00:00
Samuel Pitoiset
22d73fc077
amd,radv,radeonsi: add ac_emit_spm_setup()
...
This moves all SPM emit code to common code. This likely also fixes
SPM on GFX11+ for RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956 >
2025-10-23 08:29:27 +00:00
Samuel Pitoiset
202f8db793
amd,radv,radeonsi: add ac_emit_cp_spi_config_cntl()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956 >
2025-10-23 08:29:27 +00:00
Samuel Pitoiset
5cb400a97b
amd,radv,radeonsi: add ac_emit_cp_inhibit_clockgating()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956 >
2025-10-23 08:29:26 +00:00
Samuel Pitoiset
bc1080e27f
amd,radv,radeonsi: add and use more ac_cmdbuf_XXX helpers
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956 >
2025-10-23 08:29:26 +00:00
Samuel Pitoiset
50ec03054c
amd,radv,radeonsi: add ac_pm4_emit_commands()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37956 >
2025-10-23 08:29:24 +00:00