ac/nir: fix slots in clamping legacy colors

fixes: 7c41cdb81f

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23178>
(cherry picked from commit e367617668)
This commit is contained in:
Filip Gawin 2023-05-23 11:25:01 +02:00 committed by Eric Engestrom
parent cc5a2ca096
commit caa1ba767c
2 changed files with 2 additions and 2 deletions

View file

@ -1156,7 +1156,7 @@
"description": "ac/nir: fix slots in clamping legacy colors",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7c41cdb81f564ef52404e5f313ccfe2d723896e6"
},

View file

@ -585,7 +585,7 @@ ac_nir_create_gs_copy_shader(const nir_shader *gs_nir,
/* clamp legacy color output */
if (i == VARYING_SLOT_COL0 || i == VARYING_SLOT_COL1 ||
i == VARYING_SLOT_BFC0 || i == VARYING_SLOT_BFC0) {
i == VARYING_SLOT_BFC0 || i == VARYING_SLOT_BFC1) {
nir_ssa_def *color = outputs.data[i][j];
nir_ssa_def *clamp = nir_load_clamp_vertex_color_amd(&b);
outputs.data[i][j] = nir_bcsel(&b, clamp, nir_fsat(&b, color), color);