nv50/ir: Rename "mkLoad" to "mkLoadv" for consistency.
This commit is contained in:
parent
cc30ce8160
commit
c82714c593
|
@ -103,19 +103,18 @@ BuildUtil::mkOp3(operation op, DataType ty, Value *dst,
|
|||
return insn;
|
||||
}
|
||||
|
||||
LValue *
|
||||
BuildUtil::mkLoad(DataType ty, Symbol *mem, Value *ptr)
|
||||
Instruction *
|
||||
BuildUtil::mkLoad(DataType ty, Value *dst, Symbol *mem, Value *ptr)
|
||||
{
|
||||
Instruction *insn = new_Instruction(func, OP_LOAD, ty);
|
||||
LValue *def = getScratch();
|
||||
|
||||
insn->setDef(0, def);
|
||||
insn->setDef(0, dst);
|
||||
insn->setSrc(0, mem);
|
||||
if (ptr)
|
||||
insn->setIndirect(0, 0, ptr);
|
||||
|
||||
insert(insn);
|
||||
return def;
|
||||
return insn;
|
||||
}
|
||||
|
||||
Instruction *
|
||||
|
@ -502,7 +501,7 @@ BuildUtil::DataArray::load(ValueMap &m, int i, int c, Value *ptr)
|
|||
if (!sym)
|
||||
sym = insert(m, i, c, mkSymbol(i, c));
|
||||
|
||||
return up->mkLoad(typeOfSize(eltSize), static_cast<Symbol *>(sym), ptr);
|
||||
return up->mkLoadv(typeOfSize(eltSize), static_cast<Symbol *>(sym), ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,9 +58,11 @@ public:
|
|||
LValue *mkOp2v(operation, DataType, Value *, Value *, Value *);
|
||||
LValue *mkOp3v(operation, DataType, Value *, Value *, Value *, Value *);
|
||||
|
||||
LValue *mkLoad(DataType, Symbol *, Value *ptr);
|
||||
Instruction *mkLoad(DataType, Value *dst, Symbol *, Value *ptr);
|
||||
Instruction *mkStore(operation, DataType, Symbol *, Value *ptr, Value *val);
|
||||
|
||||
LValue *mkLoadv(DataType, Symbol *, Value *ptr);
|
||||
|
||||
Instruction *mkMov(Value *, Value *, DataType = TYPE_U32);
|
||||
Instruction *mkMovToReg(int id, Value *);
|
||||
Instruction *mkMovFromReg(Value *, int id);
|
||||
|
@ -282,6 +284,14 @@ BuildUtil::mkOp3v(operation op, DataType ty, Value *dst,
|
|||
return dst->asLValue();
|
||||
}
|
||||
|
||||
inline LValue *
|
||||
BuildUtil::mkLoadv(DataType ty, Symbol *mem, Value *ptr)
|
||||
{
|
||||
LValue *dst = getScratch();
|
||||
mkLoad(ty, dst, mem, ptr);
|
||||
return dst;
|
||||
}
|
||||
|
||||
bool
|
||||
BuildUtil::DataArray::exists(ValueMap &m, unsigned int i, unsigned int c)
|
||||
{
|
||||
|
|
|
@ -1346,7 +1346,7 @@ Converter::fetchSrc(tgsi::Instruction::SrcRegister src, int c, Value *ptr)
|
|||
assert(!ptr);
|
||||
return loadImm(NULL, info->immd.data[idx * 4 + swz]);
|
||||
case TGSI_FILE_CONSTANT:
|
||||
return mkLoad(TYPE_U32, srcToSym(src, c), ptr);
|
||||
return mkLoadv(TYPE_U32, srcToSym(src, c), ptr);
|
||||
case TGSI_FILE_INPUT:
|
||||
if (prog->getType() == Program::TYPE_FRAGMENT) {
|
||||
// don't load masked inputs, won't be assigned a slot
|
||||
|
@ -1356,7 +1356,7 @@ Converter::fetchSrc(tgsi::Instruction::SrcRegister src, int c, Value *ptr)
|
|||
return mkOp1v(OP_RDSV, TYPE_F32, getSSA(), mkSysVal(SV_FACE, 0));
|
||||
return interpolate(src, c, ptr);
|
||||
}
|
||||
return mkLoad(TYPE_U32, srcToSym(src, c), ptr);
|
||||
return mkLoadv(TYPE_U32, srcToSym(src, c), ptr);
|
||||
case TGSI_FILE_OUTPUT:
|
||||
assert(!"load from output file");
|
||||
return NULL;
|
||||
|
@ -2287,7 +2287,7 @@ Converter::handleUserClipPlanes()
|
|||
for (i = 0; i < info->io.genUserClip; ++i) {
|
||||
Symbol *sym = mkSymbol(FILE_MEMORY_CONST, info->io.ucpBinding,
|
||||
TYPE_F32, info->io.ucpBase + i * 16 + c * 4);
|
||||
Value *ucp = mkLoad(TYPE_F32, sym, NULL);
|
||||
Value *ucp = mkLoadv(TYPE_F32, sym, NULL);
|
||||
if (c == 0)
|
||||
res[i] = mkOp2v(OP_MUL, TYPE_F32, getScratch(), clipVtx[c], ucp);
|
||||
else
|
||||
|
|
|
@ -673,7 +673,7 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
|||
tmp[0] = bld.getScratch();
|
||||
bind = bld.mkSymbol(FILE_MEMORY_CONST, 15, TYPE_U32, i->tex.r * 4);
|
||||
bld.mkOp2(OP_SHL, TYPE_U32, tmp[0], rRel, shCnt);
|
||||
tmp[1] = bld.mkLoad(TYPE_U32, bind, tmp[0]);
|
||||
tmp[1] = bld.mkLoadv(TYPE_U32, bind, tmp[0]);
|
||||
bld.mkOp2(OP_AND, TYPE_U32, tmp[0], tmp[1],
|
||||
bld.loadImm(tmp[0], 0x00ffffffu));
|
||||
rRel = tmp[0];
|
||||
|
@ -683,7 +683,7 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
|||
tmp[0] = bld.getScratch();
|
||||
bind = bld.mkSymbol(FILE_MEMORY_CONST, 15, TYPE_U32, i->tex.s * 4);
|
||||
bld.mkOp2(OP_SHL, TYPE_U32, tmp[0], sRel, shCnt);
|
||||
tmp[1] = bld.mkLoad(TYPE_U32, bind, tmp[0]);
|
||||
tmp[1] = bld.mkLoadv(TYPE_U32, bind, tmp[0]);
|
||||
bld.mkOp2(OP_AND, TYPE_U32, tmp[0], tmp[1],
|
||||
bld.loadImm(tmp[0], 0xff000000u));
|
||||
sRel = tmp[0];
|
||||
|
|
Loading…
Reference in New Issue