mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
swr/rast: jit PRINT improvements.
Sign-extend integer types to 32bit when specifying "%d" and add new %u which zero-extends to 32bit. Improves printing of sub 32bit integer types (i1 specifically). Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
5d403178e6
commit
edc41f73b8
1 changed files with 13 additions and 2 deletions
|
|
@ -416,9 +416,20 @@ namespace SwrJit
|
|||
{
|
||||
tempStr.insert(pos, std::string("%d "));
|
||||
pos += 3;
|
||||
printCallArgs.push_back(VEXTRACT(pArg, C(i)));
|
||||
printCallArgs.push_back(S_EXT(VEXTRACT(pArg, C(i)), Type::getInt32Ty(JM()->mContext)));
|
||||
}
|
||||
printCallArgs.push_back(VEXTRACT(pArg, C(i)));
|
||||
printCallArgs.push_back(S_EXT(VEXTRACT(pArg, C(i)), Type::getInt32Ty(JM()->mContext)));
|
||||
}
|
||||
else if ((tempStr[pos + 1] == 'u') && (pContainedType->isIntegerTy()))
|
||||
{
|
||||
uint32_t i = 0;
|
||||
for (; i < (pArg->getType()->getVectorNumElements()) - 1; i++)
|
||||
{
|
||||
tempStr.insert(pos, std::string("%d "));
|
||||
pos += 3;
|
||||
printCallArgs.push_back(Z_EXT(VEXTRACT(pArg, C(i)), Type::getInt32Ty(JM()->mContext)));
|
||||
}
|
||||
printCallArgs.push_back(Z_EXT(VEXTRACT(pArg, C(i)), Type::getInt32Ty(JM()->mContext)));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue