From fd757751974cb70e9e3b4d9cc4b27290fea6078f Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 7 May 2020 13:05:36 +0100 Subject: [PATCH] [d3d9] Use unordered comparison opposed to isnan Results in better codegen --- src/d3d9/d3d9_sampler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d3d9/d3d9_sampler.h b/src/d3d9/d3d9_sampler.h index a77ab901d..26fec0f6f 100644 --- a/src/d3d9/d3d9_sampler.h +++ b/src/d3d9/d3d9_sampler.h @@ -47,8 +47,8 @@ namespace dxvk { key.MipmapLodBias = 0; } else { - // Games also pass NAN/INF here, this accounts for that. - if (unlikely(std::isnan(key.MipmapLodBias))) + // Games also pass NAN here, this accounts for that. + if (unlikely(key.MipmapLodBias != key.MipmapLodBias)) key.MipmapLodBias = 0.0f; // Clamp between -15.0f and 15.0f, matching mip limits of d3d9.