diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2017-02-09 15:35:51 -0500 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-03-14 00:13:15 +0000 |
commit | 97745d0f17059d04dc30a47ed01cd483894f1e21 (patch) | |
tree | 2e0ef53335faef377cd687ae8f3bd11a19e3a6e4 /src/gallium | |
parent | d51c4f7c13379b7ad716ad2582ce6f55db63316e (diff) |
nvc0/ir: fix ubo max clamp, reset file index
We just increased the max UBO, so we should also increase the clamp that
we do for robustness. Similarly, as we're including the fileIndex in the
new indirect value, we should reset fileIndex to 0 so that it is not
added in a second time.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit c95f821cb4286f8163bfdf341be2b0940011585a)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 4 |
1 files changed, 3 insertions, 1 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 5281e6112ec..e618df05a0f 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -2250,10 +2250,12 @@ NVC0LoweringPass::handleLDST(Instruction *i) if (ind) { // Clamp the UBO index when an indirect access is used to avoid // loading information from the wrong place in the driver cb. + // TODO - synchronize the max with the driver. ind = bld.mkOp2v(OP_MIN, TYPE_U32, ind, bld.mkOp2v(OP_ADD, TYPE_U32, bld.getSSA(), ind, bld.loadImm(NULL, fileIndex)), - bld.loadImm(NULL, 12)); + bld.loadImm(NULL, 13)); + fileIndex = 0; } Value *offset = bld.loadImm(NULL, i->getSrc(0)->reg.data.offset + typeSizeof(i->sType)); |