pan/bi: Use canonical term dependency
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7081>
This commit is contained in:
@@ -41,8 +41,8 @@ bi_pack_header(bi_clause *clause, bi_clause *next_1, bi_clause *next_2, bool is_
|
||||
/* next_dependencies are the union of the dependencies of successors'
|
||||
* dependencies */
|
||||
|
||||
unsigned scoreboard_deps = next_1 ? next_1->dependencies : 0;
|
||||
scoreboard_deps |= next_2 ? next_2->dependencies : 0;
|
||||
unsigned dependency_wait = next_1 ? next_1->dependencies : 0;
|
||||
dependency_wait |= next_2 ? next_2->dependencies : 0;
|
||||
|
||||
struct bifrost_header header = {
|
||||
.back_to_back = clause->back_to_back,
|
||||
@@ -51,8 +51,8 @@ bi_pack_header(bi_clause *clause, bi_clause *next_1, bi_clause *next_2, bool is_
|
||||
.next_clause_prefetch = clause->next_clause_prefetch,
|
||||
.staging_barrier = clause->staging_barrier,
|
||||
.staging_register = clause->staging_register,
|
||||
.scoreboard_deps = scoreboard_deps,
|
||||
.scoreboard_index = clause->scoreboard_id,
|
||||
.dependency_wait = dependency_wait,
|
||||
.dependency_slot = clause->scoreboard_id,
|
||||
.message_type = clause->message_type,
|
||||
.next_message_type = next_1 ? next_1->message_type : 0,
|
||||
.suppress_inf = true,
|
||||
|
@@ -103,8 +103,12 @@ struct bifrost_header {
|
||||
* that it is safe for the next clause to write them. */
|
||||
unsigned staging_barrier: 1;
|
||||
unsigned staging_register : 6;
|
||||
unsigned scoreboard_deps: 8;
|
||||
unsigned scoreboard_index: 3;
|
||||
|
||||
/* Slots to wait on and slot to be used for message passing
|
||||
* instructions respectively */
|
||||
unsigned dependency_wait : 8;
|
||||
unsigned dependency_slot : 3;
|
||||
|
||||
enum bifrost_message_type message_type : 5;
|
||||
enum bifrost_message_type next_message_type : 5;
|
||||
} __attribute__((packed));
|
||||
|
@@ -75,7 +75,7 @@ struct bifrost_reg_ctrl {
|
||||
|
||||
static void dump_header(FILE *fp, struct bifrost_header header, bool verbose)
|
||||
{
|
||||
fprintf(fp, "id(%du) ", header.scoreboard_index);
|
||||
fprintf(fp, "ds(%du) ", header.dependency_slot);
|
||||
|
||||
if (header.message_type != 0) {
|
||||
const char *name = bi_message_type_name(header.message_type);
|
||||
@@ -86,21 +86,6 @@ static void dump_header(FILE *fp, struct bifrost_header header, bool verbose)
|
||||
fprintf(fp, "%s ", name);
|
||||
}
|
||||
|
||||
if (header.scoreboard_deps != 0) {
|
||||
fprintf(fp, "next-wait(");
|
||||
bool first = true;
|
||||
for (unsigned i = 0; i < 8; i++) {
|
||||
if (header.scoreboard_deps & (1 << i)) {
|
||||
if (!first) {
|
||||
fprintf(fp, ", ");
|
||||
}
|
||||
fprintf(fp, "%d", i);
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
fprintf(fp, ") ");
|
||||
}
|
||||
|
||||
if (header.staging_barrier)
|
||||
fprintf(fp, "osrb ");
|
||||
|
||||
@@ -146,6 +131,20 @@ static void dump_header(FILE *fp, struct bifrost_header header, bool verbose)
|
||||
|
||||
if (header.next_message_type)
|
||||
fprintf(fp, "next_%s ", bi_message_type_name(header.next_message_type));
|
||||
if (header.dependency_wait != 0) {
|
||||
fprintf(fp, "dwb(");
|
||||
bool first = true;
|
||||
for (unsigned i = 0; i < 8; i++) {
|
||||
if (header.dependency_wait & (1 << i)) {
|
||||
if (!first) {
|
||||
fprintf(fp, ", ");
|
||||
}
|
||||
fprintf(fp, "%d", i);
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
fprintf(fp, ") ");
|
||||
}
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user