diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-03-09 00:45:23 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-03-12 02:37:42 +0000 |
commit | 587ad37e72d2a343b82a0c62c41c869d6825e14d (patch) | |
tree | cedcbf722a390c43cf592dc2f4b67d7f9c66f0a0 /src/gallium/drivers/panfrost/pandecode | |
parent | e57ea53acf14ef8285e713f279b6c61d6b07a35d (diff) |
panfrost: Identify fragment_extra flags
The fragment_extra structure contains additional fields extending the
MRT framebuffer descriptor, snuck in between the main framebuffer
descriptor and the render targets. Its fields include those related to
transaction elimination and depth/stencil buffers. This patch identifies
the flags field (previously just "unk" with some magic values) as well
as identifying some (but not all) flags set by the driver.
The process of identifying flags brought a bug to light where
transaction elimination (checksumming) could not be enabled unless AFBC
was in-use. This issue is now resolved.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Tomeu Vizoso <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pandecode')
-rw-r--r-- | src/gallium/drivers/panfrost/pandecode/decode.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pandecode/decode.c b/src/gallium/drivers/panfrost/pandecode/decode.c index ea635bbe981..e6932744939 100644 --- a/src/gallium/drivers/panfrost/pandecode/decode.c +++ b/src/gallium/drivers/panfrost/pandecode/decode.c @@ -209,6 +209,15 @@ static const struct pandecode_flag_info mfbd_fmt_flag_info[] = { }; #undef FLAG_INFO +#define FLAG_INFO(flag) { MALI_EXTRA_##flag, "MALI_EXTRA_" #flag } +static const struct pandecode_flag_info mfbd_extra_flag_info[] = { + FLAG_INFO(PRESENT), + FLAG_INFO(AFBC), + FLAG_INFO(ZS), + {} +}; +#undef FLAG_INFO + extern char *replace_fragment; extern char *replace_vertex; @@ -604,12 +613,11 @@ pandecode_replay_mfbd_bfr(uint64_t gpu_va, int job_no) if (fbx->checksum_stride) pandecode_prop("checksum_stride = %d", fbx->checksum_stride); - pandecode_prop("unk = 0x%x", fbx->unk); + pandecode_log(".flags = "); + pandecode_log_decoded_flags(mfbd_extra_flag_info, fbx->flags); + pandecode_log_cont(",\n"); - /* TODO figure out if this is actually the right way to - * determine whether AFBC is enabled - */ - if (fbx->unk & 0x10) { + if (fbx->flags & MALI_EXTRA_AFBC_ZS) { pandecode_log(".ds_afbc = {\n"); pandecode_indent++; |