From 3e51fc5a891431e8fb574d17a334cc5348cd7e0b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 17 Aug 2019 10:58:19 -0700 Subject: [PATCH] GPU: Avoid some unused var/func warnings. --- GPU/Common/TextureScalerCommon.cpp | 7 +++++++ ext/native/thin3d/GLQueueRunner.cpp | 4 +--- ext/native/thin3d/GLRenderManager.cpp | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/GPU/Common/TextureScalerCommon.cpp b/GPU/Common/TextureScalerCommon.cpp index 4299d8a7ff..ca40ba50c9 100644 --- a/GPU/Common/TextureScalerCommon.cpp +++ b/GPU/Common/TextureScalerCommon.cpp @@ -44,6 +44,8 @@ // Report the time and throughput for each larger scaling operation in the log //#define SCALING_MEASURE_TIME +//#define DEBUG_SCALER_OUTPUT + #ifdef SCALING_MEASURE_TIME #include "base/timeutil.h" #endif @@ -453,6 +455,8 @@ void bilinearV(int factor, u32* data, u32* out, int w, int gl, int gu, int l, in #undef B #undef A +#ifdef DEBUG_SCALER_OUTPUT + // used for debugging texture scaling (writing textures to files) static int g_imgCount = 0; void dbgPPM(int w, int h, u8* pixels, const char* prefix = "dbg") { // 3 component RGB @@ -483,6 +487,9 @@ void dbgPGM(int w, int h, u32* pixels, const char* prefix = "dbg") { // 1 compon } fclose(fp); } + +#endif + } /////////////////////////////////////// Texture Scaler diff --git a/ext/native/thin3d/GLQueueRunner.cpp b/ext/native/thin3d/GLQueueRunner.cpp index 5fd98a49f6..90540eb90a 100644 --- a/ext/native/thin3d/GLQueueRunner.cpp +++ b/ext/native/thin3d/GLQueueRunner.cpp @@ -107,7 +107,6 @@ void GLQueueRunner::RunInitSteps(const std::vector &steps, bool ski } case GLRInitStepType::TEXTURE_IMAGE: { - GLRTexture *tex = step.texture_image.texture; if (step.texture_image.allocType == GLRAllocType::ALIGNED) { FreeAlignedMemory(step.texture_image.data); } else if (step.texture_image.allocType == GLRAllocType::NEW) { @@ -1317,9 +1316,8 @@ void GLQueueRunner::PerformReadback(const GLRStep &pass) { } void GLQueueRunner::PerformReadbackImage(const GLRStep &pass) { - GLRTexture *tex = pass.readback_image.texture; - #ifndef USING_GLES2 + GLRTexture *tex = pass.readback_image.texture; GLRect2D rect = pass.readback_image.srcRect; if (gl_extensions.VersionGEThan(4, 5)) { diff --git a/ext/native/thin3d/GLRenderManager.cpp b/ext/native/thin3d/GLRenderManager.cpp index 8affe78c8f..f3fe9ce65a 100644 --- a/ext/native/thin3d/GLRenderManager.cpp +++ b/ext/native/thin3d/GLRenderManager.cpp @@ -762,7 +762,7 @@ void GLPushBuffer::Defragment() { size_ = newSize; bool res = AddBuffer(); - _dbg_assert_msg_(G3D, res, "AddBuffer failed"); + _assert_msg_(G3D, res, "AddBuffer failed"); } size_t GLPushBuffer::GetTotalSize() const {