summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantine Shablia <constantine.shablya@collabora.com>2024-04-24 14:41:03 +0300
committerEric Engestrom <eric@engestrom.ch>2024-04-30 14:23:27 +0200
commit714f7bd58b159164c5b6df1ddcf0ccf93b33e377 (patch)
tree34ba34423ac9b600ee444b55bb6da3ef6c412f08
parent0b1d5f32f814712aff78ef0ff3dd75c014270a4b (diff)
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 3139f8f62384901b02d1fdc516ff3989f8a1f339)
-rw-r--r--.pick_status.json2
-rw-r--r--src/panfrost/compiler/bifrost_compile.c2
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) {