From 714f7bd58b159164c5b6df1ddcf0ccf93b33e377 Mon Sep 17 00:00:00 2001 From: Constantine Shablia Date: Wed, 24 Apr 2024 14:41:03 +0300 Subject: [PATCH] pan/bi: fix 1D array tex coord lowering We were erroneously specifying Y for 1D arrays Cc: mesa-stable Suggested-by: Erik Faye-Lund Reviewed-by: Erik Faye-Lund Reviewed-by: Boris Brezillon Reviewed-by: Mary Guillemard Part-of: (cherry picked from commit 3139f8f62384901b02d1fdc516ff3989f8a1f339) --- .pick_status.json | 2 +- src/panfrost/compiler/bifrost_compile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index d731fd8c85e..d4144081d44 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index 07ca3fba859..b4bad2f2c7f 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -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) {