Rhys Perry
85d05b3fd7
aco: fix uninitialized data error in waitcnt pass
...
Shouldn't create any incorrect waitcnts but may create suboptimial
waitcnts in rare cases.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4133 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4133 >
2020-03-12 11:46:56 +00:00
Timur Kristóf
61f2e8d9bb
aco: Don't store TCS outputs to LDS when we're sure that none are read.
...
This allows us not to write an output to LDS, even if it has
an indirect offset.
No pipeline DB changes.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
9b36d8c23a
aco: Only write TCS outputs to LDS when they are read by the TCS.
...
Note that tess factors are always read at the end of the shader,
so those are still always saved to LDS.
Totals from affected shaders:
VGPRS: 25244 -> 25164 (-0.32 %)
Code Size: 1768268 -> 1690804 (-4.38 %) bytes
Max Waves: 4947 -> 4953 (0.12 %)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
4dcca26945
aco: Store tess factors in VMEM only at the end of the shader.
...
This optimizes out several superfluous stores of the tess factors,
especially if the shader wrote those outputs multiple times.
Pipeline DB changes on GFX10:
Totals from affected shaders:
SGPRS: 30384 -> 29536 (-2.79 %)
Code Size: 2260720 -> 2214484 (-2.05 %) bytes
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
8c3ab49c6b
aco: Don't generate an if when the first part of a merged HS or GS is empty.
...
In some cases (eg. in a few tessellation CTS tests) the VS part of
a merged HS is completely empty. Let's not generate a divergent if
in these cases. (LLVM also doesn't do it.)
No pipeline DB changes, only affects the CTS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
cec6a856e5
aco: Enable running TES as ES, including merged TES+GS.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
926bdfae7d
aco: Implement loading TES inputs.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
ec56a7093c
aco: Enable streamout when TES runs on the HW VS stage.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
6047e51430
aco: Store TES outputs when TES runs on the HW VS stage.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
1d9d1cbce9
aco: Use TES output info when TES runs on the VS stage.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:11 +00:00
Timur Kristóf
0e8f4baede
aco: Setup tessellation evaluation shader variables.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
a952bf3946
aco: Fix LS VGPR init bug on affected hardware.
...
Vega 10 and Raven have a HW bug: when the HS thread count is zero,
the LS input arguments are loaded in the wrong registers. This commit
works around this by using the registers where the data actually is,
for the affected arguments.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
57a7d58c5d
aco: Store VS outputs correctly when tessellation is used.
...
When tessellation is used, the VS runs on the HW LS stage (merged
into HS on GFX9-10). This commit enables such VS to store its
outputs properly in LDS so that the TCS can load them as its
per-vertex inputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
7b7f196fbc
aco: Implement tessellation control shader input/output.
...
Tessellation control shaders can have per-vertex inputs,
and both per-vertex and per-patch outputs. TCS can not only store,
but also load their outputs.
The TCS outputs are stored in RING_HS_TESS_OFFCHIP in VMEM, which
is where the TES reads them from. Additionally, the are also stored
in LDS to make sure they can be loaded fast when read by the TCS.
Tessellation factors are always just stored in LDS.
At the end of the shader, the first shader invocation reads these
from LDS and writes them to RING_HS_TESS_FACTOR in VMEM, and
additionally to RING_HS_TESS_OFFCHIP when they are read by
the Tessellation Evaluation Shader.
This implementation matches the memory layouts used by radv_nir_to_llvm.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
655c050119
aco: Fix combining DS additions in the optimizer.
...
Previously, it was calculated incorrectly for 64-bit writes and reads.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
c70b0d0267
aco: Slight fix to lds_store and lds_load.
...
This commit fixes lds_store and lds_load so that they can
properly support 32 and 64-bit loads and stores; and makes
them a little more reusable so they can be used by
tessellation control shaders.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
db93af5f1b
aco: Refactor VS output stores in preparation for tessellation.
...
This commit takes the new helpers into use by the VS output
store function. This function is also where the VS outputs will
be handled when the VS runs on the HW LS stage.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
0062bb04ac
aco: Refactor load_per_vertex_input in preparation for tessellation.
...
This commit carves out the GS per-vertex input load, and takes the
new helper functions into use.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
4e692d65e1
aco: Introduce new helpers for calculating address offsets.
...
These helpers are going to make it unnecessary to reimplement the
(almost) same address offset calculation in mulitple places.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
19d5dc9cee
aco: Introduce new VMEM load/store helpers.
...
These are going to be used for loading and storing inputs
and outputs in various stages, such as GS, TCS and TES.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
4fc1da208e
aco: Remove esgs_itemsize from LDS alignment calculation.
...
It was problematic to have it, because some shader stages might
not even know about the esgs_itemsize, for example TCS and
the merged VS+TCS stages.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
ca342701c5
aco: Extract LDS alignment calculation to a separate function.
...
This function is going to be reused in multiple functions when
storing or loading something in the LDS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
fe80f22470
aco: Remove vertex_geometry_gs assertion from merged shaders.
...
We are going to support more kinds of merged shaders, such
as vertex_tess_control_hs and tess_eval_geometry_gs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
f53d31fb9b
aco: Use mesa shader stage when loading inputs.
...
This makes it more clear which stages should load these inputs.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
9016711273
aco: Setup correct HW stages when tessellation is used.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
89ff5b1e51
aco: Implement load_view_index for TCS and TES.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
aa5eed673c
aco: Implement memory_barrier_tcs_patch.
...
TCS outputs are going to be written to LDS, so it
has to use memory_barrier_shared in order to ensure
that it waits for LDS writes.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
a8d15ab6da
aco: Implement control_barrier for tessellation control shaders.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
2489e4dfd1
aco: Implement load_invocation_id for tessellation control shaders.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
5107b0312a
aco: Implement load_patch_vertices_in.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
6edf6ad130
aco: Implement load_primitive_id for tessellation shaders.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
754837f3b5
aco: Implement load_tess_coord.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
9ca2b254ca
aco: Setup tessellation control shader variables.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Timur Kristóf
7b3316f3c9
aco: Extract setup_gs_variables into a separate function.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964 >
2020-03-11 08:34:10 +00:00
Rhys Perry
b088a4b113
aco: only reserve sgprs for vcc if it's used
...
pipeline-db (Vega):
Totals:
SGPRS: 5186302 -> 5075616 (-2.13 %)
VGPRS: 3704580 -> 3704580 (0.00 %)
Spilled SGPRs: 144859 -> 144859 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 4124 -> 4124 (0.00 %) dwords per thread
Code Size: 247315944 -> 247315944 (0.00 %) bytes
LDS: 1311 -> 1311 (0.00 %) blocks
Max Waves: 674560 -> 674562 (0.00 %)
Totals from affected shaders:
SGPRS: 536992 -> 426306 (-20.61 %)
VGPRS: 356404 -> 356404 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 8498748 -> 8498748 (0.00 %) bytes
LDS: 8 -> 8 (0.00 %) blocks
Max Waves: 113832 -> 113834 (0.00 %)
There are some small code size changes in a few RotTR shaders and a small
increase in max_waves in two Detroit: Become Human shaders.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3906 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3906 >
2020-03-05 20:18:34 +00:00
Rhys Perry
c6e0c062da
aco: improve control flow handling in GFX6-9 NOP pass
...
Fixes Detroit: Become Human hang. Also affects World of Warships.
pipeline-db (Tahiti):
Totals from affected shaders:
SGPRS: 0 -> 0 (0.00 %)
VGPRS: 0 -> 0 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 0 -> 0 (0.00 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 0 -> 0 (0.00 %)
pipeline-db (Polaris):
Totals from affected shaders:
SGPRS: 17168 -> 17168 (0.00 %)
VGPRS: 11296 -> 11296 (0.00 %)
Spilled SGPRs: 1870 -> 1870 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 1472628 -> 1473292 (0.05 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 628 -> 628 (0.00 %)
pipeline-db (Vega):
Totals from affected shaders:
SGPRS: 17168 -> 17168 (0.00 %)
VGPRS: 11296 -> 11296 (0.00 %)
Spilled SGPRs: 1870 -> 1870 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 1409716 -> 1410380 (0.05 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 0 -> 0 (0.00 %)
Max Waves is lower than it should be because of a null winsys bug.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4004 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4004 >
2020-03-05 19:37:24 +00:00
Rhys Perry
47b7f104a0
aco: consider non-hazard writes in handle_raw_hazard_internal
...
I think this helps GFX6 in particular because code like this is common:
s_add_i32 s4, 0x60, s3
s_mov_b32 s5, 0
s_load_dwordx4 s[4:7], s[4:5], 0x0
s_buffer_load_dword s4, s[4:7], 0xcc
pipeline-db (Tahiti):
Totals from affected shaders:
SGPRS: 1923878 -> 1923878 (0.00 %)
VGPRS: 1528964 -> 1528964 (0.00 %)
Spilled SGPRs: 476 -> 476 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 88723604 -> 88528880 (-0.22 %) bytes
LDS: 241 -> 241 (0.00 %) blocks
Max Waves: 145402 -> 145402 (0.00 %)
pipeline-db (Polaris):
Totals from affected shaders:
SGPRS: 428128 -> 428128 (0.00 %)
VGPRS: 353092 -> 353092 (0.00 %)
Spilled SGPRs: 119251 -> 119251 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 57580468 -> 57563964 (-0.03 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 11631 -> 11631 (0.00 %)
piepline-db (Vega):
Totals from affected shaders:
SGPRS: 425016 -> 425016 (0.00 %)
VGPRS: 349588 -> 349588 (0.00 %)
Spilled SGPRs: 117835 -> 117835 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 54890792 -> 54874432 (-0.03 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 54 -> 54 (0.00 %)
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/4004 >
2020-03-05 19:37:24 +00:00
Rhys Perry
38743577f8
aco: improve get_wait_states()
...
pipeline-db (Tahiti):
Totals from affected shaders:
SGPRS: 21208 -> 21208 (0.00 %)
VGPRS: 22388 -> 22388 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 3278596 -> 3277004 (-0.05 %) bytes
LDS: 19 -> 19 (0.00 %) blocks
Max Waves: 238 -> 238 (0.00 %)
pipeline-db (Polaris):
Totals from affected shaders:
SGPRS: 64 -> 64 (0.00 %)
VGPRS: 96 -> 96 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 5200 -> 5192 (-0.15 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 10 -> 10 (0.00 %)
pipeline-db (Vega):
Totals from affected shaders:
SGPRS: 0 -> 0 (0.00 %)
VGPRS: 0 -> 0 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 0 -> 0 (0.00 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 0 -> 0 (0.00 %)
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/4004 >
2020-03-05 19:37:24 +00:00
Rhys Perry
7f1b537304
aco: add new NOP insertion pass for GFX6-9
...
This new pass is more similar to the GFX10 pass and should be able to
handle control flow better.
No pipeline-db changes.
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/4004 >
2020-03-05 19:37:24 +00:00
Samuel Pitoiset
7618fe1b48
aco: fix image load/store with lod and 1D images
...
Make sure to add the lod value if non-null as the 2nd operand.
Fixes dEQP-VK.image.load_store_lod.with_format.1d.* on all gens
except GFX9.
Fixes: 4d49a7ac73 ("aco: handle nir_intrinsic_image_deref_{load,store} with lod")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4060 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4060 >
2020-03-05 14:29:27 +01:00
Rhys Perry
2d1ba86382
aco: handle v_add_co_u32_e64 in parse_base_offset()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3902 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3902 >
2020-03-03 18:31:06 +00:00
Rhys Perry
215df21dea
aco: fix carry-out size for wave32 v_add_co_u32_e64
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Fixes: e0bcefc3a0 ('aco/wave32: Use lane mask regclass for exec/vcc.')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3902 >
2020-03-03 18:31:06 +00:00
Rhys Perry
9fea90ad51
aco: keep track of which events are used in a barrier
...
And properly handle unordered events so that they always wait for 0.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Fixes: 93c8ebfa78 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3774 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3774 >
2020-03-03 15:38:13 +00:00
Albert Astals Cid
760fe44e8c
aco: pass vars by const &
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3935 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3935 >
2020-03-02 13:18:49 +00:00
Albert Astals Cid
2521c81c9e
aco: Minor optimization in spill_ctx constructor
...
'register_demand' is passed by value and only copied once; consider moving it to avoid unnecessary copies
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3968 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3968 >
2020-03-02 12:21:03 +00:00
Eric Anholt
b9773631d3
aco: Fix signed-vs-unsigned warning.
...
The previous instance of this comparision was 1u to avoid the warning, fix
this one too.
Fixes: dba71de5c6 ("aco: only create parallelcopy to restore exec at loop exit if needed")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3607 >
2020-02-27 21:59:31 -08:00
Rhys Perry
8291d728dc
aco: improve GFX9 1D ddx/ddy assertion
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2547
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3890 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3890 >
2020-02-20 15:41:26 +00:00
Rhys Perry
fe5c5507bd
aco: add some helpers for filling/testing register ranges
...
We do this a lot
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3768 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3768 >
2020-02-19 12:23:50 +00:00
Rhys Perry
43497e30e2
aco: add RegisterFile
...
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/3768 >
2020-02-19 12:23:50 +00:00
Rhys Perry
483d4ec57c
aco: improve SCC handling in some SALU combines
...
Add some checks and remove some unnecessary checks.
Found by observation. No pipeline-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3599 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3599 >
2020-02-12 19:18:45 +00:00