Rhys Perry
c66d42b9ed
aco: add VOPD statistic
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23367 >
2024-02-05 10:51:14 +00:00
Daniel Schürmann
023e78b4d7
aco: add new post-RA scheduler for ILP
...
Totals from 77247 (97.37% of 79330) affected shaders: (GFX11)
Instrs: 44371374 -> 43215723 (-2.60%); split: -2.64%, +0.03%
CodeSize: 227819532 -> 223188224 (-2.03%); split: -2.06%, +0.03%
Latency: 301016823 -> 290147626 (-3.61%); split: -3.70%, +0.09%
InvThroughput: 48551749 -> 47646212 (-1.87%); split: -1.88%, +0.01%
VClause: 870581 -> 834655 (-4.13%); split: -4.13%, +0.00%
SClause: 1487061 -> 1340851 (-9.83%); split: -9.83%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25676 >
2024-01-06 11:30:42 +00:00
Eric Engestrom
7e8db6aedf
meson: always define {,DRAW_}LLVM_AVAILABLE one way or the other
...
With the usual benefits of `#if` instead of `#ifdef` (mostly the fact
that typos can be build failures instead of silently being interpreted
as if 0).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3863 >
2023-12-24 10:01:39 +00:00
Rhys Perry
de51a21e26
aco: implement 16-bit derivatives
...
These are used by radeonsi.
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/26445 >
2023-12-05 16:56:58 +00:00
Qiang Yu
dbbf566588
aco,ac/llvm,radeonsi: lower f2f16 to f2f16_rtz in nir
...
No need to handle f2f16 specially for OpenGL, and we can vectorize
f2f16 when using ACO.
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/25990 >
2023-11-20 02:20:17 +00:00
Qiang Yu
5932990e08
aco,radv: add aco_is_nir_op_support_packed_math_16bit
...
To be shared by radeonsi and radv.
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/25990 >
2023-11-20 02:20:17 +00:00
Rhys Perry
b18f0dec41
aco: collect Pre-Sched SGPRs/VGPRs before spilling
...
The usage after spilling is usually either the same as before or the
maximum.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25559 >
2023-11-01 19:41:30 +00:00
Rhys Perry
d200916ca2
aco: add VALU/SALU/VMEM/SMEM statistics
...
This lets us measure optimizations without interference of waitcnt
instructions.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25559 >
2023-11-01 19:41:30 +00:00
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
49250f9fc5
aco: add ps prolog generation for radeonsi
...
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/24973 >
2023-10-10 02:36:33 +00:00
Georg Lehmann
0e819465b3
aco: print final ir instead if printing asm is unsupported
...
Not a perfect replacement, but it's better than nothing.
Reviewed-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/25522 >
2023-10-04 08:35:48 +00:00
Qiang Yu
c8687a4b09
aco: do not fix_exports when program is prolog
...
Otherwise fix_export() will abort when find no export.
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/24712 >
2023-08-31 02:39:16 +00:00
Qiang Yu
9cce7ce80a
aco: add aco compile interface for radeonsi vs prolog
...
Radeonsi prolog does not need s_endpgm.
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/24712 >
2023-08-31 02:39:16 +00:00
Qiang Yu
d3333609e6
aco: don't emit s_endpgm for tcs with epilog
...
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/24442 >
2023-08-16 02:27:45 +00:00
Samuel Pitoiset
f433d39935
aco: add infra for compiling TCS epilogs
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24417 >
2023-08-02 07:29:50 +00:00
Qiang Yu
572625ea6c
aco: extract aco_compile_shader_part from aco_compile_ps_epilog
...
Will be shared with radeonsi tcs epilog and other shader parts build.
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24417 >
2023-08-02 07:29:50 +00:00
Eric Engestrom
6b21653ab4
aco: reformat according to its .clang-format
...
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23253 >
2023-06-16 19:59:52 +00:00
Georg Lehmann
bbda9f7390
aco: validate ir for prologs and after lower_to_hw_instr
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23507 >
2023-06-12 19:43:17 +00:00
Georg Lehmann
b9854a9097
aco: move cfg validation to its own function
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23507 >
2023-06-12 19:43:17 +00:00
Qiang Yu
360176b671
aco,radv: support symbol relocation in 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/22727 >
2023-04-28 11:33:28 +08:00
Timur Kristóf
af768afcbf
aco, radv: Remove "key" from aco_compiler_options.
...
aco_compiler_options::key is a leftover from when aco used
the radv_pipeline_key struct, but aco_compiler_options::key was
never actually used as a cache key.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21935 >
2023-04-12 17:30:02 +00:00
Timur Kristóf
81b4806d64
aco: Call dominator_tree before lower_phis.
...
This just makes it possible to use the dominator
tree information during phi lowering.
No Fossil DB changes on GFX11.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493 >
2023-04-03 14:36:07 +00:00
Daniel Schürmann
55caea6453
radv: move gl_shader_stage from radv_binary to radv_shader_info
...
This way, both radv_shader and radv_shader_binary, provide the stage.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Samuel Pitoiset
2803b786f0
radv: remove set but never used num_preserved_sgprs
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21897 >
2023-03-21 13:53:58 +00:00
Daniel Schürmann
4b92a53285
radv: add radv_create_rt_prolog()
...
Co-authored-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21780 >
2023-03-16 01:40:30 +00:00
Timur Kristóf
a0141c6308
aco, radv: Don't use radv_shader_args in aco.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Timur Kristóf
84a2cea596
aco, radv: Rename aco_*_key to aco_*_info.
...
The naming of aco_*_key didn't make sense because they
were never actually used as cache keys, only radv_*_key
are used as cache keys.
Rename the aco structs to aco_*_info instead.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Qiang Yu
91e68db0e1
aco, radv: Move is_trap_handler_shader to aco info.
...
v2 by Timur Kristóf:
- Rebase this patch on latest main.
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21696 >
2023-03-08 04:39:18 +00:00
Rhys Perry
3a96977542
radv,aco: remove old GS copy shader 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/18898 >
2022-11-29 14:28:11 +00:00
Rhys Perry
17bd2721e6
radv,aco: implement GS copy shaders using NIR
...
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/18898 >
2022-11-29 14:28:11 +00:00
Daniel Schürmann
efc0835787
aco: move statistics enum to aco_shader_info.h
...
to make it accessible from the driver.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19721 >
2022-11-15 16:34:07 +00:00
Daniel Schürmann
a36e27e507
aco: change thread_local memory resource to pointer
...
Apparently the TLS constructor doesn't work well if RADV
is instantiated multiple times and/or used by a program with
already existing threads.
Fixes: a128d444cb ('aco: use monotonic_buffer_resource for instructions')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19219 >
2022-10-25 09:08:08 +00:00
Daniel Schürmann
a128d444cb
aco: use monotonic_buffer_resource for instructions
...
As monotonic_buffer_resource is not thread-safe,
we use a thread_local instance which gets allocated once.
This change reduces the compile time spent in ACO by
approximately 10%.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112 >
2022-09-28 09:25:20 +00:00
Rhys Perry
bd40e1b012
aco: fix hash statistic
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 897561b7b9 ("aco: add aco_postprocess_shader() helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17954 >
2022-08-10 11:56:29 +00:00
Samuel Pitoiset
270cc39648
aco: add support for compiling PS epilogs
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17485 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
df8fb721a5
radv,aco: rename radv_aco_build_prolog to radv_aco_build_shader_part
...
Will be re-used for PS epilogs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17485 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
897561b7b9
aco: add aco_postprocess_shader() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17485 >
2022-07-18 18:40:02 +00:00
Dave Airlie
68642e2c26
aco: drop radv_shader.h include
...
This shouldn't be used anymore
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16445 >
2022-07-01 01:34:19 +00:00
Dave Airlie
9fe2b6b748
aco/radv: provide a vs prolog callback from aco to radv.
...
Avoid building the radv binary in aco, just callback with the
necessary info.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16445 >
2022-07-01 01:34:19 +00:00
Dave Airlie
2dce77c239
aco/radv: provide a callback from aco shader building to build binary
...
This moves the radv specific code into radv, and calls back from
aco into radv.
This should allow easier radeonsi integration later.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16445 >
2022-07-01 01:34:19 +00:00
Dave Airlie
e5ec50b3c7
aco: refactor the radv binary builder out of the core aco fn.
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16445 >
2022-07-01 01:34:19 +00:00
Samuel Pitoiset
6cab999d6a
radv,aco: rename radv_prolog_binary/radv_shader_prolog to shader_part
...
The same structures and functions will be re-used for PS epilogs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17084 >
2022-06-21 08:04:50 +00:00
Rhys Perry
be4c1a5f52
radv,aco: disable shader cache when ACO debug options are used
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-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/14594 >
2022-06-02 14:45:55 +00:00
Dave Airlie
a179e1aede
aco/radv: drop radv_nir_compiler_options from aco.
...
Add a new aco input and options structs, then convert from radv
pieces on submit.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16521 >
2022-05-17 06:15:25 +00:00
Marek Olšák
39800f0fa3
amd: change chip_class naming to "enum amd_gfx_level gfx_level"
...
This aligns the naming with PAL.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pellou-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16469 >
2022-05-13 14:56:22 -04:00
Dave Airlie
c44d5d61ce
aco: remove radv vs prolog key from aco internals.
...
This creates an aco specific key, and converts radv to it.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
04c07a2413
aco/radv: convert to aco shader info at the radv level.
...
This removes the radv shader info type from aco completely.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Samuel Pitoiset
2bf25e6f6e
radv,aco: keep track of the prolog disassembly if necessary
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13376 >
2022-01-04 07:50:07 +00:00
Samuel Pitoiset
e836174077
aco: do not print prologs disassembly if no disassembler
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13376 >
2022-01-04 07:50:07 +00:00
Samuel Pitoiset
8ec6824335
radv,aco: decouple shader_info/options from radv_shader_args
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13287 >
2021-10-22 07:10:40 +00:00