mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-12 00:40:14 +00:00
rsx:: Use fcmp correctly
This commit is contained in:
parent
d04241ad25
commit
ad2add9574
@ -1558,8 +1558,9 @@ private:
|
||||
if (info.magFilter != mag_filter || info.minFilter != min_filter || info.mipmapMode != mipmap_mode ||
|
||||
info.addressModeU != clamp_u || info.addressModeV != clamp_v || info.addressModeW != clamp_w ||
|
||||
info.compareEnable != depth_compare || info.unnormalizedCoordinates != unnormalized_coordinates ||
|
||||
info.mipLodBias != mipLodBias || info.maxAnisotropy != max_anisotropy || info.maxLod != max_lod ||
|
||||
info.minLod != min_lod || info.compareOp != depth_compare_mode || info.borderColor != border_color)
|
||||
!rsx::fcmp(info.maxLod, max_lod) || !rsx::fcmp(info.mipLodBias, mipLodBias) || !rsx::fcmp(info.minLod, min_lod) ||
|
||||
!rsx::fcmp(info.maxAnisotropy, max_anisotropy) ||
|
||||
info.compareOp != depth_compare_mode || info.borderColor != border_color)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -45,11 +45,6 @@ namespace vk
|
||||
std::unordered_multimap<u64, std::unique_ptr<vk::sampler>> m_sampler_pool;
|
||||
std::deque<eid_scope_t> m_eid_map;
|
||||
|
||||
bool value_compare(const f32& a, const f32& b)
|
||||
{
|
||||
return fabsf(a - b) < 0.0000001f;
|
||||
}
|
||||
|
||||
eid_scope_t& get_current_eid_scope()
|
||||
{
|
||||
const auto eid = current_event_id();
|
||||
@ -94,10 +89,10 @@ namespace vk
|
||||
for (auto It = found.first; It != found.second; ++It)
|
||||
{
|
||||
const auto& info = It->second->info;
|
||||
if (!value_compare(info.mipLodBias, mipLodBias) ||
|
||||
!value_compare(info.maxAnisotropy, max_anisotropy) ||
|
||||
!value_compare(info.minLod, min_lod) ||
|
||||
!value_compare(info.maxLod, max_lod))
|
||||
if (!rsx::fcmp(info.maxLod, max_lod) ||
|
||||
!rsx::fcmp(info.mipLodBias, mipLodBias) ||
|
||||
!rsx::fcmp(info.minLod, min_lod) ||
|
||||
!rsx::fcmp(info.maxAnisotropy, max_anisotropy))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user