pan/midgard: Add OP_R27_ONLY helper
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 24 Jul 2019 21:52:57 +0000 (14:52 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 25 Jul 2019 13:37:22 +0000 (06:37 -0700)
While load/store ops like st_vary can take an argument in either
r26/r27, ops like those for perspective projection must specifically
take their argument in r27.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/helpers.h

index 81d10936201a46dce9751866d19174308663890a..8b3e417a56d22f3083369c13008807c8aef8809d 100644 (file)
                 op == midgard_op_st_cubemap_coords \
        )
 
+#define OP_IS_R27_ONLY(op) ( \
+                op == midgard_op_ldst_perspective_division_z || \
+                op == midgard_op_ldst_perspective_division_w \
+        )
+
 #define OP_IS_MOVE(op) ( \
                 op == midgard_alu_op_fmov || \
                 op == midgard_alu_op_imov \