renderer_opengl: Emulate texture copy with blit for now

This commit is contained in:
GPUCode
2022-10-04 19:50:26 +03:00
parent 33481ada7f
commit f0449d79fd
3 changed files with 18 additions and 8 deletions

View File

@@ -278,9 +278,9 @@ bool RasterizerCache<T>::BlitSurfaces(const Surface& src_surface, Common::Rectan
dst_surface->InvalidateAllWatcher();
// Prefer texture copy over blit if possible. This is possible when the following is true:
// 1. No scaling (the dimentions of src and dest rect are the same
// 2. No flipping (if the bottom value is bigger than the top this indicates texture flip
// Prefer texture copy over blit when possible. This can happen when the following is true:
// 1. No scaling (the dimentions of src and dest rect are the same)
// 2. No flipping (if the bottom value is bigger than the top this indicates texture flip)
if (src_rect.GetWidth() == dst_rect.GetWidth() &&
src_rect.GetHeight() == dst_rect.GetHeight() &&
src_rect.bottom < src_rect.top) {

View File

@@ -79,10 +79,8 @@ Driver::Driver(bool gles, bool enable_debug) : is_gles{gles} {
* Qualcomm has some spammy info messages that are marked as errors but not important
* https://developer.qualcomm.com/comment/11845
*/
if (enable_debug) {
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
glDebugMessageCallback(DebugHandler, nullptr);
}
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
glDebugMessageCallback(DebugHandler, nullptr);
#endif
ReportDriverInfo();

View File

@@ -243,7 +243,19 @@ bool TextureRuntime::ClearTexture(Surface& surface, const VideoCore::TextureClea
}
bool TextureRuntime::CopyTextures(Surface& source, Surface& dest, const VideoCore::TextureCopy& copy) {
return true;
// Emulate texture copy with blit for now
const VideoCore::TextureBlit blit = {
.src_level = copy.src_level,
.dst_level = copy.dst_level,
.src_layer = copy.src_layer,
.dst_layer = copy.dst_layer,
.src_rect = {copy.src_offset.x, copy.extent.height,
copy.extent.width, copy.src_offset.x},
.dst_rect = {copy.dst_offset.x, copy.extent.height,
copy.extent.width, copy.dst_offset.x}
};
return BlitTextures(source, dest, blit);
}
bool TextureRuntime::BlitTextures(Surface& source, Surface& dest, const VideoCore::TextureBlit& blit) {