nv50/ir: fix support for shader input + immediate in gp
This only works for up to $a3, hopefully we won't go that high. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
committed by
Maarten Lankhorst
parent
45b7f1701e
commit
f77069419a
@@ -398,9 +398,14 @@ CodeEmitterNV50::setSrcFileBits(const Instruction *i, int enc)
|
||||
case 0x0c: // rir
|
||||
break;
|
||||
case 0x0d: // gir
|
||||
code[0] |= 0x01000000;
|
||||
assert(progType == Program::TYPE_GEOMETRY ||
|
||||
progType == Program::TYPE_COMPUTE);
|
||||
code[0] |= 0x01000000;
|
||||
if (progType == Program::TYPE_GEOMETRY && i->src(0).isIndirect(0)) {
|
||||
int reg = i->src(0).getIndirect(0)->rep()->reg.data.id;
|
||||
assert(reg < 3);
|
||||
code[0] |= (reg + 1) << 26;
|
||||
}
|
||||
break;
|
||||
case 0x08: // rcr
|
||||
code[0] |= (enc == NV50_OP_ENC_LONG_ALT) ? 0x01000000 : 0x00800000;
|
||||
|
||||
@@ -313,6 +313,7 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
|
||||
case 0x0d:
|
||||
if (ld->bb->getProgram()->getType() != Program::TYPE_GEOMETRY)
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user