Commit graph

201149 commits

Author SHA1 Message Date
Pierre-Eric Pelloux-Prayer
9d4d9e6150 ac/llvm: enable wqm for ac_build_quad_swizzle from ac_build_fs_interp_mov
Without this, WQM is only used for the lds_param_load like this:

   s_wqm_b64 exec, exec
   lds_param_load v5, attr0.x wait_vdst:15
   s_mov_b64 exec, s[0:1]
   v_mov_b32_dpp v5, v5 quad_perm:[0,0,0,0] row_mask:0xf bank_mask:0xf

With this change we get:
   s_wqm_b64 exec, exec
   lds_param_load v5, attr0.x wait_vdst:15
   s_mov_b64 exec, s[0:1]
   ...
   s_wqm_b64 exec, exec
   v_mov_b32_dpp v5, v5 quad_perm:[0,0,0,0] row_mask:0xf bank_mask:0xf
   s_mov_b64 exec, s[0:1]

This fixes KHR-GL46.shaders.uniform_block.random.nested_structs_instance_arrays.0
and other similar tests with LLVM.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
182d662ccf ac/llvm: add wqm param to ac_build_quad_swizzle
And to ac_build_dpp because it's used from quad_swizzle.

No functional changes but will be used in the next commit.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
b4e94cf421 ttn: init source_blake3 and name from tgsi_shader_info
All TTN shaders have the same name ('TTN') and the same empty blake3.
Having a unique name and blake3 makes it easier to distinguish them
when using NIR_DEBUG=print...

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
59a3f38ff6 radeonsi: clear the debug callback on ctx destroy
The debug callback depends on the context to operate properly,
so we need to clear it on destroy to avoid a use-after-free.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12035
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Georg Lehmann
71cb394b02 aco: implement some more std::vector functions for small_vec
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
Georg Lehmann
31de188bc2 aco: support less trivial component types in small_vec
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
Georg Lehmann
15cba08db0 aco: guard small_vector move/copy operator against self assignment
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
David Rosca
3c7c059cee radeonsi: Enable implemented VCE/UVD encode features
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
b6b5261f4c radeonsi/uvd_enc: Set input pic swizzle mode on GFX9
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
73657d4246 radeonsi/uvd_enc: Support raw packed headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
da9de889aa radeonsi/uvd_enc: Support dynamic rate control changes
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
186980de26 radeonsi/uvd_enc: Support min/max QP and max frame size
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
035adff0e2 radeonsi/uvd_enc: Support temporal layer rate control
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
7b1210a026 radeonsi/uvd_enc: Support intra refresh
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
8a2266ab0b radeonsi/uvd_enc: Support slice encoding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
dac4e4bd6a radeonsi/uvd_enc: Support quality presets
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
d4d4a64168 radeonsi/uvd_enc: Support VBAQ
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
89d43c0fd3 radeonsi/uvd_enc: Support Pre-Encode
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
7570311269 radeonsi/uvd_enc: Consider input surface size for padding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
1f5e857d85 radeonsi/uvd_enc: Use app DPB management
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
98f711859d radeonsi/uvd_enc: Rework DPB allocation
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
ccb450b91c radeonsi/uvd: Set decode target swizzle mode on GFX9
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
4cf46ac9d0 radeonsi/uvd: Optimize bitstream buffer resizing
Only resize the buffer once and avoid copy if the buffer is empty.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f51de3f064 radeonsi/uvd: Stop clearing decode internal buffers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
9ca1cda2be radeonsi/vce: Cleanup
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
16571a2f6c radeonsi/vce: Set input pic swizzle mode on GFX9
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
901aafb030 radeonsi/vce: Support raw packed headers
Same logic as VCN, but this also needs PPS/SPS encoding.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f13c5fe53e radeonsi/vce: Support intra refresh
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f05acb6703 radeonsi/vce: Support min/max QP and max frame size
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
544a180320 radeonsi/vce: Support quality presets
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
683766eebc radeonsi/vce: Support VBAQ
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
880811ad80 radeonsi/vce: Support slice encoding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
ffd2cbf2a7 radeonsi/vce: Use app DPB management
Same logic as VCN, we use max_num_ref_frames + 1 for initial DPB size
and resize later if needed.

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
b22913cbd5 radeonsi/vce: Move dual pipe context to offset 0 of CPB
Needed to allow dynamically growing CPB.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
4d2a8ddeb8 radeonsi/vce: Set more header params
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1404
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
104f9c6654 radeonsi/vce: Remove support for FW 50 and older
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
6510c3d75f radeonsi: Add radeon_bitstream and use it in radeon_vcn_enc
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:04 +00:00
Qiang Yu
b72fde55ae etnaviv: remove min/max_texture_gather_offset init
u_init_pipe_screen_caps() init them with same value already.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
aaf1174fd3 radeonsi: remove si_screen.max_texel_buffer_elements
It seems to be a cache of the PIPE_CAP before, now we
use pipe_caps access, no need for it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
6c95232069 gallium,mesa: remove uint surffix from pipe_caps
We use explicit type now, no need for these surffix to
indicate the implicit type of the fields.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e5041ef036 docs,src: replace doc and comments for PIPE_CAP with pipe_caps
Use command:
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_CAP_\([A-Za-z0-9_]*\)/pipe_caps.\L\1/g' {} +
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_CAPF_\([A-Za-z0-9_]*\)/pipe_caps.\L\1/g' {} +

With manual adjustment for docs/gallium/screen.rst to merge
pipe_cap and pipe_capf section.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e7873a3abd gallium: remove get_param and get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
fe1d5d55f1 zink: remove zink_get_param and zink_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
ae12e6b325 virgl: remove virgl_get_param and virgl_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e0665c7855 vc4: remove vc4_screen_get_param and vc4_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
901ce3fceb v3d: remove v3d_screen_get_param and v3d_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
dcc3d8097b tegra: remove tegra_screen_get_param and tegra_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
1d17d5501d svga: remove svga_get_param and svga_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
6c17eab006 softpipe: remove softpipe_get_param and softpipe_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
10c9129139 radeonsi: remove si_get_param and si_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00