panfrost: Add support for TXS instructions
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 17 Jun 2019 20:13:04 +0000 (22:13 +0200)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 18 Jun 2019 13:36:07 +0000 (06:36 -0700)
commitc3558868daef2bfc6c075a9cd7bd8ebde07eb1de
tree3191535c4b29fb30afb36ce7771e64f9030968e2
parent5c17f84ae22ce2770f6b81eba3360d1ce693787b
panfrost: Add support for TXS instructions

This patch adds support for nir_texop_txs instructions which are needed
to support the OpenGL textureSize() function. This is also needed to
support RECT texture sampling which is currently lowered to 2D sampling +
a TXS() instruction by the nir_lower_tex() helper.

Changes in v2:
* Split options for the 1st and 2nd tex lowering passes

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/midgard_compile.c
src/gallium/drivers/panfrost/midgard/midgard_compile.h
src/gallium/drivers/panfrost/pan_context.c