From fa536ece04e433c8970e361c366a88c712cf53f7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 20 Aug 2019 14:40:26 -0700 Subject: [PATCH] pan/decode: Guard texture unknowns as zero trips unknown3A I think I've actually seen on T6xx but.. we'll see what happens in traces going forward. We don't want the zero noise normally, and if they show up in the wild, we want to draw attention to them. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/pandecode/decode.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 11de8494e23..6a151710b1b 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -2039,8 +2039,6 @@ pandecode_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix *p, pandecode_prop("height = MALI_POSITIVE(%" PRId16 ")", t->height + 1); pandecode_prop("depth = MALI_POSITIVE(%" PRId16 ")", t->depth + 1); pandecode_prop("array_size = MALI_POSITIVE(%" PRId16 ")", t->array_size + 1); - pandecode_prop("unknown3 = %" PRId16, t->unknown3); - pandecode_prop("unknown3A = %" PRId8, t->unknown3A); pandecode_prop("nr_mipmap_levels = %" PRId8, t->nr_mipmap_levels); struct mali_texture_format f = t->format; @@ -2055,23 +2053,29 @@ pandecode_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix *p, pandecode_prop("type = %s", pandecode_texture_type(f.type)); pandecode_prop("srgb = %" PRId32, f.srgb); - pandecode_prop("unknown1 = %" PRId32, f.unknown1); pandecode_prop("usage2 = 0x%" PRIx32, f.usage2); + if (f.unknown1) { + pandecode_msg("XXX: texture format zero tripped\n"); + pandecode_prop("unknown1 = %" PRId32, f.unknown1); + } + pandecode_indent--; pandecode_log("},\n"); if (t->swizzle_zero) { - /* Shouldn't happen */ pandecode_msg("XXX: swizzle zero tripped\n"); pandecode_prop("swizzle_zero = %d", t->swizzle_zero); } - pandecode_prop("unknown3 = 0x%" PRIx32, t->unknown3); - - pandecode_prop("unknown5 = 0x%" PRIx32, t->unknown5); - pandecode_prop("unknown6 = 0x%" PRIx32, t->unknown6); - pandecode_prop("unknown7 = 0x%" PRIx32, t->unknown7); + if (t->unknown3 | t->unknown3A | t->unknown5 | t->unknown6 | t->unknown7) { + pandecode_msg("XXX: texture zero tripped\n"); + pandecode_prop("unknown3 = %" PRId16, t->unknown3); + pandecode_prop("unknown3A = %" PRId8, t->unknown3A); + pandecode_prop("unknown5 = 0x%" PRIx32, t->unknown5); + pandecode_prop("unknown6 = 0x%" PRIx32, t->unknown6); + pandecode_prop("unknown7 = 0x%" PRIx32, t->unknown7); + } pandecode_log(".payload = {\n"); pandecode_indent++; -- 2.30.2