Rhys Perry
e2cdbb25c7
aco: add ACO_DEBUG=liveinfo
...
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/9599 >
2021-03-19 11:27:05 +00:00
Rhys Perry
22af492b01
aco: add aco_print_program() flags to print live_out and register demand
...
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/9599 >
2021-03-19 11:27:05 +00:00
Rhys Perry
8748b1c24f
aco: add aco_print_program() flag to print kill flags
...
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/9599 >
2021-03-19 11:27:05 +00:00
Rhys Perry
27e2f82f17
aco: implement image_deref_samples
...
It used to be that this intrinsic was never created and texture
instructions were always used.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 50881d59e6 ("compiler/spirv: fix image sample queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9686 >
2021-03-19 10:31:46 +00:00
Timur Kristóf
f5717f9f54
ac/llvm: Fix alignment of shared load intrinsics.
...
After some research, I found out that the alignment needs to be set
on the return value of the load, rather than on the pointer.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Fixes: 14ad82b4e9 "ac/llvm: Emit more efficient code for load_shared."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9688 >
2021-03-18 17:28:42 +00:00
Daniel Schürmann
3413c48375
aco/ra: allow VCC on SMEM sbase operand on GFX10+
...
Totals from 26 (0.02% of 146267) affected shaders (Navi10):
CodeSize: 324764 -> 324560 (-0.06%)
Instrs: 61090 -> 61039 (-0.08%)
Cycles: 2681952 -> 2668872 (-0.49%)
VMEM: 5773 -> 5769 (-0.07%)
SMEM: 1621 -> 1611 (-0.62%)
SClause: 2546 -> 2543 (-0.12%)
Copies: 4671 -> 4620 (-1.09%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9531 >
2021-03-18 17:15:00 +00:00
Daniel Schürmann
fc3606f29c
aco/optimizer: set VCC hint on new v_cmp_* definitions
...
Totals from 11692 (7.99% of 146267) affected shaders (Navi10):
CodeSize: 97419384 -> 97352560 (-0.07%); split: -0.07%, +0.00%
Instrs: 18571138 -> 18570969 (-0.00%); split: -0.00%, +0.00%
Cycles: 1431348400 -> 1431346296 (-0.00%); split: -0.00%, +0.00%
SMEM: 696646 -> 696650 (+0.00%)
SClause: 668511 -> 668490 (-0.00%); split: -0.00%, +0.00%
Copies: 1279475 -> 1279474 (-0.00%)
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9531 >
2021-03-18 17:15:00 +00:00
Timur Kristóf
89c8e22cc6
aco: Fix constant address offset calculation for ds_read2 instructions.
...
Cc: mesa-stable
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/9678 >
2021-03-18 10:43:41 +00:00
Rhys Perry
5bc100eb2d
aco: use a single instruction for uadd32_sat() on GFX8
...
fossil-db (GFX8):
Totals from 8 (0.01% of 147787) affected shaders:
SGPRs: 352 -> 368 (+4.55%)
CodeSize: 49576 -> 48788 (-1.59%)
Instrs: 9487 -> 9318 (-1.78%)
Latency: 49935 -> 49607 (-0.66%)
InvThroughput: 138493 -> 137443 (-0.76%)
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/9598 >
2021-03-17 15:33:34 +00:00
Rhys Perry
3decb52c82
aco: use uadd32_sat() helper for nir_op_uadd_sat
...
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/9598 >
2021-03-17 15:33:31 +00:00
Rhys Perry
590de30093
aco: implement 64-bit VGPR {u,i}find_msb
...
This can be created by subgroupBallotFindMSB().
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4458
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9598 >
2021-03-17 15:33:22 +00:00
Marek Olšák
32eb74e1e1
ac/gpu_info: fix more non-coherent RB and GL2 combinations
...
It ignored non-harvested chips with a non-power-of-two memory bus.
Fixes: abed921ce7 - amd: add support for Navy Flounder
Acked-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/9568 >
2021-03-17 14:40:54 +00:00
Timur Kristóf
ed7c6e46e7
aco: Delete superfluous tess and ESGS I/O code.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
08fb6904ec
radv/llvm: Delete superfluous tess and ESGS I/O code.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
16021e3bae
radv/llvm: Only store TCS outputs where they are really needed.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
540168fd15
radv: Use new, NIR-based I/O lowering.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
1958381c9a
radv: Reorder some NIR optimizations in preparation for the I/O changes.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
b3a16c0e19
radv: Fill some tess shader info earlier.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
52219ad3a0
radv: Determine tcs_in_out_eq in radv_pipeline instead of the compiler.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
e1ee17249a
radv: Calculate tess patches and LDS use outside the backend compilers.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
a736ea5dc6
radv: Save I/O usage data to both shader infos for merged 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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
c564a452fc
radv: Lower IO and set driver locations earlier.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
3185cb7dbf
ac: Add NIR passes to lower ES->GS I/O to memory accesses.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
bf966d1c1d
ac: Add NIR passes to lower VS->TCS->TES I/O to memory accesses.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
14ad82b4e9
ac/llvm: Emit more efficient code for load_shared.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
d5a79dbcf8
ac/llvm: Add constant offset to load/store_shared.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
00c014aab2
ac/llvm: Make sure to always emit integer comparison for nir_op_ieq.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
252b5d5ecd
ac/llvm: Make shared loads/stores work correctly for non-CS stages.
...
Signed-off-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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
6e7b1cd251
ac/llvm: Implement new Geometry Shader intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
20a2801011
ac/llvm: Implement the new tessellation intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
60114f3865
ac/llvm: Implement AMD-specific buffer load/store intrinsics.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
582229585b
aco: Implement new Geometry Shader intrinsics.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
5c95b32c6e
aco: Implement the new tessellation I/O related NIR intrinsics.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Timur Kristóf
e10e74a7af
aco: Implement new buffer load/store intrinsics.
...
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/9201 >
2021-03-17 12:42:23 +00:00
Rhys Perry
c580c3f9c7
aco/tests: add test for waNsaCannotFollowWritelane
...
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/9187 >
2021-03-17 12:31:05 +00:00
Rhys Perry
502a073552
aco: fix NSA following writelane
...
No fossil-db changes on GFX10.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: c353895c92 ("aco: use non-sequential addressing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187 >
2021-03-17 12:31:05 +00:00
Rhys Perry
298d400e5c
aco/tests: add test for NSAToVMEMBug
...
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/9187 >
2021-03-17 12:31:05 +00:00
Rhys Perry
194f3e4c69
aco: fix NSA MIMG followed by MUBUF/MTBUF
...
No fossil-db changes on GFX10.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: c353895c92 ("aco: use non-sequential addressing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9187 >
2021-03-17 12:31:05 +00:00
Samuel Pitoiset
7bdd569d7e
radv: extend the dirty bits to 64-bit
...
For future work.
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/9603 >
2021-03-17 09:21:38 +00:00
Samuel Pitoiset
9d42e71505
radv: add notccompatcmask debug option
...
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/9415 >
2021-03-17 08:55:16 +00:00
Samuel Pitoiset
f810d8cd50
radv: enable TC-compat CMASK on GFX10+
...
Untested on older chips. Should help MSAA games by 1-2%.
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/9415 >
2021-03-17 08:55:16 +00:00
Samuel Pitoiset
72b58c4a5e
radv: initialize TC-compat CMASK images with the DCC clear code
...
0xff is for fast-clears without MSAA.
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/9415 >
2021-03-17 08:55:16 +00:00
Samuel Pitoiset
a3835964ce
radv: only configure the CMASK tiling for TC-compat on GFX8
...
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/9415 >
2021-03-17 08:55:15 +00:00
Samuel Pitoiset
b9222cc906
radv: make sure FMASK is enabled for TC-compat CMASK
...
Otherwise it makes no sense at all.
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/9415 >
2021-03-17 08:55:15 +00:00
Samuel Pitoiset
0c281283d8
radv: remove redundant check when enabling TC-compat CMASK
...
We already check that the image has CMASK.
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/9415 >
2021-03-17 08:55:15 +00:00
Samuel Pitoiset
d173ed2e9c
radv: do not enable TC-compat CMASK if the image isn't readable by a shader
...
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/9415 >
2021-03-17 08:55:15 +00:00
Samuel Pitoiset
fb648634b0
radv: use common entrypoints for VK_KHR_copy_commands2
...
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/9600 >
2021-03-17 07:43:36 +00:00
Iago Toral Quiroga
1e4abf1fe3
vulkan/util: call glsl_type_singleton_init_or_ref from vk_instance_init
...
v2: link libvulkan_util with libglsl so it can find the glsl singleton symbols.
v3: link with libcompiler instead of libglsl (Jason)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> for the v3dv bits.
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> for the turnip bits.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> for the radv bits.
Acked-by: Dave Airlie <airlied@redhat.com> for the lvp bits.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9457 >
2021-03-17 08:15:36 +01:00
Marek Olšák
fdbcb58c06
ac/llvm: handle demote in LLVM 13 that just added support for it
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9362 >
2021-03-17 00:42:27 +00:00
Timur Kristóf
8205cce007
aco: Use ASSERTED to avoid unused variable warning.
...
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/9632 >
2021-03-16 21:46:52 +00:00