panfrost: Set clear_color_[12] in the extra fb desc
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4680>
This commit is contained in:
parent
0a0b670d63
commit
81a31911dd
|
@ -161,6 +161,10 @@ panfrost_mfbd_clear(
|
||||||
struct mali_render_target *rts,
|
struct mali_render_target *rts,
|
||||||
unsigned rt_count)
|
unsigned rt_count)
|
||||||
{
|
{
|
||||||
|
struct panfrost_context *ctx = batch->ctx;
|
||||||
|
struct pipe_context *gallium = (struct pipe_context *) ctx;
|
||||||
|
struct panfrost_device *dev = pan_device(gallium->screen);
|
||||||
|
|
||||||
for (unsigned i = 0; i < rt_count; ++i) {
|
for (unsigned i = 0; i < rt_count; ++i) {
|
||||||
if (!(batch->clear & (PIPE_CLEAR_COLOR0 << i)))
|
if (!(batch->clear & (PIPE_CLEAR_COLOR0 << i)))
|
||||||
continue;
|
continue;
|
||||||
|
@ -178,6 +182,11 @@ panfrost_mfbd_clear(
|
||||||
if (batch->clear & PIPE_CLEAR_STENCIL) {
|
if (batch->clear & PIPE_CLEAR_STENCIL) {
|
||||||
fb->clear_stencil = batch->clear_stencil;
|
fb->clear_stencil = batch->clear_stencil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dev->quirks & IS_BIFROST) {
|
||||||
|
fbx->clear_color_1 = batch->clear_color[0][0];
|
||||||
|
fbx->clear_color_2 = 0xc0000000 | (fbx->clear_color_1 & 0xffff); /* WTF? */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -1670,7 +1670,9 @@ struct mali_framebuffer_extra {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
u64 zero3, zero4;
|
u32 clear_color_1;
|
||||||
|
u32 clear_color_2;
|
||||||
|
u64 zero3;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
/* Flags for mfbd_flags */
|
/* Flags for mfbd_flags */
|
||||||
|
|
|
@ -1274,10 +1274,14 @@ pandecode_mfbd_bfr(uint64_t gpu_va, int job_no, bool is_fragment, bool is_comput
|
||||||
pandecode_log("},\n");
|
pandecode_log("},\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fbx->zero3 || fbx->zero4) {
|
if (fbx->clear_color_1 | fbx->clear_color_2) {
|
||||||
|
pandecode_prop("clear_color_1 = 0x%" PRIx32, fbx->clear_color_1);
|
||||||
|
pandecode_prop("clear_color_2 = 0x%" PRIx32, fbx->clear_color_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fbx->zero3) {
|
||||||
pandecode_msg("XXX: fb_extra zeros tripped\n");
|
pandecode_msg("XXX: fb_extra zeros tripped\n");
|
||||||
pandecode_prop("zero3 = 0x%" PRIx64, fbx->zero3);
|
pandecode_prop("zero3 = 0x%" PRIx64, fbx->zero3);
|
||||||
pandecode_prop("zero4 = 0x%" PRIx64, fbx->zero4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pandecode_indent--;
|
pandecode_indent--;
|
||||||
|
|
Loading…
Reference in New Issue