mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 15:00:36 +01:00
pan/midgard: Improve barrier disassembly
Just move some state from unknowns to actual keywords. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
This commit is contained in:
parent
d208212f80
commit
9168e7a65d
3 changed files with 31 additions and 8 deletions
|
|
@ -1354,7 +1354,17 @@ print_texture_barrier(FILE *fp, uint32_t *word)
|
|||
if (barrier->zero5)
|
||||
fprintf(fp, "/* zero4 = 0x%" PRIx64 " */ ", barrier->zero5);
|
||||
|
||||
fprintf(fp, " 0x%X\n", barrier->unknown4);
|
||||
|
||||
/* Control barriers are always implied, so include for obviousness */
|
||||
fprintf(fp, " control");
|
||||
|
||||
if (barrier->buffer)
|
||||
fprintf(fp, " | buffer");
|
||||
|
||||
if (barrier->shared)
|
||||
fprintf(fp, " | shared");
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
#undef DEFINE_CASE
|
||||
|
|
@ -1391,6 +1401,12 @@ print_texture_word(FILE *fp, uint32_t *word, unsigned tabs, unsigned in_reg_base
|
|||
if (texture->last)
|
||||
fprintf(fp, ".last");
|
||||
|
||||
if (texture->barrier_buffer)
|
||||
fprintf(fp, ".barrier_buffer /* XXX */");
|
||||
|
||||
if (texture->barrier_shared)
|
||||
fprintf(fp, ".barrier_shared /* XXX */");
|
||||
|
||||
/* Output modifiers are always interpreted floatly */
|
||||
print_outmod(fp, texture->outmod, false);
|
||||
|
||||
|
|
@ -1524,10 +1540,8 @@ print_texture_word(FILE *fp, uint32_t *word, unsigned tabs, unsigned in_reg_base
|
|||
* following unknowns are zero, so we don't include them */
|
||||
|
||||
if (texture->unknown4 ||
|
||||
texture->unknownA ||
|
||||
texture->unknown8) {
|
||||
fprintf(fp, "// unknown4 = 0x%x\n", texture->unknown4);
|
||||
fprintf(fp, "// unknownA = 0x%x\n", texture->unknownA);
|
||||
fprintf(fp, "// unknown8 = 0x%x\n", texture->unknown8);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -693,9 +693,14 @@ __attribute__((__packed__))
|
|||
midgard_outmod_float outmod : 2;
|
||||
|
||||
unsigned swizzle : 8;
|
||||
unsigned unknown4 : 8;
|
||||
|
||||
unsigned unknownA : 4;
|
||||
/* For barriers, control barriers are implied regardless, but these
|
||||
* bits also enable memory barriers of various types. For regular
|
||||
* textures, these bits are not yet understood. */
|
||||
unsigned barrier_buffer : 1;
|
||||
unsigned barrier_shared : 1;
|
||||
|
||||
unsigned unknown4 : 10;
|
||||
|
||||
/* In immediate mode, each offset field is an immediate range [0, 7].
|
||||
*
|
||||
|
|
@ -765,8 +770,9 @@ __attribute__((__packed__))
|
|||
unsigned zero2 : 14;
|
||||
|
||||
unsigned zero3 : 24;
|
||||
unsigned unknown4 : 1;
|
||||
unsigned zero4 : 7;
|
||||
unsigned buffer : 1;
|
||||
unsigned shared : 1;
|
||||
unsigned zero4 : 6;
|
||||
|
||||
uint64_t zero5;
|
||||
} midgard_texture_barrier_word;
|
||||
|
|
|
|||
|
|
@ -1513,7 +1513,10 @@ emit_control_barrier(compiler_context *ctx)
|
|||
.src = { ~0, ~0, ~0, ~0 },
|
||||
.texture = {
|
||||
.op = TEXTURE_OP_BARRIER,
|
||||
.unknown4 = 3 /* (control |) buffers | shared */
|
||||
|
||||
/* TODO: optimize */
|
||||
.barrier_buffer = 1,
|
||||
.barrier_shared = 1
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue