<p dir="ltr">Do you also need to zero out su->tex.r ?</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Jul 10, 2016 10:19 AM, "Samuel Pitoiset" <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This fixes the following piglits:<br>
<br>
arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index<br>
arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index2<br>
<br>
Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>><br>
Cc: 12.0 <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
---<br>
<br>
Expect minor conflicts because I did refactor that logic but the patch has not<br>
been backported.<br>
<br>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 7 +++++++<br>
1 file changed, 7 insertions(+)<br>
<br>
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp<br>
index 9735773..18955eb 100644<br>
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp<br>
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp<br>
@@ -2008,6 +2008,13 @@ NVC0LoweringPass::processSurfaceCoordsNVC0(TexInstruction *su)<br>
<br>
adjustCoordinatesMS(su);<br>
<br>
+ if (ind) {<br>
+ Value *ptr;<br>
+ ptr = bld.mkOp2v(OP_ADD, TYPE_U32, bld.getSSA(), ind, bld.mkImm(su->tex.r));<br>
+ ptr = bld.mkOp2v(OP_AND, TYPE_U32, bld.getSSA(), ptr, bld.mkImm(7));<br>
+ su->setIndirectR(ptr);<br>
+ }<br>
+<br>
// get surface coordinates<br>
for (c = 0; c < arg; ++c)<br>
src[c] = su->getSrc(c);<br>
--<br>
2.9.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>