From 77a4e39100a770e895b587402f6210ab2b6ebac4 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 2 Oct 2020 13:57:59 -0400 Subject: [PATCH] pan/bi: Add missing message types Names are not canonical but that's ok. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bi_print_common.c | 17 +++++++++++------ src/panfrost/bifrost/bi_schedule.c | 10 +++++----- src/panfrost/bifrost/bifrost.h | 16 +++++++++++----- src/panfrost/bifrost/test/bi_test_pack.c | 6 +++--- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/panfrost/bifrost/bi_print_common.c b/src/panfrost/bifrost/bi_print_common.c index 8efe0193b6c..582c04842ed 100644 --- a/src/panfrost/bifrost/bi_print_common.c +++ b/src/panfrost/bifrost/bi_print_common.c @@ -33,16 +33,21 @@ bi_clause_type_name(enum bifrost_clause_type T) { switch (T) { case BIFROST_CLAUSE_NONE: return ""; - case BIFROST_CLAUSE_LOAD_VARY: return "load_vary"; - case BIFROST_CLAUSE_UBO: return "ubo"; + case BIFROST_CLAUSE_VARYING: return "vary"; + case BIFROST_CLAUSE_ATTRIBUTE: return "attr"; case BIFROST_CLAUSE_TEX: return "tex"; - case BIFROST_CLAUSE_SSBO_LOAD: return "load"; - case BIFROST_CLAUSE_SSBO_STORE: return "store"; + case BIFROST_CLAUSE_VARTEX: return "vartex"; + case BIFROST_CLAUSE_LOAD: return "load"; + case BIFROST_CLAUSE_STORE: return "store"; + case BIFROST_CLAUSE_ATOMIC: return "atomic"; + case BIFROST_CLAUSE_BARRIER: return "barrier"; case BIFROST_CLAUSE_BLEND: return "blend"; - case BIFROST_CLAUSE_FRAGZ: return "fragz"; + case BIFROST_CLAUSE_TILE: return "tile"; + case BIFROST_CLAUSE_Z_STENCIL: return "z_stencil"; case BIFROST_CLAUSE_ATEST: return "atest"; + case BIFROST_CLAUSE_JOB: return "job"; case BIFROST_CLAUSE_64BIT: return "64"; - default: return "??"; + default: return "XXX reserved"; } } diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index 302da07e543..cc986856228 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -53,24 +53,24 @@ bi_clause_type_for_ins(bi_instruction *ins) case BI_LOAD_VAR: if (bi_is_fragz(ins)) - return BIFROST_CLAUSE_FRAGZ; + return BIFROST_CLAUSE_Z_STENCIL; - return BIFROST_CLAUSE_LOAD_VARY; + return BIFROST_CLAUSE_VARYING; case BI_LOAD_UNIFORM: case BI_LOAD_ATTR: case BI_LOAD_VAR_ADDRESS: - return BIFROST_CLAUSE_UBO; + return BIFROST_CLAUSE_ATTRIBUTE; case BI_TEX: return BIFROST_CLAUSE_TEX; case BI_LOAD: - return BIFROST_CLAUSE_SSBO_LOAD; + return BIFROST_CLAUSE_LOAD; case BI_STORE: case BI_STORE_VAR: - return BIFROST_CLAUSE_SSBO_STORE; + return BIFROST_CLAUSE_STORE; case BI_BLEND: return BIFROST_CLAUSE_BLEND; diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index 98f89aaea7a..c3323ef6af1 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -36,14 +36,20 @@ extern int bifrost_debug; enum bifrost_clause_type { BIFROST_CLAUSE_NONE = 0, - BIFROST_CLAUSE_LOAD_VARY = 1, - BIFROST_CLAUSE_UBO = 2, + BIFROST_CLAUSE_VARYING = 1, + BIFROST_CLAUSE_ATTRIBUTE = 2, BIFROST_CLAUSE_TEX = 3, - BIFROST_CLAUSE_SSBO_LOAD = 5, - BIFROST_CLAUSE_SSBO_STORE = 6, + BIFROST_CLAUSE_VARTEX = 4, + BIFROST_CLAUSE_LOAD = 5, + BIFROST_CLAUSE_STORE = 6, + BIFROST_CLAUSE_ATOMIC = 7, + BIFROST_CLAUSE_BARRIER = 8, BIFROST_CLAUSE_BLEND = 9, - BIFROST_CLAUSE_FRAGZ = 12, + BIFROST_CLAUSE_TILE = 10, + /* type 11 reserved */ + BIFROST_CLAUSE_Z_STENCIL = 12, BIFROST_CLAUSE_ATEST = 13, + BIFROST_CLAUSE_JOB = 14, BIFROST_CLAUSE_64BIT = 15 }; diff --git a/src/panfrost/bifrost/test/bi_test_pack.c b/src/panfrost/bifrost/test/bi_test_pack.c index e4e8fe43772..bd931826cc8 100644 --- a/src/panfrost/bifrost/test/bi_test_pack.c +++ b/src/panfrost/bifrost/test/bi_test_pack.c @@ -126,7 +126,7 @@ bit_test_single(struct panfrost_device *dev, } clauses[0]->bundles[0].add = &ldubo; - clauses[0]->clause_type = BIFROST_CLAUSE_UBO; + clauses[0]->clause_type = BIFROST_CLAUSE_ATTRIBUTE; if (fma) clauses[1]->bundles[0].fma = ins; @@ -140,8 +140,8 @@ bit_test_single(struct panfrost_device *dev, clauses[2]->bundles[0].add = &ldva; clauses[3]->bundles[0].add = &st; - clauses[2]->clause_type = BIFROST_CLAUSE_UBO; - clauses[3]->clause_type = BIFROST_CLAUSE_SSBO_STORE; + clauses[2]->clause_type = BIFROST_CLAUSE_ATTRIBUTE; + clauses[3]->clause_type = BIFROST_CLAUSE_STORE; panfrost_program prog; bi_pack(ctx, &prog.compiled);