rsx: Avoid expensive protection scan by sharing some data between surface and texture cache

This commit is contained in:
kd-11 2022-12-15 15:39:55 +03:00 committed by kd-11
parent 8ec01450f8
commit a05e3f02b8
9 changed files with 80 additions and 45 deletions

View file

@ -322,10 +322,15 @@ void GLGSRender::init_buffers(rsx::framebuffer_creation_context context, bool /*
!!g_cfg.video.write_color_buffers;
if (lock &&
#ifdef TEXTURE_CACHE_DEBUG
!m_gl_texture_cache.is_protected(
base_addr,
surface->get_memory_range(),
rsx::texture_upload_context::framebuffer_storage))
rsx::texture_upload_context::framebuffer_storage)
#else
!surface->is_locked()
#endif
)
{
lock = false;
}