pan/midgard: Expose mir_get/set_swizzle
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 27 Aug 2019 22:50:55 +0000 (15:50 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 30 Aug 2019 22:50:24 +0000 (15:50 -0700)
The scheduler would like to use these.

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

index 68716f92b0b9080a8d5d1228b247cd8d42529006..084eddee5cb3c415f61ac06d1cf27ec4cced5aa2 100644 (file)
@@ -477,6 +477,8 @@ nir_dest_index(compiler_context *ctx, nir_dest *dst)
 
 /* MIR manipulation */
 
+unsigned mir_get_swizzle(midgard_instruction *ins, unsigned idx);
+void mir_set_swizzle(midgard_instruction *ins, unsigned idx, unsigned new);
 void mir_rewrite_index(compiler_context *ctx, unsigned old, unsigned new);
 void mir_rewrite_index_src(compiler_context *ctx, unsigned old, unsigned new);
 void mir_rewrite_index_dst(compiler_context *ctx, unsigned old, unsigned new);
index e71296723445043f7344e76038300b155c2a12f8..472b595095607b9a0eeb21d8fe574bb0a4985d08 100644 (file)
@@ -38,7 +38,7 @@ void mir_rewrite_index_dst_single(midgard_instruction *ins, unsigned old, unsign
                 ins->dest = new;
 }
 
-static unsigned
+unsigned
 mir_get_swizzle(midgard_instruction *ins, unsigned idx)
 {
         if (ins->type == TAG_ALU_4) {
@@ -81,7 +81,7 @@ mir_get_swizzle(midgard_instruction *ins, unsigned idx)
         }
 }
 
-static void
+void
 mir_set_swizzle(midgard_instruction *ins, unsigned idx, unsigned new)
 {
         if (ins->type == TAG_ALU_4) {