panfrost/midgard: Prettify embedded constant prints
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 20 Jan 2020 17:40:43 +0000 (18:40 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Jan 2020 15:24:54 +0000 (15:24 +0000)
commit24360966ab31a9bedfe07356413769218fd2e0b6
treecc24cb4c1a1ad227454e15ecee3d8ec9c9bfd708
parentaa973fc14e140753d3c5b47eda79e451c1dc61ed
panfrost/midgard: Prettify embedded constant prints

Until now, embedded constants were printed as all 32 bits integer or
floats, but the compiler can pack constant from different types if
severa instructions with different reg_mode and native type refer to
the constant register. Let's implement something smarter so users don't
have to do a manual conversion when looking at a trace.

Note that 8-bit constants are not decoded yet, as we're not sure how
the writemask is encoded in that case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3536>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3536>
src/panfrost/midgard/disassemble.c
src/panfrost/midgard/helpers.h
src/panfrost/midgard/midgard_print.c