Alyssa Rosenzweig
ec0c9706f0
ac: Produce unified atomic
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23036 >
2023-05-16 22:36:21 +00:00
Qiang Yu
4b90347595
ac/binary: pack prefech align code to a function
...
To be used by radeonsi raw shader binary.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22573 >
2023-05-15 02:01:10 +00:00
Marek Olšák
f98871608c
ac/llvm: rewrite and unify how GLC, DLC, SLC are set
...
Use ACCESS_* flags in call sites instead of GLC/DLC/SLC.
ACCESS_* flags are extended to describe other aspects of memory instructions
like load/store/atomic/smem.
Then add a function that converts the access flags to GLC, DLC, SLC.
The new functions are also usable by ACO.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22770 >
2023-05-12 21:45:44 +00:00
Alyssa Rosenzweig
ce638eafe2
aco,radv: Use unified atomics
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22914 >
2023-05-12 20:39:46 +00:00
Leo Liu
ffbbf23ef8
radeonsi: Use vcn version instead of CHIP family for VCNs
...
Decouple it from CHIP family, based on HW query infomation.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22904 >
2023-05-11 18:01:10 +00:00
Leo Liu
09e59553ec
amd: Add vcn ip version info
...
And make it support for kernel w/wo ip_discovery.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22904 >
2023-05-11 18:01:10 +00:00
Leo Liu
82a064020c
radeonsi: Remove redundant vcn_decode from info
...
Use the number of queue instead.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22904 >
2023-05-11 18:01:10 +00:00
Jiadong Zhu
3cfdcabc78
ac: enable SHADOW_GLOBAL_CONFIG for preemptible ib
...
SHADOW_GLOBAL_CONFIG is mandatory for mid command buffer preemmption.
Fixes: 69014d8c94 (radeonsi: implement CP register shadowing)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22916 >
2023-05-10 17:11:19 +00:00
Samuel Pitoiset
787ae18a37
ac/spm: switch to SPM version 2.0
...
Found this while glancing in PAL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22817 >
2023-05-09 11:25:18 +00:00
Qiang Yu
1ba2460e61
ac/nir/cull: fix line position w culling
...
Fixes: db0e9d3cab ("ac/nir/ngg: support line culling")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8950
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22867 >
2023-05-09 02:30:41 +00:00
Marek Olšák
ae6b928495
ac/gpu_info: disable display DCC on Raphael and Mendocino to improve power usage
...
Below is the summary from the power validation.. "it looks like the only
workload where I see savings from DCC is PLT and it is only about 65mW
which is just run to run variation. For Idle I am seeing ~280mW increase
in power, ~200mW increase for power_VideoCall, and ~80mW increase for VP"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22771 >
2023-05-08 13:08:00 +00:00
Marek Olšák
e4c8ac5aae
ac/surface: don't expose modifiers with DCC retiling if radeon_info forbids it
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22771 >
2023-05-08 13:08:00 +00:00
Timur Kristóf
5bb04dc528
ac/nir/ngg: Use sendmsg in NGG lowering.
...
There is no need to use alloc_vertices_and_primitives anymore,
because it will be compiled to sendmsg anyway.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22690 >
2023-05-04 19:08:59 +00:00
Timur Kristóf
025c1f5174
ac/nir: Emit legacy GS DONE signal in NIR.
...
Legacy GS needs to emit a DONE signal at the end. Do this in NIR
instead of in the backends.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22690 >
2023-05-04 19:08:59 +00:00
Timur Kristóf
fffb2b33af
ac/nir: Use sendmsg in legacy GS lowering.
...
Remove the GS intrinsics completely and emit the sendmsg here
instead of in the backend. This is done to simplify backend code.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22690 >
2023-05-04 19:08:58 +00:00
Timur Kristóf
28d740fc0b
amd: Move sendmsg defines to ac_shader_util.
...
Will be used by ac/nir legacy and NGG lowerings.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22690 >
2023-05-04 19:08:58 +00:00
Marek Olšák
820c50ada3
nir: rename ACCESS_STREAM_CACHE_POLICY -> ACCESS_NON_TEMPORAL and document
...
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22769 >
2023-05-04 01:55:22 +00:00
Samuel Pitoiset
faf27fa0a2
ac/nir: fix 8-bit/10-bit PS exports clamping
...
This broke many tests on GFX6 (Pitcairn).
Fixes: c182154456 ("ac/nir: add ac_nir_lower_ps")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22756 >
2023-04-28 17:38:06 +00:00
Samuel Pitoiset
559d3b0f9a
ac,radv,radeonsi: rename thread_trace to sqtt everywhere
...
SQTT stands for SQ Thread Trace but it's shorter.
Note that environment variables aren't renamed because this might
break external applications.
This renames:
- ac_thread_trace_data to ac_sqtt (this is the main struct)
- ac_thread_trace_info to ac_sqtt_data_info
- ac_thread_trace_se to ac_sqtt_data_se
- ac_thread_trace to ac_sqtt_trace (this contains trace only)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22732 >
2023-04-28 16:55:13 +00:00
Samuel Pitoiset
c2d312c401
ac/rgp: remove ac_thread_trace_data from ac_thread_trace
...
We only need the RGP objects.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22732 >
2023-04-28 16:55:13 +00:00
Samuel Pitoiset
1202d8b0f9
ac/sqtt: add ac_sqtt_get_trace() helper
...
It can be shared between RADV and RadeonSI. The only difference is
that RadeonSI can't auto-resize the SQTT BO.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22732 >
2023-04-28 16:55:12 +00:00
Samuel Pitoiset
d0a11c5b9e
ac/sqtt: add ac_sqtt_se_is_disabled() helper
...
It can be shared between RADV and RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22732 >
2023-04-28 16:55:12 +00:00
Samuel Pitoiset
e996599ed0
ac/rgp: update SQTT_FILE_CHUNK_TYPE_ASIC_INFO to minor version 5
...
To match PAL. I don't know what the active_pixel_packer_mask field
is used for.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22677 >
2023-04-27 11:31:49 +00:00
Samuel Pitoiset
dd91faaddc
ac/rgp: update SQTT_FILE_CHUNK_TYPE_API_INFO to minor version 2
...
To match PAL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22677 >
2023-04-27 11:31:49 +00:00
Samuel Pitoiset
4cbb0f7ec3
ac/sqtt: add missing EventUnknown to rgp_sqtt_marker_event_type
...
To match XGL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22677 >
2023-04-27 11:31:49 +00:00
Samuel Pitoiset
637a6813db
ac/sqtt: add new bits to rgp_sqtt_marker_barrier_end
...
To match XGL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22677 >
2023-04-27 11:31:49 +00:00
Samuel Pitoiset
ee93864117
ac/sqtt: initialize clock calibration/queue info/queue event records
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22594 >
2023-04-27 10:55:55 +00:00
Samuel Pitoiset
94ce6540d8
ac/sqtt: add helpers for initializing ac_thread_trace_data
...
This is common between RADV and RadeonSI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22594 >
2023-04-27 10:55:55 +00:00
Samuel Pitoiset
23f3aa3491
ac/sqtt: add a helper for adding clock calibration records
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22594 >
2023-04-27 10:55:55 +00:00
Gregory Mitrano
01b7371bb4
ac/sqtt: Add RGP Definitions for Mesh Shaders
...
This commit adds RGP marker definitions for the following mesh shader
functions:
- vkCmdDrawMeshTasksEXT
- vkCmdDrawMeshTasksIndirectCountEXT
- vkCmdDrawMeshTasksIndirectEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21917 >
2023-04-27 07:58:58 +00:00
Samuel Pitoiset
f2d5b7cd1c
ac/spm: rename ac_spm_trace_data to ac_spm
...
This is shorter and it's the main struct that controls SPM, while
ac_spm_trace contains the generated data only.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22707 >
2023-04-27 07:24:54 +00:00
Samuel Pitoiset
0d4fa8e5c6
ac/spm: introduce ac_spm_trace and ac_spm_get_trace()
...
For more code isolation.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22707 >
2023-04-27 07:24:54 +00:00
Dave Airlie
e895c7ba56
radeonsi/ac: move some vcn defines to common
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980 >
2023-04-27 02:00:03 +00:00
Samuel Pitoiset
9c33c4dcbe
ac/sqtt: add a helper to get cmdbuf IDs per queue
...
These will be used by RADV to implement queue event timings.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22670 >
2023-04-26 13:57:39 +00:00
Samuel Pitoiset
a7b4573c11
ac/sqtt: add rgp_sqtt_marker_cb_id definition
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22670 >
2023-04-26 13:57:39 +00:00
Qiang Yu
df74919bc2
ac/nir/ps: remove used nir_variable if created
...
RADV won't do this, so remove them at last.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199 >
2023-04-26 03:27:26 +00:00
Qiang Yu
471418077a
ac/nir/ps: add no_color_export option
...
For radv which always do ps lower but may use epilog or not.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199 >
2023-04-26 03:27:26 +00:00
Qiang Yu
c877d26454
ac/nir/ps: use nir_export_dual_src_blend_amd when aco
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199 >
2023-04-26 03:27:26 +00:00
Rhys Perry
01f4addc18
ac/nir/ps: fix null export write mask miss set to 0xf
...
Fixes: c182154456 ("ac/nir: add ac_nir_lower_ps")
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22199 >
2023-04-26 03:27:26 +00:00
Pierre-Eric Pelloux-Prayer
65b40d0b7e
radeonsi: implement fw based mcbp
...
Some chips support firmware based mcbp. If supported this means
radeonsi needs to allocate 3 buffers and pass them to the firmware.
From there, the firmware will handle mcbp and register shadowing
on its own so we don't need to insert LOAD packet in the preamble.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21986 >
2023-04-25 06:47:11 +00:00
Pierre-Eric Pelloux-Prayer
8fe39e9997
amd: determine info->has_fw_based_shadowing
...
The shadow_size value will be 0 if unsupported.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21986 >
2023-04-25 06:47:11 +00:00
Pierre-Eric Pelloux-Prayer
dc5a9e176c
amd: update amdgpu_drm.h
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21986 >
2023-04-25 06:47:11 +00:00
Marek Olšák
e6e406b483
nir: add next_stage parameter to nir_remove_varying
...
so that e.g. the POS output is removed if the next stage is not FS.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21861 >
2023-04-19 21:42:11 +00:00
Qiang Yu
3ff9153a3b
ac,radv: move ps arg compation to common place
...
To be shared with radeonsi when aco is used.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22525 >
2023-04-19 08:39:46 +00:00
Qiang Yu
35d5c7c251
ac/nir/ps: lower sample mask input when needed
...
Ported from si_llvm_build_ps_prolog().
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21683 >
2023-04-17 02:11:56 +00:00
Qiang Yu
1103d4ed74
ac/nir/ps: add force lower barycentric load options
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21683 >
2023-04-17 02:11:55 +00:00
Qiang Yu
0e4ac0c1d6
ac/nir/ps: lower barycentric load when bc_optimize
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21683 >
2023-04-17 02:11:55 +00:00
Timur Kristóf
948a122f30
amd: Rename INDIRECT_BUFFER_CIK to just INDIRECT_BUFFER.
...
This packet is supported on GFX6 too, its name should relect that.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22406 >
2023-04-13 23:58:48 +00:00
Harri Nieminen
f85f511a38
amd: fix typos in code
...
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/22432 >
2023-04-13 23:08:22 +00:00
Harri Nieminen
aea48a4ff1
amd: fix typos
...
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/22432 >
2023-04-13 23:08:22 +00:00