diff options
author | Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> | 2021-02-16 21:16:26 -0500 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2021-03-11 14:12:23 -0800 |
commit | 885b091587106ae6a79f3bb60505a4dde68835c4 (patch) | |
tree | 96442b7c75bef68a377faa81ba1828597766c5fa | |
parent | 45f800a14c8ac9786d7dd21304cb9540d9149626 (diff) |
pan/bi: Use explicit move even for RT#0 of MRT
Otherwise we get a bad RA if RT 0 = RT 3 (for example), fixes
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.fragment.sampler2d
Fixes: a6f1500bedd ("pan/bi: Workaround BLEND precolour with explicit moves")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105>
(cherry picked from commit ed29a2beb80e53e6a9985786c77350d963e860e7)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/panfrost/bifrost/bifrost_compile.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index 460d40c63fb..bbbcfc1c9ee 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3793,7 +3793,7 @@ "description": "pan/bi: Use explicit move even for RT#0 of MRT", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "a6f1500bedd2ceaacdc95c7e7b04fc9b4d32f7f5" }, diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index c3ee0e7718d..a7bef5b776e 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -419,7 +419,12 @@ bi_emit_fragment_out(bi_builder *b, nir_intrinsic_instr *instr) /* Explicit copy since BLEND inputs are precoloured to R0-R3, * TODO: maybe schedule around this or implement in RA as a * spill */ - if (rt > 0) { + bool has_mrt = false; + + nir_foreach_shader_out_variable(var, b->shader->nir) + has_mrt |= (var->data.location > FRAG_RESULT_DATA0); + + if (has_mrt) { bi_index srcs[4] = { color, color, color, color }; unsigned channels[4] = { 0, 1, 2, 3 }; color = bi_temp(b->shader); |