diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index c2dcdc09dc..81b5860801 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -1116,21 +1116,6 @@ VkCommandBuffer VulkanRenderManager::GetInitCmd() { return frameData_[curFrame].GetInitCmd(vulkan_); } -void VulkanRenderManager::ReportBadStateForDraw() { - const char *cause1 = ""; - char cause2[256]; - cause2[0] = '\0'; - if (!curRenderStep_) { - cause1 = "No current render step"; - } - if (curRenderStep_ && curRenderStep_->stepType != VKRStepType::RENDER) { - cause1 = "Not a render step: "; - std::string str = VulkanQueueRunner::StepToString(vulkan_, *curRenderStep_); - truncate_cpy(cause2, str); - } - ERROR_LOG_REPORT_ONCE(baddraw, Log::G3D, "Can't draw: %s%s. Step count: %d", cause1, cause2, (int)steps_.size()); -} - bool VulkanRenderManager::PipelinesPending() { // Pipelines still in the queue, or taken off it but not yet made into tasks, aren't in flight yet. std::unique_lock lock(compileQueueMutex_); diff --git a/Common/GPU/Vulkan/VulkanRenderManager.h b/Common/GPU/Vulkan/VulkanRenderManager.h index ea983c6f8c..d0550f7b6a 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.h +++ b/Common/GPU/Vulkan/VulkanRenderManager.h @@ -290,8 +290,6 @@ public: VKRPipelineLayout *CreatePipelineLayout(BindingType *bindingTypes, size_t bindingCount, const char *tag); void DestroyPipelineLayout(VKRPipelineLayout *pipelineLayout); - void ReportBadStateForDraw(); - // True while there are queued or compiling pipelines. bool PipelinesPending(); diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index d68d2b4f72..9f21fdb752 100755 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -1261,7 +1261,6 @@ void PSPSaveDialog::StartIOThread() { ioThreadStatus = SAVEIO_PENDING; ioThread = std::thread([this]() { SetCurrentThreadName("SaveIO"); - AndroidJNIThreadContext jniContext; this->ExecuteIOAction(); }); diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index bf7d901847..0d48a5e118 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -225,23 +225,23 @@ void __SasShutdown() { static u32 sceSasInit(u32 core, u32 grainSize, u32 maxVoices, u32 outputMode, u32 sampleRate) { if (!Memory::IsValidAddress(core) || (core & 0x3F) != 0) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad core address", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad core address", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_BAD_ADDRESS); } if (maxVoices == 0 || maxVoices > PSP_SAS_VOICES_MAX) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad max voices", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad max voices", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_INVALID_MAX_VOICES); } if (grainSize < 0x40 || grainSize > 0x800 || (grainSize & 0x1F) != 0) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad grain size", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad grain size", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_INVALID_GRAIN); } if (outputMode != 0 && outputMode != 1) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad output mode", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad output mode", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_INVALID_OUTPUT_MODE); } if (sampleRate != 44100) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad sample rate", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad sample rate", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_INVALID_SAMPLE_RATE); } @@ -292,7 +292,7 @@ static u32 _sceSasCore(u32 core, u32 outAddr) { PROFILE_THIS_SCOPE("mixer"); if (!Memory::IsValidAddress(outAddr)) { - return hleReportError(Log::sceSas, SCE_SAS_ERROR_INVALID_PARAMETER, "invalid address"); + return hleLogError(Log::sceSas, SCE_SAS_ERROR_INVALID_PARAMETER, "invalid address"); } if (!__KernelIsDispatchEnabled()) { return hleLogError(Log::sceSas, SCE_KERNEL_ERROR_CAN_NOT_WAIT, "dispatch disabled"); @@ -308,10 +308,10 @@ static u32 _sceSasCoreWithMix(u32 core, u32 inoutAddr, int leftVolume, int right PROFILE_THIS_SCOPE("mixer"); if (!Memory::IsValidAddress(inoutAddr)) { - return hleReportError(Log::sceSas, SCE_SAS_ERROR_INVALID_PARAMETER, "invalid address"); + return hleLogError(Log::sceSas, SCE_SAS_ERROR_INVALID_PARAMETER, "invalid address"); } if (sas->outputMode == PSP_SAS_OUTPUTMODE_RAW) { - return hleReportError(Log::sceSas, SCE_KERNEL_ERROR_BAD_ARGUMENT, "unsupported outputMode"); + return hleLogError(Log::sceSas, SCE_KERNEL_ERROR_BAD_ARGUMENT, "unsupported outputMode"); } if (!__KernelIsDispatchEnabled()) { return hleLogError(Log::sceSas, SCE_KERNEL_ERROR_CAN_NOT_WAIT, "dispatch disabled"); @@ -571,7 +571,7 @@ static u32 sceSasSetADSRMode(u32 core, int voiceNum, int flag, int a, int d, int // Some games do this right at init. It seems to fail even on a PSP, but let's not report it. return hleLogDebug(Log::sceSas, SCE_SAS_ERROR_INVALID_ADSR_CURVE_MODE, "sceSasSetADSRMode(%08x, %i, %i, %08x, %08x, %08x, %08x): invalid modes", core, voiceNum, flag, a, d, s, r); } else { - WARN_LOG_REPORT(Log::sceSas, "sceSasSetADSRMode(%08x, %i, %i, %08x, %08x, %08x, %08x): invalid modes", core, voiceNum, flag, a, d, s, r); + WARN_LOG(Log::sceSas, "sceSasSetADSRMode(%08x, %i, %i, %08x, %08x, %08x, %08x): invalid modes", core, voiceNum, flag, a, d, s, r); return hleNoLog(SCE_SAS_ERROR_INVALID_ADSR_CURVE_MODE); } } @@ -660,7 +660,7 @@ static u32 sceSasSetGrain(u32 core, int grain) { // allocated value beyond PSP_SAS_MAX_GRAIN) read out of bounds of the fixed-size // mixTemp_ buffer during mixing. Apply the same bounds sceSasInit uses. if (grain < 0x40 || grain > 0x800 || (grain & 0x1F) != 0) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasSetGrain(%08x, %i): bad grain size", core, grain); + ERROR_LOG(Log::sceSas, "sceSasSetGrain(%08x, %i): bad grain size", core, grain); return hleNoLog(SCE_SAS_ERROR_INVALID_GRAIN); } __SasDrain(); @@ -674,7 +674,7 @@ static u32 sceSasGetOutputMode(u32 core) { static u32 sceSasSetOutputMode(u32 core, u32 outputMode) { if (outputMode != 0 && outputMode != 1) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasSetOutputMode(%08x, %i): bad output mode", core, outputMode); + ERROR_LOG(Log::sceSas, "sceSasSetOutputMode(%08x, %i): bad output mode", core, outputMode); return hleNoLog(SCE_SAS_ERROR_INVALID_OUTPUT_MODE); } diff --git a/Core/MIPS/InterpreterVFPU.cpp b/Core/MIPS/InterpreterVFPU.cpp index fa091cb114..5200b4699b 100644 --- a/Core/MIPS/InterpreterVFPU.cpp +++ b/Core/MIPS/InterpreterVFPU.cpp @@ -23,11 +23,11 @@ #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Math/math_util.h" +#include "Common/Log.h" #include "Core/Compatibility.h" #include "Core/Core.h" #include "Core/MemMap.h" -#include "Core/Reporting.h" #include "Core/Config.h" #include "Core/System.h" @@ -1280,7 +1280,7 @@ namespace MIPSInt // Other sizes don't seem completely predictable. if (sz != V_Quad) { - ERROR_LOG_REPORT_ONCE(vbfy2, Log::CPU, "vfby2 with incorrect size"); + ERROR_LOG(Log::CPU, "vfby2 with incorrect size"); } } else { // vbfy1 @@ -1295,7 +1295,7 @@ namespace MIPSInt ApplyPrefixST(mips, t, VFPURewritePrefix(mips, VFPU_CTRL_TPREFIX, tprefixRemove, tprefixAdd), sz); if (sz != V_Quad && sz != V_Pair) { - ERROR_LOG_REPORT_ONCE(vbfy2, Log::CPU, "vfby1 with incorrect size"); + ERROR_LOG(Log::CPU, "vfby1 with incorrect size"); } } diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index b41d7fa55b..463833ec61 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -2609,7 +2609,7 @@ bool GPUCommon::PerformMemoryCopy(u32 dest, u32 src, int size, GPUCopyFlag flags // Check for invalid memory range. Should we reject? For now, let's clamp it. if (Memory::ClampValidSizeAt(dest, size) < (u32)size) { - ERROR_LOG_REPORT_ONCE(invalidmemset, Log::G3D, "PerformMemorySet with invalid range: %08x, size %d", dest, size); + ERROR_LOG(Log::G3D, "PerformMemorySet with invalid range: %08x, size %d", dest, size); size = Memory::ClampValidSizeAt(dest, size); } @@ -2655,7 +2655,7 @@ bool GPUCommon::PerformMemorySet(u32 dest, u8 v, int size) { // Check for invalid memory range. Should we reject? For now, let's clamp it. if (Memory::ClampValidSizeAt(dest, size) < (u32)size) { - ERROR_LOG_REPORT_ONCE(invalidmemset, Log::G3D, "PerformMemorySet with invalid range: %08x, size %d", dest, size); + ERROR_LOG(Log::G3D, "PerformMemorySet with invalid range: %08x, size %d", dest, size); size = Memory::ClampValidSizeAt(dest, size); } diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index a691d8408a..3cdc37b190 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -361,7 +361,6 @@ void DrawEngineVulkan::Flush() { BindShaderBlendTex(); // This might cause copies so important to do before BindPipeline. if (!renderManager->BindPipeline(pipeline->pipeline, pipeline->pipelineFlags, pipelineLayout_)) { - renderManager->ReportBadStateForDraw(); ResetAfterSkippedDraw(); return; } @@ -520,7 +519,6 @@ void DrawEngineVulkan::Flush() { BindShaderBlendTex(); // This might cause copies so super important to do before BindPipeline. if (!renderManager->BindPipeline(pipeline->pipeline, pipeline->pipelineFlags, pipelineLayout_)) { - renderManager->ReportBadStateForDraw(); ResetAfterSkippedDraw(); return; }