mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 23:41:26 +12:00
rsx:: Use fcmp correctly
This commit is contained in:
parent
d04241ad25
commit
ad2add9574
2 changed files with 7 additions and 11 deletions
|
@ -1558,8 +1558,9 @@ private:
|
||||||
if (info.magFilter != mag_filter || info.minFilter != min_filter || info.mipmapMode != mipmap_mode ||
|
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.addressModeU != clamp_u || info.addressModeV != clamp_v || info.addressModeW != clamp_w ||
|
||||||
info.compareEnable != depth_compare || info.unnormalizedCoordinates != unnormalized_coordinates ||
|
info.compareEnable != depth_compare || info.unnormalizedCoordinates != unnormalized_coordinates ||
|
||||||
info.mipLodBias != mipLodBias || info.maxAnisotropy != max_anisotropy || info.maxLod != max_lod ||
|
!rsx::fcmp(info.maxLod, max_lod) || !rsx::fcmp(info.mipLodBias, mipLodBias) || !rsx::fcmp(info.minLod, min_lod) ||
|
||||||
info.minLod != min_lod || info.compareOp != depth_compare_mode || info.borderColor != border_color)
|
!rsx::fcmp(info.maxAnisotropy, max_anisotropy) ||
|
||||||
|
info.compareOp != depth_compare_mode || info.borderColor != border_color)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -45,11 +45,6 @@ namespace vk
|
||||||
std::unordered_multimap<u64, std::unique_ptr<vk::sampler>> m_sampler_pool;
|
std::unordered_multimap<u64, std::unique_ptr<vk::sampler>> m_sampler_pool;
|
||||||
std::deque<eid_scope_t> m_eid_map;
|
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()
|
eid_scope_t& get_current_eid_scope()
|
||||||
{
|
{
|
||||||
const auto eid = current_event_id();
|
const auto eid = current_event_id();
|
||||||
|
@ -94,10 +89,10 @@ namespace vk
|
||||||
for (auto It = found.first; It != found.second; ++It)
|
for (auto It = found.first; It != found.second; ++It)
|
||||||
{
|
{
|
||||||
const auto& info = It->second->info;
|
const auto& info = It->second->info;
|
||||||
if (!value_compare(info.mipLodBias, mipLodBias) ||
|
if (!rsx::fcmp(info.maxLod, max_lod) ||
|
||||||
!value_compare(info.maxAnisotropy, max_anisotropy) ||
|
!rsx::fcmp(info.mipLodBias, mipLodBias) ||
|
||||||
!value_compare(info.minLod, min_lod) ||
|
!rsx::fcmp(info.minLod, min_lod) ||
|
||||||
!value_compare(info.maxLod, max_lod))
|
!rsx::fcmp(info.maxAnisotropy, max_anisotropy))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue