mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 02:40:39 +01:00
gm107/ir: add support for indirect const buffer selection
This was missed in the commit that enabled it for fermi/kepler as part of ARB_gpu_shader5 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
0532a5fd00
commit
cdc4de1215
1 changed files with 14 additions and 0 deletions
|
|
@ -241,6 +241,20 @@ GM107LoweringPass::visit(Instruction *i)
|
|||
i->op = OP_VFETCH;
|
||||
assert(prog->getType() != Program::TYPE_FRAGMENT); // INTERP
|
||||
}
|
||||
} else if (i->src(0).getFile() == FILE_MEMORY_CONST) {
|
||||
if (i->src(0).isIndirect(1)) {
|
||||
Value *ptr;
|
||||
if (i->src(0).isIndirect(0))
|
||||
ptr = bld.mkOp3v(OP_INSBF, TYPE_U32, bld.getSSA(),
|
||||
i->getIndirect(0, 1), bld.mkImm(0x1010),
|
||||
i->getIndirect(0, 0));
|
||||
else
|
||||
ptr = bld.mkOp2v(OP_SHL, TYPE_U32, bld.getSSA(),
|
||||
i->getIndirect(0, 1), bld.mkImm(16));
|
||||
i->setIndirect(0, 1, NULL);
|
||||
i->setIndirect(0, 0, ptr);
|
||||
i->subOp = NV50_IR_SUBOP_LDC_IS;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OP_ATOM:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue