1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[d3d9] Use unordered comparison opposed to isnan

Results in better codegen
This commit is contained in:
Joshua Ashton 2020-05-07 13:05:36 +01:00
parent 198ce13934
commit fd75775197

View File

@ -47,8 +47,8 @@ namespace dxvk {
key.MipmapLodBias = 0; key.MipmapLodBias = 0;
} }
else { else {
// Games also pass NAN/INF here, this accounts for that. // Games also pass NAN here, this accounts for that.
if (unlikely(std::isnan(key.MipmapLodBias))) if (unlikely(key.MipmapLodBias != key.MipmapLodBias))
key.MipmapLodBias = 0.0f; key.MipmapLodBias = 0.0f;
// Clamp between -15.0f and 15.0f, matching mip limits of d3d9. // Clamp between -15.0f and 15.0f, matching mip limits of d3d9.