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);