From 01316719cf4494c9e354fcf7a67159ba978aa5e0 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 27 Aug 2019 15:50:55 -0700 Subject: [PATCH] pan/midgard: Expose mir_get/set_swizzle The scheduler would like to use these. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/compiler.h | 2 ++ src/panfrost/midgard/mir.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 68716f92b0b..084eddee5cb 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -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); diff --git a/src/panfrost/midgard/mir.c b/src/panfrost/midgard/mir.c index e7129672344..472b5950956 100644 --- a/src/panfrost/midgard/mir.c +++ b/src/panfrost/midgard/mir.c @@ -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) { -- 2.30.2