From 04f319066dd13917dc652855eec3614bc79c56f7 Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 26 Dec 2016 20:54:37 +0100 Subject: TextureCache: Extract BP enum check to VideoCommon. We have TOO many video backends. --- Source/Core/VideoBackends/OGL/TextureCache.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/TextureCache.cpp') diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index 20c3f488cc..5d3a443509 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -204,14 +204,14 @@ void TextureCache::TCacheEntry::Load(const u8* buffer, u32 width, u32 height, u3 TextureCache::SetStage(); } -void TextureCache::TCacheEntry::FromRenderTarget(u8* dstPointer, PEControl::PixelFormat srcFormat, +void TextureCache::TCacheEntry::FromRenderTarget(u8* dstPointer, bool is_depth_copy, const EFBRectangle& srcRect, bool scaleByHalf, unsigned int cbufid, const float* colmat) { g_renderer->ResetAPIState(); // reset any game specific settings // Make sure to resolve anything we need to read from. - const GLuint read_texture = (srcFormat == PEControl::Z24) ? + const GLuint read_texture = is_depth_copy ? FramebufferManager::ResolveAndGetDepthTarget(srcRect) : FramebufferManager::ResolveAndGetRenderTarget(srcRect); @@ -229,7 +229,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u8* dstPointer, PEControl::Pixe glViewport(0, 0, config.width, config.height); GLuint uniform_location; - if (srcFormat == PEControl::Z24) + if (is_depth_copy) { s_DepthMatrixProgram.Bind(); if (s_DepthCbufid != cbufid) @@ -257,11 +257,11 @@ void TextureCache::TCacheEntry::FromRenderTarget(u8* dstPointer, PEControl::Pixe } void TextureCache::CopyEFB(u8* dst, u32 format, u32 native_width, u32 bytes_per_row, - u32 num_blocks_y, u32 memory_stride, PEControl::PixelFormat srcFormat, + u32 num_blocks_y, u32 memory_stride, bool is_depth_copy, const EFBRectangle& srcRect, bool isIntensity, bool scaleByHalf) { TextureConverter::EncodeToRamFromTexture(dst, format, native_width, bytes_per_row, num_blocks_y, - memory_stride, srcFormat, isIntensity, scaleByHalf, + memory_stride, is_depth_copy, isIntensity, scaleByHalf, srcRect); } -- cgit v1.2.3 From abf9bb170bf954220a50921a10f57eaa30e17779 Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 26 Dec 2016 21:33:57 +0100 Subject: TextureCache: Drop unused parameter in backend API. --- Source/Core/VideoBackends/OGL/TextureCache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/TextureCache.cpp') diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index 5d3a443509..8408a1f1b3 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -204,9 +204,9 @@ void TextureCache::TCacheEntry::Load(const u8* buffer, u32 width, u32 height, u3 TextureCache::SetStage(); } -void TextureCache::TCacheEntry::FromRenderTarget(u8* dstPointer, bool is_depth_copy, - const EFBRectangle& srcRect, bool scaleByHalf, - unsigned int cbufid, const float* colmat) +void TextureCache::TCacheEntry::FromRenderTarget(bool is_depth_copy, const EFBRectangle& srcRect, + bool scaleByHalf, unsigned int cbufid, + const float* colmat) { g_renderer->ResetAPIState(); // reset any game specific settings -- cgit v1.2.3