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

unknown_address_5 -> framebuffer_end

parent 3d4a25da
......@@ -595,7 +595,12 @@ struct mali_single_framebuffer {
u32 zero3[8];
mali_ptr unknown_address_5;
/* Points to the end of the framebuffer. Compute as "framebuffer
* pointer + width * (height + 1) * pixel_size", where pixel_size = 4
* (for ARGB). No idea what's up with that off-by-one */
mali_ptr framebuffer_end;
u64 unknown10;
/* Depth and stencil buffers are interleaved, it appears, as they are
......
......@@ -265,20 +265,7 @@ panwrap_replay_sfbd(uint64_t gpu_va, int job_no)
panwrap_prop("width = MALI_POSITIVE(%" PRId16 ")", s->width + 1);
panwrap_prop("height = MALI_POSITIVE(%" PRId16 ")", s->height + 1);
{
/* No idea where the weird negative alignment requirements come
* from */
int mask = s->unknown_address_5 & 0xFFF;
int offset = mask ? 0x1000 - mask : 0;
char *a = pointer_as_memory_reference(s->unknown_address_5 + offset);
//panwrap_prop("unknown_address_5 = %s - %d", a, offset);
free(a);
}
MEMORY_PROP(s, unknown_address_5);
MEMORY_PROP(s, framebuffer_end);
panwrap_prop("unknown10 = 0x%" PRIx64, s->unknown10);
......
......@@ -98,8 +98,12 @@ trans_new_frag_framebuffer(struct panfrost_context *ctx)
{
struct mali_single_framebuffer fb = trans_emit_fbd(ctx);
/* It's unclear what function the off-by-one serves here, unless I just
* botched the calculation */
fb.framebuffer_end = ctx->framebuffer.gpu + ctx->width * (ctx->height + 1) * 4;
fb.unknown2 = 0xb84e0281;
fb.unknown_address_5 = ctx->framebuffer.gpu + ctx->width * (ctx->height + 1) * 4;
fb.unknown10 = 0xfffff9c0;
memcpy(&ctx->fragment_fbd, &fb, sizeof(fb));
......
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