nak: Fix a perf regression in tex lowering

These lines look like they were mistakenly introduced, and cause a
significant perf hit. Eg. this fix improves the Horizon Zero Dawn
in-game benchamark by ~42% on my ampere machine (5992 pts -> 8517 pts).

Fixes: d16e75e55f ("nak: Lower texture inputs for Kepler B")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35100>
(cherry picked from commit 9d620fabd2)
This commit is contained in:
Mel Henning 2025-05-21 20:37:52 -04:00 committed by Eric Engestrom
parent c9ff965c22
commit 3dedf9bbc1
2 changed files with 1 additions and 3 deletions

View file

@ -4644,7 +4644,7 @@
"description": "nak: Fix a perf regression in tex lowering",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "d16e75e55f3d1c53a5441daf0931668bd3919fa9",
"notes": null

View file

@ -231,8 +231,6 @@ lower_tex(nir_builder *b, nir_tex_instr *tex, const struct nak_compiler *nak)
nir_src_rewrite(&tex->src[0].src, nir_vec(b, src0, src0_comps));
if (src1_comps > 0) {
while (src1_comps < 4)
PUSH(src1, nir_undef(b, 1, 32));
num_backend_srcs = 2;
tex->src[1].src_type = nir_tex_src_backend2;
nir_src_rewrite(&tex->src[1].src, nir_vec(b, src1, src1_comps));