aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/pandecode/decode.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-20 15:59:03 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-21 08:40:55 -0700
commitbe5e30c46be9c6cdfb0a0209f5db118bafcc4c85 (patch)
tree5016bfd009f9d358e157f5411ea3143e5940ff5a /src/panfrost/pandecode/decode.c
parent68b9030db775d93e5c2ee61000866f812cda4ab2 (diff)
pan/decode: Include address in union mali_attr
No need to break it out into extra lines. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/pandecode/decode.c')
-rw-r--r--src/panfrost/pandecode/decode.c26
1 files changed, 7 insertions, 19 deletions
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);