mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
pan/midgard: Disassemble barrier instructions
We don't need to print all the usual texture noise; just the relevant fields and the rest can be guarded to zero. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3580>
This commit is contained in:
parent
556964d927
commit
c9f4eface3
2 changed files with 60 additions and 3 deletions
|
|
@ -1283,6 +1283,35 @@ sampler_type_name(enum mali_sampler_type t)
|
|||
|
||||
}
|
||||
|
||||
static void
|
||||
print_texture_barrier(FILE *fp, uint32_t *word)
|
||||
{
|
||||
midgard_texture_barrier_word *barrier = (midgard_texture_barrier_word *) word;
|
||||
|
||||
if (!barrier->cont)
|
||||
fprintf(fp, "/* cont missing? */");
|
||||
|
||||
if (!barrier->last)
|
||||
fprintf(fp, "/* last missing? */");
|
||||
|
||||
if (barrier->zero1)
|
||||
fprintf(fp, "/* zero1 = 0x%X */ ", barrier->zero1);
|
||||
|
||||
if (barrier->zero2)
|
||||
fprintf(fp, "/* zero2 = 0x%X */ ", barrier->zero2);
|
||||
|
||||
if (barrier->zero3)
|
||||
fprintf(fp, "/* zero3 = 0x%X */ ", barrier->zero3);
|
||||
|
||||
if (barrier->zero4)
|
||||
fprintf(fp, "/* zero4 = 0x%X */ ", barrier->zero4);
|
||||
|
||||
if (barrier->zero5)
|
||||
fprintf(fp, "/* zero4 = 0x%" PRIx64 " */ ", barrier->zero5);
|
||||
|
||||
fprintf(fp, " 0x%X\n", barrier->unknown4);
|
||||
}
|
||||
|
||||
#undef DEFINE_CASE
|
||||
|
||||
static void
|
||||
|
|
@ -1296,6 +1325,12 @@ print_texture_word(FILE *fp, uint32_t *word, unsigned tabs, unsigned in_reg_base
|
|||
/* Broad category of texture operation in question */
|
||||
print_texture_op(fp, texture->op, texture->is_gather);
|
||||
|
||||
/* Barriers use a dramatically different code path */
|
||||
if (texture->op == TEXTURE_OP_BARRIER) {
|
||||
print_texture_barrier(fp, word);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Specific format in question */
|
||||
print_texture_format(fp, texture->format);
|
||||
|
||||
|
|
|
|||
|
|
@ -745,9 +745,31 @@ __attribute__((__packed__))
|
|||
}
|
||||
midgard_texture_word;
|
||||
|
||||
/* Up to 16 constant bytes can be embedded in a bundle. This union describes
|
||||
* all possible layouts.
|
||||
*/
|
||||
/* Technically barriers are texture instructions but it's less work to add them
|
||||
* as an explicitly zeroed special case, since most fields are forced to go to
|
||||
* zero */
|
||||
|
||||
typedef struct
|
||||
__attribute__((__packed__))
|
||||
{
|
||||
unsigned type : 4;
|
||||
unsigned next_type : 4;
|
||||
|
||||
/* op = TEXTURE_OP_BARRIER */
|
||||
unsigned op : 6;
|
||||
unsigned zero1 : 2;
|
||||
|
||||
/* Since helper invocations don't make any sense, these are forced to one */
|
||||
unsigned cont : 1;
|
||||
unsigned last : 1;
|
||||
unsigned zero2 : 14;
|
||||
|
||||
unsigned zero3 : 24;
|
||||
unsigned unknown4 : 1;
|
||||
unsigned zero4 : 7;
|
||||
|
||||
uint64_t zero5;
|
||||
} midgard_texture_barrier_word;
|
||||
|
||||
typedef union midgard_constants {
|
||||
double f64[2];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue