From: Alyssa Rosenzweig Date: Tue, 20 Aug 2019 22:59:03 +0000 (-0700) Subject: pan/decode: Include address in union mali_attr X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be5e30c46be9c6cdfb0a0209f5db118bafcc4c85;p=mesa.git pan/decode: Include address in union mali_attr No need to break it out into extra lines. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 32be9f3fa3e..148be10fdc4 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -1229,35 +1229,23 @@ pandecode_attributes(const struct pandecode_mapped_memory *mem, union mali_attr *attr = pandecode_fetch_gpu_mem(mem, addr, sizeof(union mali_attr) * count); - char base[128]; - snprintf(base, sizeof(base), "%s_data_%d%s", prefix, job_no, suffix); + pandecode_log("union mali_attr %s_%d[] = {\n", prefix, job_no); + pandecode_indent++; for (int i = 0; i < count; ++i) { + pandecode_log("{\n"); + pandecode_indent++; + enum mali_attr_mode mode = attr[i].elements & 7; if (mode == MALI_ATTR_UNUSED) - continue; + pandecode_msg("XXX: unused attribute record\n"); mali_ptr raw_elements = attr[i].elements & ~7; - - /* TODO: Do we maybe want to dump the attribute values - * themselves given the specified format? Or is that too hard? - * */ - char *a = pointer_as_memory_reference(raw_elements); - pandecode_log("mali_ptr %s_%d_p = %s;\n", base, i, a); + pandecode_prop("elements = (%s) | %s", a, pandecode_attr_mode(mode)); free(a); - } - - pandecode_log("union mali_attr %s_%d[] = {\n", prefix, job_no); - pandecode_indent++; - - for (int i = 0; i < count; ++i) { - pandecode_log("{\n"); - pandecode_indent++; - unsigned mode = attr[i].elements & 7; - pandecode_prop("elements = (%s_%d_p) | %s", base, i, pandecode_attr_mode(mode)); pandecode_prop("shift = %d", attr[i].shift); pandecode_prop("extra_flags = %d", attr[i].extra_flags); pandecode_prop("stride = 0x%" PRIx32, attr[i].stride);