mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 03:08:36 +12:00
rsx: Workaround for lost memory sections
- TODO: surface_cache and texture_cache need a better method of persisting partial framebuffer resources
This commit is contained in:
parent
58035697d5
commit
f3210a9a33
1 changed files with 12 additions and 3 deletions
|
@ -975,13 +975,22 @@ namespace rsx
|
||||||
if (surface == ®ion)
|
if (surface == ®ion)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (surface->get_context() != rsx::texture_upload_context::framebuffer_storage)
|
||||||
|
{
|
||||||
|
m_unreleased_texture_objects++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (surface->get_section_base() != memory_address)
|
||||||
|
//HACK: preserve other overlapped sections despite overlap unless new section is superseding
|
||||||
|
//TODO: write memory to cell or redesign sections to preserve the data
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//Memory is shared with another surface
|
//Memory is shared with another surface
|
||||||
//Discard it - the backend should ensure memory contents are preserved if needed
|
//Discard it - the backend should ensure memory contents are preserved if needed
|
||||||
surface->set_dirty(true);
|
surface->set_dirty(true);
|
||||||
|
|
||||||
if (surface->get_context() != rsx::texture_upload_context::framebuffer_storage)
|
|
||||||
m_unreleased_texture_objects++;
|
|
||||||
|
|
||||||
if (surface->is_locked())
|
if (surface->is_locked())
|
||||||
{
|
{
|
||||||
surface->unprotect();
|
surface->unprotect();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue