pan/bi: Add blend_location to IR for BI_BLEND
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 6 Mar 2020 14:25:58 +0000 (09:25 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 7 Mar 2020 00:37:39 +0000 (00:37 +0000)
To specify which render target is being written.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4097>

src/panfrost/bifrost/bi_print.c
src/panfrost/bifrost/compiler.h

index 1697fb9dd53f8b900cc434ca895eec7ebe13484e..9bdb84e1a4d14b2b1b40565327c70c87bf985bae 100644 (file)
@@ -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);
index c63f175f5424b6a2a3c40a323af02ca0a8255f33..71d1b2400596f557ee59ccd701af0cde213847da 100644 (file)
@@ -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;