llvmpipe: fix linear fs analysis with nonzero fs outputs

linear fs only works with output 0

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22135>
(cherry picked from commit 6a5dcd2776)
This commit is contained in:
Mike Blumenkrantz 2023-03-23 12:10:37 -04:00 committed by Dylan Baker
parent 792e54d0a4
commit 876a67ef6d
2 changed files with 3 additions and 1 deletions

View file

@ -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
},

View file

@ -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 &&