panfrost/midgard: Use a union to manipulate embedded constants
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 20 Jan 2020 14:00:57 +0000 (15:00 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 22 Jan 2020 15:31:28 +0000 (15:31 +0000)
commit15c92d158cad000b12cbed7f9c3a8248e8c99aee
tree5f157c21c99bb5da7dac76da798ab21936badf2f
parent63461cb7e13fa544a081414b8a0a6e69e66e90d0
panfrost/midgard: Use a union to manipulate embedded constants

Each instruction bundle can contain up to 16 constant bytes. The meaning
of those byte is instruction dependent: it depends on the instruction
native type (int, uint or float) and the instruction reg_mode (8, 16, 32
or 64 bit). Those different layouts can be exposed as a union to
facilitate constants manipulation.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3478>
src/panfrost/midgard/compiler.h
src/panfrost/midgard/midgard.h
src/panfrost/midgard/midgard_compile.c
src/panfrost/midgard/midgard_emit.c
src/panfrost/midgard/midgard_opt_float.c
src/panfrost/midgard/midgard_print.c
src/panfrost/midgard/midgard_schedule.c
src/panfrost/midgard/mir_promote_uniforms.c