mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Fix audit crash in games where hash strategy is heavily used
This commit is contained in:
parent
bbb4c109d7
commit
1550dc7f1f
@ -61,6 +61,7 @@ namespace rsx
|
|||||||
std::vector<section_storage_type*> sections_to_exclude; // These sections are do be excluded from protection manipulation (subtracted from other sections)
|
std::vector<section_storage_type*> sections_to_exclude; // These sections are do be excluded from protection manipulation (subtracted from other sections)
|
||||||
u32 num_flushable = 0;
|
u32 num_flushable = 0;
|
||||||
u32 num_excluded = 0; // Sections-to-exclude + sections that would have been excluded but are false positives
|
u32 num_excluded = 0; // Sections-to-exclude + sections that would have been excluded but are false positives
|
||||||
|
u32 num_discarded = 0;
|
||||||
u64 cache_tag = 0;
|
u64 cache_tag = 0;
|
||||||
|
|
||||||
address_range fault_range;
|
address_range fault_range;
|
||||||
@ -951,6 +952,7 @@ namespace rsx
|
|||||||
// Discard - this section won't be needed any more
|
// Discard - this section won't be needed any more
|
||||||
tex.discard(/* set_dirty */ true);
|
tex.discard(/* set_dirty */ true);
|
||||||
result.invalidate_samplers = true;
|
result.invalidate_samplers = true;
|
||||||
|
result.num_discarded++;
|
||||||
}
|
}
|
||||||
else if (g_cfg.video.strict_texture_flushing && tex.is_flushable())
|
else if (g_cfg.video.strict_texture_flushing && tex.is_flushable())
|
||||||
{
|
{
|
||||||
@ -987,6 +989,7 @@ namespace rsx
|
|||||||
#endif
|
#endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
AUDIT(fault_range.inside(invalidate_range));
|
AUDIT(fault_range.inside(invalidate_range));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1068,6 +1071,7 @@ namespace rsx
|
|||||||
// No need to waste resources on hashed section, just discard immediately
|
// No need to waste resources on hashed section, just discard immediately
|
||||||
tex.discard(true);
|
tex.discard(true);
|
||||||
result.invalidate_samplers = true;
|
result.invalidate_samplers = true;
|
||||||
|
result.num_discarded++;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
@ -1076,7 +1080,6 @@ namespace rsx
|
|||||||
fmt::throw_exception("Unreachable");
|
fmt::throw_exception("Unreachable");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
result.violation_handled = true;
|
result.violation_handled = true;
|
||||||
#ifdef TEXTURE_CACHE_DEBUG
|
#ifdef TEXTURE_CACHE_DEBUG
|
||||||
// Check that result makes sense
|
// Check that result makes sense
|
||||||
@ -1112,7 +1115,8 @@ namespace rsx
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// This is a read and all overlapping sections were RO and were excluded (except for cause == superseded_by_fbo)
|
// This is a read and all overlapping sections were RO and were excluded (except for cause == superseded_by_fbo)
|
||||||
AUDIT(cause.skip_fbos() || (cause.is_read() && result.num_excluded > 0));
|
// Can also happen when we have hash strat in use, since we "unlock" sections by just discarding
|
||||||
|
AUDIT(cause.skip_fbos() || (cause.is_read() && result.num_excluded > 0) || result.num_discarded > 0);
|
||||||
|
|
||||||
// We did not handle this violation
|
// We did not handle this violation
|
||||||
result.clear_sections();
|
result.clear_sections();
|
||||||
|
Loading…
Reference in New Issue
Block a user