Commit 5a2227c2 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Begin decoding attr_meta

parent 71efc353
......@@ -260,9 +260,17 @@ struct mali_attr {
u32 size;
} __attribute__((packed));
/* TODO: I'm pretty sure this isn't really right in the presence of more
* complicated metadata, like matrices or varyings */
struct mali_attr_meta {
u8 index;
u64 flags :56;
u64 unknown1 :17;
/* After MALI_POSITIVE, 4 for vec4, 1 for scalar, etc */
unsigned nr_components : 2;
u64 unknown2 :37;
} __attribute__((packed));
ASSERT_SIZEOF_TYPE(struct mali_attr_meta,
sizeof(u64), sizeof(u64));
......@@ -447,7 +455,8 @@ struct mali_viewport {
u16 viewport1[2];
} __attribute__((packed));
/* TODO: I have no idea what this could possibly be, whatsoever. */
/* TODO: Varying meta is symmetrical with attr_meta, but there is some
* weirdness associated. Figure it out. */
struct mali_unknown6 {
u64 unknown0;
......
......@@ -636,8 +636,15 @@ panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
attr_meta = panwrap_fetch_gpu_mem(attr_mem, p,
sizeof(*attr_mem));
panwrap_log("{ .index = %d, .flags = 0x%" PRIx64 "},\n",
attr_meta->index, (u64) attr_meta->flags);
panwrap_log("{\n");
panwrap_indent++;
panwrap_prop("index = %d", attr_meta->index);
panwrap_prop("nr_components = MALI_POSITIVE(%d)", MALI_NEGATIVE(attr_meta->nr_components));
panwrap_prop("unknown1 = 0x%" PRIx64, (u64) attr_meta->unknown1);
panwrap_prop("unknown2 = 0x%" PRIx64, (u64) attr_meta->unknown2);
panwrap_indent--;
panwrap_log("},\n");
}
panwrap_indent--;
......
......@@ -208,8 +208,8 @@ void main(void) {
pandev_shader_compile(shader_12 + 240, shader_src_1, 5);
struct mali_attr_meta attribute_meta_1[] = {
{ .index = 0, .flags = 0x2dea22},
{ .index = 1, .flags = 0x2fda22},
//{ .index = 0, .flags = 0x2dea22},
//{ .index = 1, .flags = 0x2fda22},
};
mali_ptr attribute_meta_1_p = pandev_upload(-1, alloc_gpu_va_19, memory_19, &attribute_meta_1, sizeof(attribute_meta_1), false);
......
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