Marek Olšák
7d066330e0
ac/surface: relax custom pitch requirements to any multiple of 256B on gfx10.3+
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23015 >
2023-06-01 18:46:20 +00:00
Marek Olšák
10c45fcc3f
ac/nir: handle DEPTH as PITCH in ac_nir_lower_resinfo
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23015 >
2023-06-01 18:46:20 +00:00
Marek Olšák
d715631623
ac/surface: fix is_linear for stencil-only surfaces
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23015 >
2023-06-01 18:46:20 +00:00
Chia-I Wu
0bba0eb0df
ac, radeonsi: add and use ac_get_ps_iter_mask
...
It is more natural for ac_get_ps_iter_mask to take sample count.
Replace samplemask_log_ps_iter by ps_iter_smples in
ac_nir_lower_ps_options accordingly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23265 >
2023-05-30 16:35:30 +00:00
Samuel Pitoiset
01bd012edd
amd: fix 64-bit integer color image clears
...
Fixes recent CTS dEQP-VK.api.image_clearing.*r64* since the Vulkan
specification has been clarified.
Only VK_FORMAT_R64_{UINT,SINT} are supported.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23250 >
2023-05-29 07:54:38 +02:00
Marek Olšák
038fb6573a
radeonsi: remove the gl_SampleMask FS output if MSAA is disabled
...
It's better to remove the output than what the previous code did,
which only unset MASK_EXPORT_ENABLE.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:59 -04:00
Marek Olšák
ea7c89d1f5
ac/surface: move determing ADDR_FMT_* into a helper function
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:59 -04:00
Marek Olšák
78d5626d17
ac/surface: move CB format translation helpers here
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:50 -04:00
Marek Olšák
8642740aef
ac/gpu_info: give has_msaa_sample_loc_bug a more accurate name
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:17:40 -04:00
Rohan Garg
c2d0662eb8
ac/surface: make sure alignment is a POT
...
Signed-off-by: Rohan Garg <rohan@garg.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20153 >
2023-05-25 21:24:45 +00:00
Rhys Perry
0d26d9d9b6
ac/nir: add fix_derivs_in_divergent_cf
...
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/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
3efaaf130a
ac/nir: round layer in ac_nir_lower_tex
...
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/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
1f86be7f8e
ac/nir: add pass for lowering 1d/cube coordinates
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Marek Olšák
e18344dd24
ac,radeonsi,winsyses: switch to SPDX-License-Identifier: MIT
...
excluding: aco, radv, addrlib
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23113 >
2023-05-24 21:48:19 +00:00
Filip Gawin
e367617668
ac/nir: fix slots in clamping legacy colors
...
fixes: 7c41cdb81f
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23178 >
2023-05-23 21:28:55 +00:00
Chia-I Wu
4f1c43d38e
ac/surface: print tile_swizzle as well
...
swizzle modes that are *_X or *_T depend on tile_swizzle.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23143 >
2023-05-22 20:14:22 +00:00
Marek Olšák
dbc1febb33
ac/surface: add ac_surf_config::is_array
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23037 >
2023-05-19 02:58:48 +00:00
Marek Olšák
78088ebaea
ac/surface: fix overridden linear pitch for CPU access
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23037 >
2023-05-19 02:58:48 +00:00
Marek Olšák
3f5723a23f
ac/surface: validate overridden pitch for all chips
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23037 >
2023-05-19 02:58:48 +00:00
Marek Olšák
f449ff426f
ac/surface: define LINEAR_PITCH_ALIGNMENT
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23037 >
2023-05-19 02:58:48 +00:00
Marek Olšák
4705148c5e
ac/surface: clean up and move the PIPE_CONFIG helper to ac_surface.c
...
This will be used by following commits.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23037 >
2023-05-19 02:58:48 +00:00
Marek Olšák
cbc6bf8218
ac/surface: fix address calculation for large images by using uint64_t
...
also rename gfx9_surf_level -> gfx9_surf_meta_level
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23037 >
2023-05-19 02:58:48 +00:00
Timur Kristóf
51d3e08bf9
ac: Use const keyword for some function arguments.
...
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/23053 >
2023-05-18 14:30:45 +00:00
Alyssa Rosenzweig
01e9ee79f7
nir: Drop unused name from nir_ssa_dest_init
...
Since 624e799cc3 ("nir: Drop nir_ssa_def::name and nir_register::name"), SSA
defs don't have names, making the name argument unused. Drop it from the
signature and fix the call sites. This was done with the help of the following
Coccinelle semantic patch:
@@
expression A, B, C, D, E;
@@
-nir_ssa_dest_init(A, B, C, D, E);
+nir_ssa_dest_init(A, B, C, D);
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23078 >
2023-05-17 23:46:16 +00:00
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