Module: Mesa Branch: staging/23.1 Commit: 561d5b931b9f186e9adaea90e8555d8c548eece4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=561d5b931b9f186e9adaea90e8555d8c548eece4
Author: Dave Airlie <[email protected]> Date: Wed Aug 2 12:17:27 2023 +1000 llvmpipe: fix fragdata/lastfragdata heuristic a bit more. This heuristic broke when zmike lowered fragcolor using NIR, This fixes a regression in: dEQP-GLES31.functional.shaders.framebuffer_fetch.basic.last_frag_data Fixes: db1371cce1d4 ("llvmpipe: fix handling of unused color attachments") Acked-by: Mike Blumenkrantz <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24435> (cherry picked from commit 773d77dc7e467dc0ec23d7defa791c360716df5e) --- .pick_status.json | 2 +- src/gallium/drivers/llvmpipe/lp_state_fs.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 6e8962a7f3c..17097d99809 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1111,7 +1111,7 @@ "description": "llvmpipe: fix fragdata/lastfragdata heuristic a bit more.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "db1371cce1d4e0f0f4fa2518379db78efde53ea4" }, diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index ac55f8e3d69..af64469e16c 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -1181,8 +1181,7 @@ generate_fs_loop(struct gallivm_state *gallivm, if ((shader->info.base.output_semantic_name[attrib] == TGSI_SEMANTIC_COLOR) && ((cbuf < key->nr_cbufs) || (cbuf == 1 && dual_source_blend))) { - if (cbuf == 0 && - shader->info.base.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]) { + if (cbuf == 0) { /* XXX: there is an edge case with FB fetch where gl_FragColor and * gl_LastFragData[0] are used together. This creates both * FRAG_RESULT_COLOR and FRAG_RESULT_DATA* output variables. This
