From: Alyssa Rosenzweig Date: Fri, 20 Mar 2020 16:38:53 +0000 (-0400) Subject: pan/bi: Add store_channels property X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9213b2520cdafefbb83f8f495281b0db419f85a8;p=mesa.git pan/bi: Add store_channels property It can't be inferred from the usual writemask since stores don't write to a register destination. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index 2a03b3cab5d..f06cff849d3 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -345,6 +345,8 @@ bi_print_instruction(bi_instruction *ins, FILE *fp) fprintf(fp, ".%s", bi_cond_name(ins->csel_cond)); else if (ins->type == BI_BLEND) fprintf(fp, ".loc%u", ins->blend_location); + else if (ins->type == BI_STORE || ins->type == BI_STORE_VAR) + fprintf(fp, ".v%u", ins->store_channels); if (ins->dest) bi_print_alu_type(ins->dest_type, fp); diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 25bb4ab9c58..3d7bbfbba63 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -194,7 +194,8 @@ bi_emit_st_vary(bi_context *ctx, nir_intrinsic_instr *instr) .swizzle = { { 0, 1, 2, 3 }, { 0 }, { 1 }, { 2} - } + }, + .store_channels = 4, /* TODO: WRITEMASK */ }; bi_emit(ctx, address); diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index ee868f75d92..b09bd536729 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -261,6 +261,9 @@ typedef struct { /* For BLEND -- the location 0-7 */ unsigned blend_location; + + /* For STORE, STORE_VAR -- channel count */ + unsigned store_channels; }; } bi_instruction;