agx: Implement unary math ops
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 24 Oct 2022 00:50:17 +0000 (20:50 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 10 Nov 2022 02:25:09 +0000 (02:25 +0000)
commitededb108d9bf365c49deef29577067f88b3a2c32
tree2f87abc0d475d96dbb4f740457ded5105649c5fa
parent44ccdca7681fcac69518528e08b56a7c7fd4aed4
agx: Implement unary math ops

Implement nir_op_bitfield_reverse, nir_op_bit_count, and
nir_op_ufind_msb. These map to native instructions.  With appropriate
integer render target and multiple render target support, passes:

   dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.*vertex
   dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldreverse.*fragment
   dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.*vertex
   dEQP-GLES31.functional.shaders.builtin_functions.integer.bitcount.*fragment
   dEQP-GLES31.functional.shaders.builtin_functions.integer.findLSB.*vertex
   dEQP-GLES31.functional.shaders.builtin_functions.integer.findLSB.*fragment
   dEQP-GLES31.functional.shaders.builtin_functions.integer.findMSB.*vertex
   dEQP-GLES31.functional.shaders.builtin_functions.integer.findMSB.*fragment

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