mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-09-18 07:22:25 +00:00
rsx: Force invalidate of children by issuing a resolve notification whenever the parent is written to
- Fixes successive reads of an antialiased surface that is still bound between reads
This commit is contained in:
parent
296e0105c4
commit
9d166c5bed
2 changed files with 26 additions and 1 deletions
|
@ -58,6 +58,8 @@ namespace rsx
|
||||||
rsx::address_range m_render_targets_memory_range;
|
rsx::address_range m_render_targets_memory_range;
|
||||||
rsx::address_range m_depth_stencil_memory_range;
|
rsx::address_range m_depth_stencil_memory_range;
|
||||||
|
|
||||||
|
bool m_invalidate_on_write = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::pair<u8, u8> m_bound_render_targets_config = {};
|
std::pair<u8, u8> m_bound_render_targets_config = {};
|
||||||
std::array<std::pair<u32, surface_type>, 4> m_bound_render_targets = {};
|
std::array<std::pair<u32, surface_type>, 4> m_bound_render_targets = {};
|
||||||
|
@ -531,6 +533,7 @@ namespace rsx
|
||||||
u32 clip_height = clip_vertical_reg;
|
u32 clip_height = clip_vertical_reg;
|
||||||
|
|
||||||
cache_tag = rsx::get_shared_tag();
|
cache_tag = rsx::get_shared_tag();
|
||||||
|
m_invalidate_on_write = (antialias != rsx::surface_antialiasing::center_1_sample);
|
||||||
|
|
||||||
// Make previous RTTs sampleable
|
// Make previous RTTs sampleable
|
||||||
for (int i = m_bound_render_targets_config.first, count = 0;
|
for (int i = m_bound_render_targets_config.first, count = 0;
|
||||||
|
@ -800,7 +803,21 @@ namespace rsx
|
||||||
{
|
{
|
||||||
if (write_tag == cache_tag)
|
if (write_tag == cache_tag)
|
||||||
{
|
{
|
||||||
// Nothing to do
|
if (m_invalidate_on_write)
|
||||||
|
{
|
||||||
|
for (int i = m_bound_render_targets_config.first, count = 0;
|
||||||
|
count < m_bound_render_targets_config.second;
|
||||||
|
++i, ++count)
|
||||||
|
{
|
||||||
|
m_bound_render_targets[i].second->on_invalidate_children();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_bound_depth_stencil.first)
|
||||||
|
{
|
||||||
|
m_bound_depth_stencil.second->on_invalidate_children();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -474,6 +474,14 @@ namespace rsx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void on_invalidate_children()
|
||||||
|
{
|
||||||
|
if (resolve_surface)
|
||||||
|
{
|
||||||
|
msaa_flags = rsx::surface_state_flags::require_resolve;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Returns the rect area occupied by this surface expressed as an 8bpp image with no AA
|
// Returns the rect area occupied by this surface expressed as an 8bpp image with no AA
|
||||||
areau get_normalized_memory_area() const
|
areau get_normalized_memory_area() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue