nvc0/ir: patch vertex count is stored in the upper bits

This commit is contained in:
Ilia Mirkin 2015-02-21 03:12:54 -05:00
parent e3e2df01bf
commit 7cf2bffe82
1 changed files with 4 additions and 0 deletions

View File

@ -1525,6 +1525,10 @@ NVC0LoweringPass::handleRDSV(Instruction *i)
i->op = OP_MOV;
i->setSrc(0, bld.mkImm((sv == SV_NTID || sv == SV_NCTAID) ? 1 : 0));
}
if (sv == SV_VERTEX_COUNT) {
bld.setPosition(i, true);
bld.mkOp2(OP_EXTBF, TYPE_U32, i->getDef(0), i->getDef(0), bld.mkImm(0x808));
}
return true;
}