gv100/ir: fix quadop/pop lowering
Fixes: texture_cube_map_array.sampling Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11061>
This commit is contained in:
parent
f4847077c7
commit
4d5c57edca
|
@ -66,6 +66,7 @@ public:
|
|||
Instruction *mkMov(Value *, Value *, DataType = TYPE_U32);
|
||||
Instruction *mkMovToReg(int id, Value *);
|
||||
Instruction *mkMovFromReg(Value *, int id);
|
||||
inline Instruction *mkBMov(Value *, Value *);
|
||||
|
||||
Instruction *mkInterp(unsigned mode, Value *, int32_t offset, Value *rel);
|
||||
Instruction *mkFetch(Value *, DataType, DataFile, int32_t offset,
|
||||
|
@ -305,6 +306,12 @@ BuildUtil::mkLoadv(DataType ty, Symbol *mem, Value *ptr)
|
|||
return dst;
|
||||
}
|
||||
|
||||
inline Instruction *
|
||||
BuildUtil::mkBMov(Value *dst, Value *src)
|
||||
{
|
||||
return mkCvt(OP_CVT, TYPE_U32, dst, TYPE_U32, src);
|
||||
}
|
||||
|
||||
bool
|
||||
BuildUtil::DataArray::exists(ValueMap &m, unsigned int i, unsigned int c)
|
||||
{
|
||||
|
|
|
@ -158,13 +158,17 @@ GV100LegalizeSSA::handlePREEX2(Instruction *i)
|
|||
bool
|
||||
GV100LegalizeSSA::handleQUADON(Instruction *i)
|
||||
{
|
||||
handleSHFL(i); // Inserts OP_WARPSYNC
|
||||
bld.mkBMov(i->getDef(0), bld.mkTSVal(TS_MACTIVE));
|
||||
Instruction *b = bld.mkBMov(bld.mkTSVal(TS_PQUAD_MACTIVE), i->getDef(0));
|
||||
b->fixed = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
GV100LegalizeSSA::handleQUADPOP(Instruction *i)
|
||||
{
|
||||
Instruction *b = bld.mkBMov(bld.mkTSVal(TS_MACTIVE), i->getSrc(0));
|
||||
b->fixed = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue