pan/bi: fix 1D array tex coord lowering

We were erroneously specifying Y for 1D arrays

Cc: mesa-stable
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28899>
(cherry picked from commit 3139f8f623)
This commit is contained in:
Constantine Shablia 2024-04-24 14:41:03 +03:00 committed by Eric Engestrom
parent 0b1d5f32f8
commit 714f7bd58b
2 changed files with 2 additions and 2 deletions

View file

@ -2194,7 +2194,7 @@
"description": "pan/bi: fix 1D array tex coord lowering",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -3478,7 +3478,7 @@ bi_emit_tex_valhall(bi_builder *b, nir_tex_instr *instr)
/* Copy XY (for 2D+) or XX (for 1D) */
sregs[VALHALL_TEX_SREG_X_COORD] = index;
if (components >= 2)
if ((components == 2 && !instr->is_array) || components > 2)
sregs[VALHALL_TEX_SREG_Y_COORD] = bi_extract(b, index, 1);
if (components == 3 && !instr->is_array) {