diff --git a/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp b/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp index d52fd08c2e..063fcbbbad 100644 --- a/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp +++ b/Source/Core/VideoUICommon/Src/VideoConfigDiag.cpp @@ -457,4 +457,4 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con SetSizerAndFit(szr_main); Center(); -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 0d58b4fb87..2063837d09 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -1558,4 +1558,4 @@ bool Renderer::SaveScreenshot(const std::string &filename, const TargetRectangle return result; } -} \ No newline at end of file +} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp index 8cb7181ae0..4c790024d1 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp @@ -349,7 +349,7 @@ u64 EncodeToRamFromTexture(u32 address,GLuint source_texture, bool bFromZBuffer, s32 expandedWidth = (width + blkW) & (~blkW); s32 expandedHeight = (height + blkH) & (~blkH); - float sampleStride = bScaleByHalf ? 2.f : 1.f; + float sampleStride = bScaleByHalf ? 2.f : 1.f; // TODO: sampleStride scaling might be slightly off TextureConversionShader::SetShaderParameters((float)expandedWidth, (float)Renderer::EFBToScaledY(expandedHeight), // TODO: Why do we scale this? @@ -364,23 +364,28 @@ u64 EncodeToRamFromTexture(u32 address,GLuint source_texture, bool bFromZBuffer, scaledSource.left = 0; scaledSource.right = expandedWidth / samples; int cacheBytes = 32; - if ((format & 0x0f) == 6) - cacheBytes = 64; + if ((format & 0x0f) == 6) + cacheBytes = 64; + + int readStride = (expandedWidth * cacheBytes) / + TexDecoder_GetBlockWidthInTexels(format); + EncodeToRamUsingShader(texconv_shader, source_texture, scaledSource, + dest_ptr, expandedWidth / samples, expandedHeight, readStride, + true, bScaleByHalf > 0 && !bFromZBuffer); - int readStride = (expandedWidth * cacheBytes) / TexDecoder_GetBlockWidthInTexels(format); - EncodeToRamUsingShader(texconv_shader, source_texture, scaledSource, dest_ptr, expandedWidth / samples, expandedHeight, readStride, true, bScaleByHalf > 0 && !bFromZBuffer); - u64 hash = 0; if (g_ActiveConfig.bEFBCopyCacheEnable) { - u64 hash = GetHash64(dest_ptr,size_in_bytes,g_ActiveConfig.iSafeTextureCache_ColorSamples); + u64 hash = GetHash64(dest_ptr, size_in_bytes, + g_ActiveConfig.iSafeTextureCache_ColorSamples); - // If the texture in RAM is already in the texture cache, do not copy it again as it has not changed. + // If the texture in RAM is already in the texture cache, + // do not copy it again as it has not changed. if (TextureCache::Find(address, hash)) return hash; } TextureCache::MakeRangeDynamic(address,size_in_bytes); - return hash; + return 0; } void EncodeToRamYUYV(GLuint srcTexture, const TargetRectangle& sourceRc, u8* destAddr, int dstWidth, int dstHeight) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 25ee75b1f7..6deb57457f 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -140,10 +140,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle } #endif // _WIN32 -#if defined(HAVE_X11) && HAVE_X11 -static volatile u32 s_doStateRequested = FALSE; -#endif - void GetDllInfo(PLUGIN_INFO* _PluginInfo) { _PluginInfo->Version = 0x0100;