u64 zero3, zero4;
} __attribute__((packed));
-/* flags for unk3 */
+/* Flags for mfbd_flags */
/* Enables writing depth results back to main memory (rather than keeping them
* on-chip in the tile buffer and then discarding) */
u32 zero4 : 5;
/* 0x30 */
u32 clear_stencil : 8;
- u32 unk3 : 24; // = 0x100
+ u32 mfbd_flags : 24; // = 0x100
float clear_depth;
struct panfrost_resource *rsrc = pan_resource(surf->texture);
if (rsrc->bo->layout == PAN_AFBC) {
- fb->unk3 |= MALI_MFBD_EXTRA;
+ fb->mfbd_flags |= MALI_MFBD_EXTRA;
fbx->flags =
MALI_EXTRA_PRESENT |
fbx->ds_afbc.zero1 = 0x10009;
fbx->ds_afbc.padding = 0x1000;
} else if (rsrc->bo->layout == PAN_LINEAR) {
- fb->unk3 |= MALI_MFBD_EXTRA;
+ fb->mfbd_flags |= MALI_MFBD_EXTRA;
fbx->flags |= MALI_EXTRA_PRESENT | MALI_EXTRA_ZS | 0x1;
fbx->ds_linear.depth = rsrc->bo->gpu;
off_t offset = 0;
/* There may be extra data stuck in the middle */
- bool has_extra = fb->unk3 & MALI_MFBD_EXTRA;
+ bool has_extra = fb->mfbd_flags & MALI_MFBD_EXTRA;
/* Compute total size for transfer */
/* XXX: MRT case */
fb.rt_count_2 = 1;
- fb.unk3 = 0x100;
+ fb.mfbd_flags = 0x100;
/* TODO: MRT clear */
panfrost_mfbd_clear(job, &fb, &fbx, &rts[0]);
}
if (job->requirements & PAN_REQ_DEPTH_WRITE)
- fb.unk3 |= MALI_MFBD_DEPTH_WRITE;
+ fb.mfbd_flags |= MALI_MFBD_DEPTH_WRITE;
if (ctx->pipe_framebuffer.nr_cbufs == 1) {
struct panfrost_resource *rsrc = (struct panfrost_resource *) ctx->pipe_framebuffer.cbufs[0]->texture;
if (rsrc->bo->has_checksum) {
- fb.unk3 |= MALI_MFBD_EXTRA;
+ fb.mfbd_flags |= MALI_MFBD_EXTRA;
fbx.flags |= MALI_EXTRA_PRESENT;
fbx.checksum_stride = rsrc->bo->checksum_stride;
fbx.checksum = rsrc->bo->gpu + rsrc->bo->slices[0].stride * rsrc->base.height0;
};
#undef FLAG_INFO
+#define FLAG_INFO(flag) { MALI_MFBD_##flag, "MALI_MFBD_" #flag }
+static const struct pandecode_flag_info mfbd_flag_info [] = {
+ FLAG_INFO(DEPTH_WRITE),
+ FLAG_INFO(EXTRA),
+ {}
+};
+#undef FLAG_INFO
+
+
extern char *replace_fragment;
extern char *replace_vertex;
pandecode_prop("rt_count_1 = MALI_POSITIVE(%d)", fb->rt_count_1 + 1);
pandecode_prop("rt_count_2 = %d", fb->rt_count_2);
- pandecode_prop("unk3 = 0x%x", fb->unk3);
+ pandecode_log(".mfbd_flags = ");
+ pandecode_log_decoded_flags(mfbd_flag_info, fb->mfbd_flags);
+ pandecode_log_cont(",\n");
+
pandecode_prop("clear_stencil = 0x%x", fb->clear_stencil);
pandecode_prop("clear_depth = %f", fb->clear_depth);
gpu_va += sizeof(struct bifrost_framebuffer);
- if ((fb->unk3 & MALI_MFBD_EXTRA) && with_render_targets) {
+ if ((fb->mfbd_flags & MALI_MFBD_EXTRA) && with_render_targets) {
mem = pandecode_find_mapped_gpu_mem_containing(gpu_va);
const struct bifrost_fb_extra *PANDECODE_PTR_VAR(fbx, mem, (mali_ptr) gpu_va);