From f3aa999383074d666d6e3f3506e66b0c937904ca Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 26 Apr 2014 02:08:23 -0400 Subject: 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 --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp') 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); } } -- cgit v1.2.3