aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-04-26 02:08:23 -0400
committerIlia Mirkin <[email protected]>2014-04-28 19:09:18 -0400
commitf3aa999383074d666d6e3f3506e66b0c937904ca (patch)
tree2c71884220504ba390e2bef267cf8ea196f6dc60 /src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
parent46364a53ef30e5c97e1eeb5a879dd99a47415b73 (diff)
nv50/ir: change texture offsets to ValueRefs, allow nonconst
This allows us to have non-constant offsets for textureGatherOffset and textureGatherOffsets. Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 402cecfb5f8..3e44bf9fdba 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1763,11 +1763,11 @@ Converter::handleTEX(Value *dst[4], int R, int S, int L, int C, int Dx, int Dy)
if (tgsi.getOpcode() == TGSI_OPCODE_TG4 && !tgt.isShadow())
texi->tex.gatherComp = tgsi.getSrc(1).getValueU32(0, info);
+ texi->tex.useOffsets = tgsi.getNumTexOffsets();
for (s = 0; s < tgsi.getNumTexOffsets(); ++s) {
for (c = 0; c < 3; ++c) {
- texi->tex.offset[s][c] = tgsi.getTexOffset(s).getValueU32(c, info);
- if (texi->tex.offset[s][c])
- texi->tex.useOffsets = s + 1;
+ texi->offset[s][c].set(fetchSrc(tgsi.getTexOffset(s), c, NULL));
+ texi->offset[s][c].setInsn(texi);
}
}
@@ -1800,11 +1800,11 @@ Converter::handleTXF(Value *dst[4], int R, int L_M)
setTexRS(texi, c, R, -1);
+ texi->tex.useOffsets = tgsi.getNumTexOffsets();
for (s = 0; s < tgsi.getNumTexOffsets(); ++s) {
for (c = 0; c < 3; ++c) {
- texi->tex.offset[s][c] = tgsi.getTexOffset(s).getValueU32(c, info);
- if (texi->tex.offset[s][c])
- texi->tex.useOffsets = s + 1;
+ texi->offset[s][c].set(fetchSrc(tgsi.getTexOffset(s), c, NULL));
+ texi->offset[s][c].setInsn(texi);
}
}