agx: Don't set lower_pack_split
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 27 Feb 2023 04:33:02 +0000 (23:33 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 11 Mar 2023 14:15:50 +0000 (14:15 +0000)
commit16f8bfb042cf5d0f41654805eda6502f6d205845
tree5e7b49f58b09d0beb07681fb96eb1630032f951d
parentc1aa876747a37d42b67ff1f53675890b05b40d1a
agx: Don't set lower_pack_split

We should handle nir_op_unpack_32_2x16_split_* natively, since we can generate
better code with agx_subdivide (coalescing the ops away) than the bitshift
lowering.

That said, we do need some extra instructions for the floating point
conversions.

No shader-db changes (which makes sense because we're targetting the GLES3.0
shader-db, which doesn't have the packing GLSL functions).

The real motivation of this change isn't optimizing some GLSL pack functions,
though, it's avoiding a code regression from using NIR's memory bit size
lowering in a future MR. That lowering will turn things like "load i16vec4" into
"load i32vec2 + unpack_32_2x16", so we need to be able to coalesce that unpack.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21674>
src/asahi/compiler/agx_compile.c
src/asahi/compiler/agx_compile.h
src/asahi/compiler/agx_nir_algebraic.py