mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
st/nine: Use FLT_MAX/2 for RCP clamping
This seems to fix Rayman (which adds things to the RCP result, and thus gets an Inf), while not having regressions. Signed-off-by: Axel Davy <davyaxel0@gmail.com>
This commit is contained in:
parent
64a45ba7f8
commit
394420ebb3
1 changed files with 3 additions and 2 deletions
|
|
@ -2333,8 +2333,9 @@ DECL_SPECIAL(RCP)
|
|||
struct ureg_dst tmp = tx->mul_zero_wins ? dst : tx_scratch(tx);
|
||||
ureg_RCP(ureg, tmp, src);
|
||||
if (!tx->mul_zero_wins) {
|
||||
ureg_MIN(ureg, tmp, ureg_imm1f(ureg, FLT_MAX), ureg_src(tmp));
|
||||
ureg_MAX(ureg, dst, ureg_imm1f(ureg, -FLT_MAX), ureg_src(tmp));
|
||||
/* FLT_MAX has issues with Rayman */
|
||||
ureg_MIN(ureg, tmp, ureg_imm1f(ureg, FLT_MAX/2.f), ureg_src(tmp));
|
||||
ureg_MAX(ureg, dst, ureg_imm1f(ureg, -FLT_MAX/2.f), ureg_src(tmp));
|
||||
}
|
||||
return D3D_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue