diff options
author | Samuel Pitoiset <[email protected]> | 2016-07-10 16:19:46 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2016-07-11 21:01:21 +0200 |
commit | 19d0450b2758ec9681747e9229b46f9eb637378b (patch) | |
tree | 243ca05dda21010fc763fe2e9adc5714892ea91b | |
parent | 33c872398069d7a031e3355863c9804c3cf194db (diff) |
nvc0/ir: fix images indirect access on Fermi
This fixes the following piglits:
arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index
arb_arrays_of_arrays-basic-imagestore-mixed-const-non-const-uniform-index2
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Cc: 12.0 <[email protected]>
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index 973577353ce..18955eb2e18 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -2008,6 +2008,13 @@ NVC0LoweringPass::processSurfaceCoordsNVC0(TexInstruction *su) adjustCoordinatesMS(su); + if (ind) { + Value *ptr; + ptr = bld.mkOp2v(OP_ADD, TYPE_U32, bld.getSSA(), ind, bld.mkImm(su->tex.r)); + ptr = bld.mkOp2v(OP_AND, TYPE_U32, bld.getSSA(), ptr, bld.mkImm(7)); + su->setIndirectR(ptr); + } + // get surface coordinates for (c = 0; c < arg; ++c) src[c] = su->getSrc(c); |