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

unknown2->format

parent dba6ca59
......@@ -606,7 +606,7 @@ struct mali_payload_fragment {
/* (Single?) Framebuffer Descriptor */
/* Flags apply to unknown2. With just MSAA_A and MSAA_B, the framebuffer is
/* Flags apply to format. With just MSAA_A and MSAA_B, the framebuffer is
* configured for 4x. With MSAA_8, it is configured for 8x. */
#define MALI_FRAMEBUFFER_MSAA_8 (1 << 3)
......@@ -626,7 +626,11 @@ struct mali_single_framebuffer {
u64 zero1;
u64 heap_free_address;
u32 unknown2; // 0xB8..
/* Exact format is ironically not known, since EGL is finnicky with the
* blob. MSAA, colourspace, etc are configured here. */
u32 format;
u32 clear_flags;
u32 zero2;
......
......@@ -79,7 +79,7 @@ static const struct panwrap_flag_info u4_flag_info[] = {
#undef FLAG_INFO
#define FLAG_INFO(flag) { MALI_FRAMEBUFFER_##flag, "MALI_FRAMEBUFFER_" #flag }
static const struct panwrap_flag_info u2_flag_info[] = {
static const struct panwrap_flag_info fb_fmt_flag_info[] = {
FLAG_INFO(MSAA_A),
FLAG_INFO(MSAA_B),
FLAG_INFO(MSAA_8),
......@@ -247,8 +247,8 @@ panwrap_replay_sfbd(uint64_t gpu_va, int job_no)
panwrap_prop("flags = 0x%" PRIx32, s->flags);
panwrap_prop("heap_free_address = 0x%" PRIx64, s->heap_free_address);
panwrap_log(".unknown2 = ");
panwrap_log_decoded_flags(u2_flag_info, s->unknown2);
panwrap_log(".format = ");
panwrap_log_decoded_flags(fb_fmt_flag_info, s->format);
panwrap_log_cont(",\n");
panwrap_prop("width = MALI_POSITIVE(%" PRId16 ")", s->width + 1);
......
......@@ -42,11 +42,11 @@ trans_set_framebuffer_msaa(struct panfrost_context *ctx, bool enabled)
if (enabled) {
ctx->fragment_shader_core.unknown2_3 |= MALI_HAS_MSAA;
ctx->fragment_shader_core.unknown2_4 &= ~MALI_NO_MSAA;
ctx->fragment_fbd.unknown2 |= MALI_FRAMEBUFFER_MSAA_A | MALI_FRAMEBUFFER_MSAA_B;
ctx->fragment_fbd.format |= MALI_FRAMEBUFFER_MSAA_A | MALI_FRAMEBUFFER_MSAA_B;
} else {
ctx->fragment_shader_core.unknown2_3 &= ~MALI_HAS_MSAA;
ctx->fragment_shader_core.unknown2_4 |= MALI_NO_MSAA;
ctx->fragment_fbd.unknown2 &= ~(MALI_FRAMEBUFFER_MSAA_A | MALI_FRAMEBUFFER_MSAA_B);
ctx->fragment_fbd.format &= ~(MALI_FRAMEBUFFER_MSAA_A | MALI_FRAMEBUFFER_MSAA_B);
}
}
......@@ -79,7 +79,7 @@ trans_emit_fbd(struct panfrost_context *ctx)
{
struct mali_single_framebuffer framebuffer = {
.flags = 0x1f,
.unknown2 = 0x30000000,
.format = 0x30000000,
.clear_flags = 0x1000,
.unknown_address_0 = ctx->scratchpad.gpu,
.unknown_address_1 = ctx->scratchpad.gpu + 0x6000,
......@@ -107,7 +107,7 @@ trans_new_frag_framebuffer(struct panfrost_context *ctx)
fb.framebuffer_end = ctx->framebuffer.gpu + ctx->framebuffer.size;
fb.negative_stride = -ctx->stride;
fb.unknown2 = 0xb84e0281;
fb.format = 0xb84e0281; /* RGB32, no MSAA */
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