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:
@@ -1,4 +1,4 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GLGSRender.h"
|
#include "GLGSRender.h"
|
||||||
|
|
||||||
LOG_CHANNEL(screenshot);
|
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
|
// 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
|
// The render might have been done offscreen or in software and a blit used to display
|
||||||
|
|||||||
@@ -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
|
// 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
|
// The render might have been done offscreen or in software and a blit used to display
|
||||||
|
|||||||
Reference in New Issue
Block a user