mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
rsx: Handle some more corner cases
This commit is contained in:
parent
765208a181
commit
533f960854
@ -3237,7 +3237,7 @@ namespace rsx
|
||||
return m_predictor;
|
||||
}
|
||||
|
||||
bool is_protected(u32 section_base_address)
|
||||
bool is_protected(u32 section_base_address, const address_range& test_range, rsx::texture_upload_context context)
|
||||
{
|
||||
reader_lock lock(m_cache_mutex);
|
||||
|
||||
@ -3246,7 +3246,9 @@ namespace rsx
|
||||
{
|
||||
if (tex.get_section_base() == section_base_address)
|
||||
{
|
||||
return tex.is_locked();
|
||||
return tex.get_context() == context &&
|
||||
tex.is_locked() &&
|
||||
test_range.inside(tex.get_section_range());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,11 @@ void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool /*
|
||||
bool lock = surface->is_depth_surface() ? !!g_cfg.video.write_depth_buffer :
|
||||
!!g_cfg.video.write_color_buffers;
|
||||
|
||||
if (lock && !m_gl_texture_cache.is_protected(base_addr))
|
||||
if (lock &&
|
||||
!m_gl_texture_cache.is_protected(
|
||||
base_addr,
|
||||
surface->get_memory_range(),
|
||||
rsx::texture_upload_context::framebuffer_storage))
|
||||
{
|
||||
lock = false;
|
||||
}
|
||||
|
@ -2426,7 +2426,11 @@ void VKGSRender::prepare_rtts(rsx::framebuffer_creation_context context)
|
||||
bool lock = surface->is_depth_surface() ? !!g_cfg.video.write_depth_buffer :
|
||||
!!g_cfg.video.write_color_buffers;
|
||||
|
||||
if (lock && !m_texture_cache.is_protected(base_addr))
|
||||
if (lock &&
|
||||
!m_texture_cache.is_protected(
|
||||
base_addr,
|
||||
surface->get_memory_range(),
|
||||
rsx::texture_upload_context::framebuffer_storage))
|
||||
{
|
||||
lock = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user