panfrost/midgard: Lower texture projectors
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 11 Jun 2019 16:51:29 +0000 (09:51 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 12 Jun 2019 21:31:53 +0000 (14:31 -0700)
We do have native support for perspective division on the load/store
unit, but this is for the future, something ideally we would select
generally, not just for textures. Meanwhile, flipping on projector
lowering works now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/midgard_compile.c

index eacf84e89e65937ed9f1f5c3c3c567bab24a828d..1e1da1db0607745a021f8d6226c869080364754a 100644 (file)
@@ -356,7 +356,8 @@ optimise_nir(nir_shader *nir)
         NIR_PASS(progress, nir, nir_lower_idiv);
 
         nir_lower_tex_options lower_tex_options = {
-                .lower_rect = true
+                .lower_rect = true,
+                .lower_txp = ~0
         };
 
         NIR_PASS(progress, nir, nir_lower_tex, &lower_tex_options);