Module: Mesa
Branch: staging/23.0
Commit: 876a67ef6d1e309ee2f36d05e5a6d7b4d2ea563d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=876a67ef6d1e309ee2f36d05e5a6d7b4d2ea563d

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Mar 23 12:10:37 2023 -0400

llvmpipe: fix linear fs analysis with nonzero fs outputs

linear fs only works with output 0

cc: mesa-stable

Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22135>
(cherry picked from commit 6a5dcd2776fe70acb2d4699b4af01c6a3cb015f6)

---

 .pick_status.json                                   | 2 +-
 src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 9846d78ceec..ce38d8cb112 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1462,7 +1462,7 @@
         "description": "llvmpipe: fix linear fs analysis with nonzero fs 
outputs",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c 
b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c
index ad2405317e5..19b8fea66e5 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c
@@ -454,6 +454,8 @@ llvmpipe_fs_analyse_nir(struct lp_fragment_shader *shader)
 {
    if (shader->info.base.num_inputs <= LP_MAX_LINEAR_INPUTS &&
        shader->info.base.num_outputs == 1 &&
+       shader->info.base.output_semantic_name[0] == TGSI_SEMANTIC_COLOR &&
+       shader->info.base.output_semantic_index[0] == 0 &&
        !shader->info.indirect_textures &&
        !shader->info.sampler_texture_units_different &&
        shader->info.num_texs <= LP_MAX_LINEAR_TEXTURES &&

Reply via email to