diff --git a/Core/Loaders.cpp b/Core/Loaders.cpp index 1e234580ad..3e938dae21 100644 --- a/Core/Loaders.cpp +++ b/Core/Loaders.cpp @@ -129,7 +129,7 @@ IdentifiedFileType Identify_File(std::string &filename) if (id == 'FLE\x7F') { // There are a few elfs misnamed as pbp (like Trig Wars), accept that. if (!strcasecmp(extension.c_str(), ".plf") || strstr(filename.c_str(),"BOOT.BIN") || - !strcasecmp(extension.c_str(), ".elf") || !strcasecmp(extension.c_str(), ".prx") || + !strcasecmp(extension.c_str(), ".elf") || !strcasecmp(extension.c_str(), ".prx") || !strcasecmp(extension.c_str(), ".pbp")) { return FILETYPE_PSP_ELF; } @@ -173,7 +173,6 @@ IdentifiedFileType Identify_File(std::string &filename) } bool LoadFile(std::string &filename, std::string *error_string) { - INFO_LOG(LOADER,"Identifying file..."); // Note that this can modify filename! switch (Identify_File(filename)) { case FILETYPE_PSP_PBP_DIRECTORY: diff --git a/Core/MIPS/ARM/ArmAsm.cpp b/Core/MIPS/ARM/ArmAsm.cpp index 2764cc120d..efb797b77e 100644 --- a/Core/MIPS/ARM/ArmAsm.cpp +++ b/Core/MIPS/ARM/ArmAsm.cpp @@ -92,7 +92,7 @@ void Jit::GenerateFixedCode() { enterCode = AlignCode16(); - INFO_LOG(JIT, "Base: %08x", (u32)Memory::base); + DEBUG_LOG(JIT, "Base: %08x", (u32)Memory::base); SetCC(CC_AL); @@ -139,6 +139,7 @@ void Jit::GenerateFixedCode() FixupBranch skipToRealDispatch2 = B(); //skip the sync and compare first time dispatcherPCInR0 = GetCodePtr(); + // TODO: Do we always need to write PC to RAM here? MovToPC(R0); // At this point : flags = EQ. Fine for the next check, no need to jump over it. @@ -158,6 +159,7 @@ void Jit::GenerateFixedCode() // QuickCallFunction(R1, (void *)&ShowPC); LDR(R0, CTXREG, offsetof(MIPSState, pc)); + // TODO: In practice, do we ever run code from uncached space (| 0x40000000)? If not, we can remove this BIC. BIC(R0, R0, Operand2(0xC0, 4)); // &= 0x3FFFFFFF LDR(R0, MEMBASEREG, R0); AND(R1, R0, Operand2(0xFC, 4)); // rotation is to the right, in 2-bit increments. @@ -175,7 +177,7 @@ void Jit::GenerateFixedCode() B(R0); SetCC(CC_AL); - //Ok, no block, let's jit + // No block found, let's jit SaveDowncount(); QuickCallFunction(R2, (void *)&JitAt); RestoreDowncount(); diff --git a/Core/MemMap.cpp b/Core/MemMap.cpp index 4c31cef02b..b6f1aa7e7c 100644 --- a/Core/MemMap.cpp +++ b/Core/MemMap.cpp @@ -131,7 +131,7 @@ void Shutdown() MemoryMap_Shutdown(views, num_views, flags, &g_arena); g_arena.ReleaseSpace(); base = NULL; - INFO_LOG(MEMMAP, "Memory system shut down."); + DEBUG_LOG(MEMMAP, "Memory system shut down."); } void Clear() diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index ef488dc24e..b3de237982 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -95,7 +95,10 @@ extern const GLuint glprim[8] = { GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, - GL_TRIANGLES, // With OpenGL ES we have to expand sprites into triangles, tripling the data instead of doubling. sigh. OpenGL ES, Y U NO SUPPORT GL_QUADS? + GL_TRIANGLES, + // With OpenGL ES we have to expand sprites (rects) into triangles, tripling the data instead of doubling. + // Sigh. OpenGL ES, Y U NO SUPPORT GL_QUADS? + // We can use it on the desktop though, but we don't yet. There we could also use geometry shaders anyway. }; enum { @@ -396,7 +399,7 @@ void TransformDrawEngine::DecodeVertsStep() { lastMatch = j; j++; } - + // 2. Loop through the drawcalls, translating indices as we go. for (j = i; j <= lastMatch; j++) { switch (indexType) { @@ -497,21 +500,10 @@ void TransformDrawEngine::DecimateTrackedVertexArrays() { if (iter->second->lastFrame < threshold) { delete iter->second; vai_.erase(iter++); - } - else + } else { ++iter; + } } - - // Enable if you want to see vertex decoders in the log output. Need a better way. -#if 0 - char buffer[16384]; - for (std::map::iterator dec = decoderMap_.begin(); dec != decoderMap_.end(); ++dec) { - char *ptr = buffer; - ptr += dec->second->ToString(ptr); -// *ptr++ = '\n'; - NOTICE_LOG(G3D, buffer); - } -#endif } VertexArrayInfo::~VertexArrayInfo() { @@ -523,7 +515,6 @@ VertexArrayInfo::~VertexArrayInfo() { void TransformDrawEngine::DoFlush() { gpuStats.numFlushes++; - gpuStats.numTrackedVertexArrays = (int)vai_.size(); // This is not done on every drawcall, we should collect vertex data @@ -534,10 +525,12 @@ void TransformDrawEngine::DoFlush() { LinkedShader *program = shaderManager_->ApplyShader(prim, lastVType_); + // Compiler warns about this because it's only used in the #ifdeffed out RangeElements path. + int maxIndex = 0; + if (program->useHWTransform_) { GLuint vbo = 0, ebo = 0; int vertexCount = 0; - int maxIndex = 0; bool useElements = true; // Cannot cache vertex data with morph enabled. @@ -621,7 +614,7 @@ void TransformDrawEngine::DoFlush() { if (!useElements && indexGen.PureCount()) { vai->numVerts = indexGen.PureCount(); } - + glGenBuffers(1, &vai->vbo); glBindBuffer(GL_ARRAY_BUFFER, vai->vbo); glBufferData(GL_ARRAY_BUFFER, dec_->GetDecVtxFmt().stride * indexGen.MaxIndex(), decoded, GL_STATIC_DRAW); @@ -686,6 +679,7 @@ void TransformDrawEngine::DoFlush() { vai->lastFrame = gpuStats.numFlips; } else { DecodeVerts(); + rotateVBO: gpuStats.numUncachedVertsDrawn += indexGen.VertexCount(); useElements = !indexGen.SeenOnlyPurePrims(); @@ -699,7 +693,7 @@ rotateVBO: prim = indexGen.Prim(); } - + VERBOSE_LOG(G3D, "Flush prim %i! %i verts in one go", prim, vertexCount); SetupDecFmtForDraw(program, dec_->GetDecVtxFmt(), vbo ? 0 : decoded); @@ -723,10 +717,9 @@ rotateVBO: // Undo the strip optimization, not supported by the SW code yet. if (prim == GE_PRIM_TRIANGLE_STRIP) prim = GE_PRIM_TRIANGLES; - VERBOSE_LOG(G3D, "Flush prim %i SW! %i verts in one go", prim, indexGen.VertexCount()); SoftwareTransformAndDraw( - prim, decoded, program, indexGen.VertexCount(), + prim, decoded, program, indexGen.VertexCount(), dec_->VertexType(), (void *)decIndex, GE_VTYPE_IDX_16BIT, dec_->GetDecVtxFmt(), indexGen.MaxIndex()); } @@ -874,7 +867,7 @@ static Vec3f ScreenToDrawing(const Vec3f& coords) ret.x = coords.x - gstate.getOffsetX16(); ret.y = coords.y - gstate.getOffsetY16(); - // Convert from 16 point to float. + // Convert from 16-bit fixed point to float. ret.x *= 1.0 / 16.0; ret.y *= 1.0 / 16.0; ret.z = coords.z; diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 9ad6e01706..f6e565b9d6 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -19,6 +19,7 @@ #include #include +#include "base/logging.h" #include "base/timeutil.h" #include "base/stringutil.h" #include "file/file_util.h" @@ -401,6 +402,7 @@ void GameInfoCache::Decimate() { } void GameInfoCache::Clear() { + ILOG("Wiping GameInfoCache: %i items", info_.size()); if (gameInfoWQ_) gameInfoWQ_->Flush(); for (auto iter = info_.begin(); iter != info_.end(); iter++) { diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index a76a72c176..af481ceb22 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -279,7 +279,6 @@ void NativeInit(int argc, const char *argv[], LogManager::Init(); LogManager *logman = LogManager::GetInstance(); - ILOG("Logman: %p", logman); g_Config.AddSearchPath(user_data_path); g_Config.AddSearchPath(g_Config.memCardDirectory + "PSP/SYSTEM/"); @@ -372,7 +371,6 @@ void NativeInit(int argc, const char *argv[], // Special hack for G3D as it's very spammy. Need to make a flag for this. if (!gfxLog) logman->SetLogLevel(LogTypes::G3D, LogTypes::LERROR); - INFO_LOG(BOOT, "Logger inited."); #endif i18nrepo.LoadIni(g_Config.sLanguageIni); diff --git a/native b/native index 39ed5ddf46..d0d5be2c5d 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 39ed5ddf4685d616dd945a3bfe6ca88479f3f4a1 +Subproject commit d0d5be2c5daf5084c8141c9e82fa511350cbc2f2