Mesa (master): v3d: Only look up the 3rd texture gather offset for non-arrays.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 16 19:11:58 UTC 2019
Module: Mesa
Branch: master
Commit: 1bc71e8b655f2f02b3e3a0af34c7cad12b9cb83d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1bc71e8b655f2f02b3e3a0af34c7cad12b9cb83d
Author: Eric Anholt <eric at anholt.net>
Date: Fri Apr 12 09:38:03 2019 -0700
v3d: Only look up the 3rd texture gather offset for non-arrays.
Fixes assertion failures in the CTS since Karol's cleanup when NIR started
noticing that we were reading an invalid component.
Fixes: 5450f1c9fb09 ("v3d: prefer using nir_src_comp_as_int over nir_src_as_const_value")
---
src/broadcom/compiler/v3d40_tex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/broadcom/compiler/v3d40_tex.c b/src/broadcom/compiler/v3d40_tex.c
index 3bed32d839f..679f1f15f81 100644
--- a/src/broadcom/compiler/v3d40_tex.c
+++ b/src/broadcom/compiler/v3d40_tex.c
@@ -142,7 +142,7 @@ v3d40_vir_emit_tex(struct v3d_compile *c, nir_tex_instr *instr)
if (instr->coord_components >= 2)
p2_unpacked.offset_t =
nir_src_comp_as_int(instr->src[i].src, 1);
- if (instr->coord_components >= 3)
+ if (non_array_components >= 3)
p2_unpacked.offset_r =
nir_src_comp_as_int(instr->src[i].src, 2);
} else {
More information about the mesa-commit
mailing list