pan/bi: Extend the bi_builder to support type variants correctly
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 2 Mar 2021 12:08:05 +0000 (13:08 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Mar 2021 14:30:19 +0000 (14:30 +0000)
commit3c7634f7d27c76eee0f11a3c1c2541a648bfdc6f
treec6f225e7e33f7aeae5fe9a4a4b7a4d260a291f41
parent0113a0a1eed3aa23d3f4a9a95d90cb302608cfb5
pan/bi: Extend the bi_builder to support type variants correctly

Some opcodes come with both type and size variants. Right now, only the
size is taken into account. Extend the builder to provide wrappers that
take a nir_type in addition to the bitsize.

While at it, fix wrappers taking a compare operator to use the proper
.{i,s,u} variant based on the comparison (equal and non-equal should
use .i, other comparisons should use .{u,s}).

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/9520>
src/panfrost/bifrost/bi_builder.h.py
src/panfrost/bifrost/bifrost_compile.c