-struct mali_single_framebuffer
-panfrost_emit_sfbd(struct panfrost_batch *batch, unsigned vertex_count)
-{
- unsigned width = batch->key.width;
- unsigned height = batch->key.height;
-
- struct mali_single_framebuffer framebuffer = {
- .width = MALI_POSITIVE(width),
- .height = MALI_POSITIVE(height),
- .unknown2 = 0x1f,
- .format = {
- .unk3 = 0x3,
- },
- .clear_flags = 0x1000,
- .unknown_address_0 = panfrost_batch_get_scratchpad(batch)->gpu,
- .tiler = panfrost_emit_midg_tiler(batch, vertex_count),
- };
-
- return framebuffer;
-}
-
-struct bifrost_framebuffer
-panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
-{
- unsigned width = batch->key.width;
- unsigned height = batch->key.height;
-
- struct bifrost_framebuffer framebuffer = {
- .unk0 = 0x1e5, /* 1e4 if no spill */
- .width1 = MALI_POSITIVE(width),
- .height1 = MALI_POSITIVE(height),
- .width2 = MALI_POSITIVE(width),
- .height2 = MALI_POSITIVE(height),
-
- .unk1 = 0x1080,
-
- .rt_count_1 = MALI_POSITIVE(batch->key.nr_cbufs),
- .rt_count_2 = 4,
-
- .unknown2 = 0x1f,
-
- .scratchpad = panfrost_batch_get_scratchpad(batch)->gpu,
- .tiler = panfrost_emit_midg_tiler(batch, vertex_count)
- };
-
- return framebuffer;
-}
-