turnip: Port krh's packing macros from freedreno to tu.
authorEric Anholt <eric@anholt.net>
Thu, 16 Jan 2020 23:38:37 +0000 (15:38 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jan 2020 22:46:09 +0000 (22:46 +0000)
commit08837ea3d238b88866e7a767923e05e754db8d5a
tree9769732c345eed8db847b6bf78f79cf3109342ac
parentd4bc3c93ea56517981b553841c2adbb734a68078
turnip: Port krh's packing macros from freedreno to tu.

This introduces some minor unpacking of the temporary fd_reg_pair structs
to code that previously was packing a whole register field.

In the pack wrapper in tu_cs.h, I added some explanatory docs, dropped the
relocs handling since we don't need it, and removed the extra regs[] in
the __ONE_REG() macro (which was causing gcc's optimizer to fall on its
face in my release build).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3455>
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_cs.h
src/freedreno/vulkan/tu_pipeline.c
src/freedreno/vulkan/tu_private.h