diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-05-04 12:48:50 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2020-05-27 16:49:41 -0400 |
commit | 83cd3f0b4e773f7db347f8d42a5cfb2584dee45d (patch) | |
tree | ba34ace3a35e90693367eb6c772a42568378f6fb | |
parent | a91306677c613ba7511b764b3decc9db42b24de1 (diff) |
panfrost: Fix Bifrost blending with depth-only FBO
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>
-rw-r--r-- | src/gallium/drivers/panfrost/pan_cmdstream.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index a6114f7cdc8..af7ee5b8d6e 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -733,7 +733,6 @@ panfrost_frag_meta_blend_update(struct panfrost_context *ctx, if (dev->quirks & IS_BIFROST) { struct bifrost_blend_rt *brts = rts; - brts[i].flags = 0x200; if (blend[i].is_shader) { /* The blend shader's address needs to be at * the same top 32 bit as the fragment shader. @@ -743,7 +742,8 @@ panfrost_frag_meta_blend_update(struct panfrost_context *ctx, (fs->bo->gpu & (0xffffffffull << 32))); brts[i].shader = blend[i].shader.gpu; brts[i].unk2 = 0x0; - } else { + brts[i].flags = 0x200; + } else if (ctx->pipe_framebuffer.nr_cbufs > i) { enum pipe_format format = ctx->pipe_framebuffer.cbufs[i]->format; const struct util_format_description *format_desc; format_desc = util_format_description(format); @@ -757,6 +757,11 @@ panfrost_frag_meta_blend_update(struct panfrost_context *ctx, brts[i].unk2 = 0x19; brts[i].shader_type = fs->blend_types[i]; + brts[i].flags = 0x200; + } else { + /* Dummy attachment for depth-only */ + brts[i].unk2 = 0x3; + brts[i].shader_type = fs->blend_types[i]; } } else { struct midgard_blend_rt *mrts = rts; |