diff --git a/Common/Vulkan/VulkanContext.cpp b/Common/Vulkan/VulkanContext.cpp index 10c4c4de32..297bc72d2f 100644 --- a/Common/Vulkan/VulkanContext.cpp +++ b/Common/Vulkan/VulkanContext.cpp @@ -1014,6 +1014,8 @@ bool VulkanContext::InitSwapchain() { g_display_rot_matrix.setRotationZ270(); std::swap(swapChainExtent_.width, swapChainExtent_.height); break; + default: + assert(false); } } else { // Let the OS rotate the image (potentially slow on many Android devices) diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index 0e091ff792..5820509c78 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -111,7 +111,7 @@ ArmJit::ArmJit(MIPSState *mips) : blocks(mips, this), gpr(mips, &js, &jo), fpr(m AllocCodeSpace(1024 * 1024 * 16); // 32MB is the absolute max because that's what an ARM branch instruction can reach, backwards and forwards. GenerateFixedCode(); - INFO_LOG(JIT, "ARM JIT initialized: %d MB of code space", GetSpaceLeft() / (1024 * 1024)); + INFO_LOG(JIT, "ARM JIT initialized: %lld MB of code space", (long long)(GetSpaceLeft() / (1024 * 1024))); js.startDefaultPrefix = mips_->HasDefaultPrefix(); 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/gfx_es2/gl3stub.c b/ext/native/gfx_es2/gl3stub.c index 2a846a32d9..265004a9c3 100644 --- a/ext/native/gfx_es2/gl3stub.c +++ b/ext/native/gfx_es2/gl3stub.c @@ -14,15 +14,14 @@ * limitations under the License. */ +#include "ppsspp_config.h" #include "../gfx/gl_common.h" #if defined(USING_GLES2) -#if !defined(IOS) +#if !PPSSPP_PLATFORM(IOS) #include "EGL/egl.h" -#endif GLboolean gl3stubInit() { -#if !defined(IOS) #define FIND_PROC(s) s = (void*)eglGetProcAddress(#s) FIND_PROC(glReadBuffer); FIND_PROC(glDrawRangeElements); @@ -145,7 +144,6 @@ GLboolean gl3stubInit() { #undef FIND_PROC -#endif // IOS if (!glReadBuffer || !glDrawRangeElements || !glTexImage3D || @@ -257,8 +255,6 @@ GLboolean gl3stubInit() { return GL_TRUE; } -#if !defined(IOS) - /* Function pointer definitions */ GL_APICALL void (* GL_APIENTRY glReadBuffer) (GLenum mode); GL_APICALL void (* GL_APIENTRY glDrawRangeElements) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices); @@ -379,6 +375,12 @@ GL_APICALL void (* GL_APIENTRY glBufferStorageEXT) (GLenum target, GLs /* OES_copy_image, etc. */ GL_APICALL void (* GL_APIENTRY glCopyImageSubDataOES) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#else + +GLboolean gl3stubInit() { + return GL_TRUE; +} + #endif // IOS #endif // GLES2 diff --git a/ext/native/gfx_es2/gl3stub.h b/ext/native/gfx_es2/gl3stub.h index 843b1fb667..26b571b982 100644 --- a/ext/native/gfx_es2/gl3stub.h +++ b/ext/native/gfx_es2/gl3stub.h @@ -11,6 +11,8 @@ * - Added gl3stubInit() declaration */ +#include "ppsspp_config.h" + #if defined(USING_GLES2) #ifdef __cplusplus @@ -45,7 +47,7 @@ extern "C" { * otherwise. */ GLboolean gl3stubInit(); -#if !defined(IOS) +#if !PPSSPP_PLATFORM(IOS) /*------------------------------------------------------------------------- * Data type definitions 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 {