agx: Add agx_alu_src_index helper for emit_alu
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 11 Apr 2021 19:09:36 +0000 (15:09 -0400)
committerAlyssa Rosenzweig <none>
Sun, 2 May 2021 21:41:12 +0000 (17:41 -0400)
commit7ad11e3923a40d55c029692b2748a1058724a33b
treeee2b074285179d27dd2934caf41e6863d1ec0ff0
parent22886f50f994ff07c846d8273900934517c78ba4
agx: Add agx_alu_src_index helper for emit_alu

Since we don't use abs/neg in NIR, this just needs to construct
p_extract ops to deal with swizzles.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10582>
src/asahi/compiler/agx_compile.c