diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-04-30 02:15:09 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-05-01 23:20:50 +0000 |
commit | 910608b29a14b362b3ee21d820373a5e0cff5ff2 (patch) | |
tree | c77b61e59e9df27b9286afcc5d7527e397e37e9e | |
parent | b304b30f2c6cc7d20ed615b27bf971bf8ca1445d (diff) |
panfrost/decode: Hit MRT blend shader enable bits
Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r-- | src/gallium/drivers/panfrost/include/panfrost-job.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/panfrost/pandecode/decode.c | 15 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h index 97fcb0380dd..c2d922678b8 100644 --- a/src/gallium/drivers/panfrost/include/panfrost-job.h +++ b/src/gallium/drivers/panfrost/include/panfrost-job.h @@ -424,8 +424,10 @@ struct mali_blend_meta { u64 unk1; - /* For programmable blending, these turn into the blend_shader address */ - struct mali_blend_equation blend_equation_1; + union { + struct mali_blend_equation blend_equation_1; + mali_ptr blend_shader; + }; u64 zero2; struct mali_blend_equation blend_equation_2; diff --git a/src/gallium/drivers/panfrost/pandecode/decode.c b/src/gallium/drivers/panfrost/pandecode/decode.c index bb6f4b19711..9936249e524 100644 --- a/src/gallium/drivers/panfrost/pandecode/decode.c +++ b/src/gallium/drivers/panfrost/pandecode/decode.c @@ -1278,7 +1278,20 @@ pandecode_replay_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix #ifndef BIFROST pandecode_prop("unk1 = 0x%" PRIx64, b->unk1); - pandecode_replay_blend_equation(&b->blend_equation_1, "_1"); + + /* Depending on unk1, we determine if there's a + * blend shader */ + + if ((b->unk1 & 0xF) >= 0x2) { + blend_shader = true; + pandecode_replay_shader_address("blend_shader", b->blend_shader); + } else { + pandecode_replay_blend_equation(&b->blend_equation_1, "_1"); + } + + /* This is always an equation, I think. If + * there's a shader, it just defaults to + * REPLACE (0x122) */ pandecode_replay_blend_equation(&b->blend_equation_2, "_2"); if (b->zero2) { |