Qiang Yu
23cb6768cb
aco: add aco_is_gpu_supported
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25631 >
2023-10-26 02:01:49 +00:00
Qiang Yu
9c63138ae3
aco: stop emit s_endpgm for first stage of merged shader
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25631 >
2023-10-26 02:01:49 +00:00
Qiang Yu
14022a3a0e
aco: move end program handling to select_shader
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25631 >
2023-10-26 02:01:49 +00:00
Qiang Yu
f3f2311d69
aco: extend max operands in a instruction to 128
...
We get more than 64 operands in p_end_with_regs when radeonsi.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25631 >
2023-10-26 02:01:49 +00:00
Qiang Yu
e2af0b0b3f
aco: add create_end_for_merged_shader
...
For radeonsi merged shader LS/ES part to pass args to next
stage.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25631 >
2023-10-26 02:01:49 +00:00
Qiang Yu
71fd3c2a35
aco: do not fix_exports when separately compiled ngg vs or es
...
For radeonsi not abort when this case, as it does not jump at
last.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25631 >
2023-10-26 02:01:49 +00:00
Samuel Pitoiset
1febb6f762
radv: report the last GPUVM fault when a device lost is detected
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238 >
2023-10-25 15:29:23 +00:00
Samuel Pitoiset
5a6208ad72
radv: query and report the last GPUVM fault with RADV_DEBUG=hang
...
Tested with a small use-after-free Vulkan test. It's pretty basic
for now but I think I will add status decoding support to report
more useful information.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238 >
2023-10-25 15:29:22 +00:00
Samuel Pitoiset
5eb8b3e9b1
radv/amdgpu: add support quering the last GPUVM fault
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238 >
2023-10-25 15:29:22 +00:00
Samuel Pitoiset
bdc62108be
amd: add has_gpuvm_fault_query
...
Whether the kernel allows to query the last GPUVM fault.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238 >
2023-10-25 15:29:22 +00:00
Samuel Pitoiset
1b0fbcbe1c
radv: remove outdated RADV_DEBUG=vmfaults support
...
It's been a very long time since this was useless because dmesg
required sudo access for a while.
This will be replaced by the new GPUVM fault interface which allows
to query from the kernel directly instead of trying to parse dmesg.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23238 >
2023-10-25 15:29:22 +00:00
David Rosca
9b4fccf4b3
radeonsi/vcn: Add encode support for H264 B-frames
...
Tested with ffmpeg and gstreamer vah264enc.
References to B-frames (b_depth/b-pyramid) not supported.
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25565 >
2023-10-25 01:03:58 +00:00
Timur Kristóf
9a79c5f1e5
radv: Support SDMA in si_cs_emit_write_event_eop.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25833 >
2023-10-24 23:12:45 +00:00
Timur Kristóf
b442de86c1
radv: Support SDMA in radv_cp_wait_mem.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25833 >
2023-10-24 23:12:45 +00:00
Timur Kristóf
04a3ed8a92
radv: Support SDMA in radv_cs_write_data_head.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25833 >
2023-10-24 23:12:45 +00:00
Rhys Perry
28ebe62af2
radv: enable mesh shader gs_fast_launch=2 and multi-row export
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:07 +00:00
Rhys Perry
3531136949
radv: implement mesh shader multi-row export
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:07 +00:00
Rhys Perry
773d35d25e
ac/nir: implement mesh shader multi-row export
...
Unlike AMDVLK, this has separate loops for attribute stores and exports,
so that the stores from different rows can overlap.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:07 +00:00
Rhys Perry
c29d8a9e68
ac/nir,radv: pass workgroup size to ac_nir_lower_ngg_ms
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Rhys Perry
c300a496ea
ac/nir: add emit_ms_outputs helper
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Rhys Perry
23cb0b00db
radv: implement mesh shader gs_fast_launch=2
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Rhys Perry
c63ac28014
ac/nir: optimize mesh shader local_invocation_index
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Rhys Perry
cddbe9a4c2
ac/nir: implement mesh shader gs_fast_launch=2
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Rhys Perry
75bc2e7149
ac/nir: refactor mesh vertex/primitive export
...
To prepare for row export, move them into helpers with index and row
parameters.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Rhys Perry
24431419ce
ac/nir: remove dead code
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Rhys Perry
6ec72806b7
ac/nir: add row parameter to helpers
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Rhys Perry
4c3677094e
aco,nir: add export_row_amd intrinsic
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040 >
2023-10-24 21:36:06 +00:00
Samuel Pitoiset
13cac671fd
ac/gpu_info: fix querying the maximum number of IBs per ring
...
The kernel uses 32-bit and Mesa was using 8-bit...
Fixes: 96345ae2ed ("ac/gpu_info: query the maximum number of IBs per submit from the kernel")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25867 >
2023-10-24 19:53:08 +00:00
Timur Kristóf
eff4db3718
radv: Add gang follower semaphore functions.
...
These functions implement the possibility to have the
gang leader wait for its follower.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25796 >
2023-10-24 17:58:12 +00:00
Timur Kristóf
b5e0a04d4e
radv: Slightly refactor gang semaphore functions.
...
This is in preparation for adding some new ones.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25796 >
2023-10-24 17:58:12 +00:00
Timur Kristóf
cbbb85c907
radv: Allow gang submit use cases other than task shaders.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25796 >
2023-10-24 17:58:12 +00:00
Timur Kristóf
67ce3f11e8
radv: Simplify gang CS and semaphore initialization.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25796 >
2023-10-24 17:58:12 +00:00
Samuel Pitoiset
56a05b9251
radv: fix missing predicate bit for WRITE_DATA helper
...
Fixes: 12a753f8d2 ("radv: Use new WRITE_DATA helper in more places.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25850 >
2023-10-24 14:53:04 +00:00
Samuel Pitoiset
f9cc2c5ba4
Revert "radv: fix finding shaders by PC"
...
Shaders are no longer allocated contiguously in memory and the next
pointer is now the shader.
This fixes using the trap handler on GFX8.
This reverts commit 2dcd12f38b .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25852 >
2023-10-24 14:19:13 +00:00
Bas Nieuwenhuizen
653bcbcb09
radv: Expose VK_KHR_cooperative_matrix.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24683 >
2023-10-24 13:24:18 +00:00
Bas Nieuwenhuizen
9df4703fbb
radv: Add cooperative matrix lowering.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24683 >
2023-10-24 13:24:18 +00:00
Bas Nieuwenhuizen
31863aa48c
radv: Don't transparently use wave32 with cooperative matrices.
...
The instruction has different regsizes for wave32 vs. wave64.
To ensure cases with cooperative matrix load/store without any
actual wmma instructions get handled correctly, also require
full subgroups if subgroup invocation/id are used. Not sure
those could be transparently changed anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24683 >
2023-10-24 13:24:18 +00:00
Bas Nieuwenhuizen
d8458c0559
aco: Make RA understand WMMA instructions.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24683 >
2023-10-24 13:24:18 +00:00
Bas Nieuwenhuizen
5e7c828c0e
aco: Add WMMA instructions.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24683 >
2023-10-24 13:24:18 +00:00
Samuel Pitoiset
96345ae2ed
ac/gpu_info: query the maximum number of IBs per submit from the kernel
...
When the query fails (unsupported by the current kernel), we fallback
to some rough estimate.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10014
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25803 >
2023-10-24 11:05:26 +00:00
Rhys Perry
fc342c897f
Revert "radv: pre-init surface info"
...
This reverts commit e15a4e6e1a .
The change wasn't thread safe.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9955
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10021
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25830 >
2023-10-24 10:11:34 +00:00
Samuel Pitoiset
aba815c041
radv: initialize video decoder for GFX11.5
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25304 >
2023-10-24 08:20:47 +02:00
Samuel Pitoiset
50845f6fa4
radv: set ENABLE_PING_PONG_BIN_ORDER for GFX11.5
...
Ported from RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25304 >
2023-10-24 08:20:47 +02:00
Lang Yu
f9629fa729
amd/common: add missing stuff for gfx11.5
...
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25836 >
2023-10-24 01:07:12 +00:00
Rhys Perry
9e3b014d4f
radv: fix signed integer overflow
...
Fixes UBSan error:
src/amd/vulkan/radv_shader_info.c:78:41: runtime error: left shift of 15 by 28 places cannot be represented in type 'int'
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25432 >
2023-10-23 22:16:27 +00:00
Rhys Perry
f440e82679
ac/nir: fix out-of-bounds access in ac_nir_export_position
...
These accesses (and similar) in ac_nir_exprot_position were out-of-bounds:
if (!outputs[VARYING_SLOT_PSIZ][0])
outputs_written &= ~VARYING_BIT_PSIZ;
I don't think this caused any real issue, but this silences ASan:
==40091==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f8ffa6b1cb8 at pc 0x7f900da99068 bp 0x7f8ffb8871d0 sp 0x7f8ffb8871c8
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25432 >
2023-10-23 22:16:26 +00:00
Rhys Perry
99214f0481
radv: skip zero-sized memcpy
...
Fixes UBSan:
src/amd/vulkan/radv_pipeline.c:1181:4: runtime error: null pointer passed as argument 2, which is declared to never be null
src/amd/vulkan/radv_shader.c:2243:4: runtime error: null pointer passed as argument 2, which is declared to never be null
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25432 >
2023-10-23 22:16:26 +00:00
Friedrich Vock
16e1163651
radv/rmv: Recognize LPDDR memory
...
Fixes: 8d0e6c02 ("radv: Add RMV tracing utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25845 >
2023-10-23 18:08:02 +00:00
Friedrich Vock
5e734a7cbf
radv/rra: Recognize LPDDR memory
...
Also move away from using unnamed constants for memory types.
Fixes: aef7ea868f ("ac/gpu_info: handle LPDDR4 and 5 in ac_memory_ops_per_clock")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25845 >
2023-10-23 18:08:02 +00:00
Saleemkhan Jamadar
5f19452b8c
radeonsi/vcn: set jpeg reg version for gfx 1150
...
select appropriate jpeg register version for gfx1150
Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Reviewed-by: Leo Liu <Leo.Liu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25278 >
2023-10-20 07:32:35 +00:00