mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
swr/rast: Added ICLAMP builder function
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
f192502001
commit
c719f62621
2 changed files with 3 additions and 3 deletions
|
|
@ -1545,13 +1545,13 @@ namespace SwrJit
|
|||
return result;
|
||||
}
|
||||
|
||||
Value *Builder::ICLAMP(Value* src, Value* low, Value* high)
|
||||
Value *Builder::ICLAMP(Value* src, Value* low, Value* high, const llvm::Twine& name)
|
||||
{
|
||||
Value *lowCmp = ICMP_SLT(src, low);
|
||||
Value *ret = SELECT(lowCmp, low, src);
|
||||
|
||||
Value *highCmp = ICMP_SGT(ret, high);
|
||||
ret = SELECT(highCmp, high, ret);
|
||||
ret = SELECT(highCmp, high, ret, name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ Value *VPCMPGTD(Value* a, Value* b)
|
|||
return S_EXT(vIndexMask,VectorType::get(mInt32Ty,JM()->mVWidth));
|
||||
}
|
||||
|
||||
Value *ICLAMP(Value* src, Value* low, Value* high);
|
||||
Value *ICLAMP(Value* src, Value* low, Value* high, const llvm::Twine& name = "");
|
||||
Value *FCLAMP(Value* src, Value* low, Value* high);
|
||||
Value *FCLAMP(Value* src, float low, float high);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue