Commit a8d415b9 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Identify blend_shader

parent db2a5457
......@@ -99,7 +99,13 @@ struct mali_shader_meta {
u32 unknown2_6;
u32 unknown2_7;
u32 unknown2_8;
u32 unknown2_9;
/* Check for MALI_HAS_BLEND_SHADER to decide how to interpret */
union {
mali_ptr blend_shader;
u64 unknown2_9;
};
} __attribute__((packed));
/* This only concerns hardware jobs */
......
......@@ -290,6 +290,19 @@ void panwrap_replay_attributes(const struct panwrap_mapped_memory *mem,
TOUCH_LEN(mem, addr, sizeof(*attr) * count, prefix, job_no, true);
}
static mali_ptr
panwrap_replay_shader_address(const char *name, mali_ptr ptr)
{
/* TODO: Decode flags */
mali_ptr shader_ptr = ptr & ~15;
char *a = pointer_as_memory_reference(shader_ptr);
panwrap_prop("%s = (%s) | %d", name, a, (int) (ptr & 15));
free(a);
return shader_ptr;
}
static int
panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
const struct panwrap_mapped_memory *mem,
......@@ -312,12 +325,7 @@ panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
panwrap_log("struct mali_shader_meta shader_meta_%d = {\n", job_no);
panwrap_indent++;
/* TODO: Decode flags */
mali_ptr shader_ptr = s->shader & ~15;
char *a = pointer_as_memory_reference(shader_ptr);
panwrap_prop("shader = (%s) | %d", a, (int) (s->shader & 15));
free(a);
mali_ptr shader_ptr = panwrap_replay_shader_address("shader", s->shader);
if (s->zero1)
panwrap_msg("XXX shader zero tripped\n");
......@@ -354,7 +362,12 @@ panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
panwrap_prop("unknown2_6 = 0x%" PRIx32, s->unknown2_6);
panwrap_prop("unknown2_7 = 0x%" PRIx32, s->unknown2_7);
panwrap_prop("unknown2_8 = 0x%" PRIx32, s->unknown2_8);
panwrap_prop("unknown2_9 = 0x%" PRIx32, s->unknown2_9);
if (s->unknown2_3 & MALI_HAS_BLEND_SHADER) {
panwrap_replay_shader_address("blend_shader", s->blend_shader);
} else {
panwrap_prop("unknown2_9 = 0x%" PRIx64, s->unknown2_9);
}
panwrap_indent--;
panwrap_log("};\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment