panfrost: Upload default sampler for txf
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 13 Sep 2022 16:04:32 +0000 (12:04 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 19 Sep 2022 17:22:58 +0000 (17:22 +0000)
commitff29ff5fad2ac2329334bd956c0ec4fc7d70046f
tree47fc47be9f98827349e3c97e99861a2c9de8e285
parent6d180c84fb9d7adc55244b5ba2a5fe3fd6bcc94f
panfrost: Upload default sampler for txf

In NIR, txf does not take a sampler. However, in the hardware it does take a
sampler. If there is no sampler bound and we use txf, the hardware will read
back all-0's due to bounds checking. As a workaround, bind a trivial sampler and
use that.

As-is this workaround is Valhall specific, making use of an extra resource
table. I'm punting on generalizing back to Bifrost until I can discuss the issue
in more depth with Jason and Karol and figure out the right fix.

Fixes api.image_properties_query.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18656>
src/gallium/drivers/panfrost/pan_cmdstream.c
src/panfrost/bifrost/bifrost_compile.c