From 92a4f26e7f5249df3cb853b3a8cd9e726690d66c Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 6 Mar 2020 09:25:58 -0500 Subject: [PATCH] pan/bi: Add blend_location to IR for BI_BLEND To specify which render target is being written. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_print.c | 2 ++ src/panfrost/bifrost/compiler.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index 1697fb9dd53..9bdb84e1a4d 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -298,6 +298,8 @@ bi_print_instruction(bi_instruction *ins, FILE *fp) bi_print_branch(&ins->branch, fp); else if (ins->type == BI_CSEL) fprintf(fp, "%s", bi_cond_name(ins->csel_cond)); + else if (ins->type == BI_BLEND) + fprintf(fp, ".loc%u", ins->blend_location); if (ins->dest) bi_print_alu_type(ins->dest_type, fp); diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index c63f175f542..71d1b240059 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -242,6 +242,9 @@ typedef struct { /* For CSEL, the comparison op. BI_COND_ALWAYS doesn't make * sense here but you can always just use a move for that */ enum bi_cond csel_cond; + + /* For BLEND -- the location 0-7 */ + unsigned blend_location; }; } bi_instruction; -- 2.30.2