ir3: Fix LDC offset units
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 15 Apr 2020 12:18:03 +0000 (14:18 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Apr 2020 22:38:20 +0000 (22:38 +0000)
commitabcfb6437062f469335d27d5ef60ecf20272dc26
treeb6c5ba91f6668837dc3d9447a5b952939dc647b3
parent2d489f76f48095799392a915dcedc074bbb5e52a
ir3: Fix LDC offset units

I had missed that LDC actually uses vec4 units for its offset. This
means that we have to create a new instruction, and lower it in
ir3_nir_lower_io_offsets, similar to the existing SSBO instructions.
Unfortunately we can't assume that loads are always vec4-aligned, so we
have to use the alignment information that NIR gives us. Unfortunately,
it's currently woefully inadequate, and will have to be fixed to give us
good codegen in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4568>
src/compiler/nir/nir_intrinsics.py
src/freedreno/ir3/disasm-a3xx.c
src/freedreno/ir3/ir3.c
src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_nir_lower_io_offsets.c
src/freedreno/ir3/ir3_print.c