freedreno/rnn: Support stripes in rnndec_decodereg
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 28 Jul 2020 11:42:23 +0000 (13:42 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jul 2020 10:51:28 +0000 (10:51 +0000)
commit4b940532fbd147e06d881e29448b858be3d37f01
tree347e025fc0fef07b4c8d39439092c61fdbe90a3a
parent9a1924d55adab0e394cc9bbad0dea40729d52801
freedreno/rnn: Support stripes in rnndec_decodereg

We'll need this for finding where INDIRECT/STRIDE are in
CP_DRAW_INDIRECT_MULTI, since they are in different locations in each
variant.

This is tricky because we need to bubble up success/failure to the upper
levels, and 0 could be a valid offset if the stripe is inside an array
or in a packet. Hence we refactor tryreg to return success/failure
separately, although I stopped short of modifying rnndec_decodereg
itself.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6104>
src/freedreno/rnn/rnndec.c