vk/gl: Use best-fit semantics when scanning texture cache for flippable images

- Allows sourcing flip data from the blit engine resources which avoids expensive flush and re-upload
This commit is contained in:
kd-11 2020-03-04 22:25:31 +03:00 committed by kd-11
parent 93295f7f50
commit 70f2577b9e
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "GLGSRender.h"
LOG_CHANNEL(screenshot);
@ -52,7 +52,8 @@ gl::texture* GLGSRender::get_present_source(gl::present_surface_info* info, cons
}
}
}
else if (auto surface = m_gl_texture_cache.find_texture_from_dimensions<true>(info->address, info->format, info->width, info->height))
else if (auto surface = m_gl_texture_cache.find_texture_from_dimensions<true>(info->address, info->format);
surface && surface->get_width() >= info->width && surface->get_height() >= info->height)
{
// Hack - this should be the first location to check for output
// The render might have been done offscreen or in software and a blit used to display

View File

@ -309,7 +309,8 @@ vk::image* VKGSRender::get_present_source(vk::present_surface_info* info, const
}
}
}
else if (auto surface = m_texture_cache.find_texture_from_dimensions<true>(info->address, info->format, info->width, info->height))
else if (auto surface = m_texture_cache.find_texture_from_dimensions<true>(info->address, info->format);
surface && surface->get_width() >= info->width && surface->get_height() >= info->height)
{
// Hack - this should be the first location to check for output
// The render might have been done offscreen or in software and a blit used to display