From 773d77dc7e467dc0ec23d7defa791c360716df5e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 2 Aug 2023 12:17:27 +1000 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 68993555561..35b3dfbb052 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -1186,8 +1186,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