rsx: Properly reset occlusion counters even when the register is not in use.

This commit is contained in:
kd-11 2022-09-12 14:19:22 +03:00 committed by kd-11
parent f076fcd539
commit 572a2a06d1
1 changed files with 11 additions and 10 deletions

View File

@ -287,18 +287,19 @@ namespace rsx
if (m_statistics_map[m_statistics_tag_id].flags)
{
// Move to the next slot if this one is still in use.
m_statistics_tag_id = (m_statistics_tag_id + 1) % max_stat_registers;
auto data = m_statistics_map.data() + m_statistics_tag_id;
if (data->flags != 0)
{
// This shouldn't happen
rsx_log.error("Allocating a new ZCULL statistics slot %u overwrites previous data.", m_statistics_tag_id);
}
// Clear value before use
data->result = 0;
}
auto& current_stats = m_statistics_map[m_statistics_tag_id];
if (current_stats.flags != 0)
{
// This shouldn't happen
rsx_log.error("Allocating a new ZCULL statistics slot %u overwrites previous data.", m_statistics_tag_id);
}
// Clear value before use
current_stats.result = 0;
}
void ZCULL_control::on_draw()