From 35ad5f95f285cbb46d979358800fe7e2e1e12d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 23 Jul 2024 21:59:23 +0200 Subject: [PATCH 1/3] Minor cleanup --- CMakeLists.txt | 2 +- Core/HW/MpegDemux.cpp | 2 +- SDL/README.TXT | 4 ++++ b.sh | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b5d5bf027..93d9ce7ed5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,7 +143,7 @@ if(IOS_APP_STORE) set(CMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION FALSE) set(CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE DISABLED) message("iOS App Store build") -else() +elseif(IOS) message("iOS sideload build") endif() diff --git a/Core/HW/MpegDemux.cpp b/Core/HW/MpegDemux.cpp index cdef5cbee2..ab5dcd5a23 100644 --- a/Core/HW/MpegDemux.cpp +++ b/Core/HW/MpegDemux.cpp @@ -197,7 +197,7 @@ bool MpegDemux::demux(int audioChannel) while (m_index < m_readSize && !needMore) { // Search for start code - int startCode = 0xFF; + u32 startCode = 0xFF; while ((startCode & PACKET_START_CODE_MASK) != PACKET_START_CODE_PREFIX && !isEOF()) { startCode = (startCode << 8) | read8(); } diff --git a/SDL/README.TXT b/SDL/README.TXT index 828383e8b8..0d5e9451ae 100644 --- a/SDL/README.TXT +++ b/SDL/README.TXT @@ -21,3 +21,7 @@ Works fine on WSL2 with OpenGL, at least. For more notes, see https://www.ppsspp Running with valgrind ===================== + +Here's an example where we both use suppressions, and generate new ones (that you can then take from suppressions.log and simplify and copy to valgrind-wsl2.supp): + +> valgrind --suppressions=SDL/valgrind-wsl2.supp --gen-suppressions=all --log-file=suppressions.log build/PPSSPPSDL diff --git a/b.sh b/b.sh index e86451bd4c..e09561ee2b 100755 --- a/b.sh +++ b/b.sh @@ -78,6 +78,9 @@ do --gold) echo "Gold build enabled" CMAKE_ARGS="-DGOLD=ON ${CMAKE_ARGS}" ;; + --alderlake) echo "Alderlake opt" + CMAKE_ARGS="-DCMAKE_C_FLAGS=\"-march=alderlake\" -DCMAKE_CPP_FLAGS=\"-march=alderlake\"" + ;; *) MAKE_OPT="$1 ${MAKE_OPT}" ;; esac From 5fdff10be50ef261f6a12fbee89b17525ec2c13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 23 Jul 2024 22:13:24 +0200 Subject: [PATCH 2/3] Minor logging tweak --- Core/HLE/sceIo.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 6b5a336b2c..7b310b8f71 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -2291,11 +2291,12 @@ static u32 sceIoGetAsyncStat(int id, u32 poll, u32 address) { return SCE_KERNEL_ERROR_NOASYNC; } return 0; //completed - } - else - { - ERROR_LOG(Log::sceIo, "ERROR - sceIoGetAsyncStat with invalid id %i", id); - return SCE_KERNEL_ERROR_BADF; + } else { + if (id == 0) { + return hleLogDebug(Log::sceIo, SCE_KERNEL_ERROR_BADF, "ERROR - sceIoGetAsyncStat with invalid id %d", id); + } else { + return hleLogError(Log::sceIo, SCE_KERNEL_ERROR_BADF, "ERROR - sceIoGetAsyncStat with invalid id %d", id); + } } } From 5d4f41308565dadac2efa0932bdaadc2387119c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 23 Jul 2024 14:33:39 +0200 Subject: [PATCH 3/3] Demote a very common log message from ERROR to DEBUG --- Core/HLE/sceAtrac.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/HLE/sceAtrac.cpp b/Core/HLE/sceAtrac.cpp index dc5652acd1..4dcf94e441 100644 --- a/Core/HLE/sceAtrac.cpp +++ b/Core/HLE/sceAtrac.cpp @@ -677,7 +677,12 @@ static u32 sceAtracSetLoopNum(int atracID, int loopNum) { return err; } if (atrac->GetTrack().loopinfo.size() == 0) { - return hleLogError(Log::ME, ATRAC_ERROR_NO_LOOP_INFORMATION, "no loop information"); + if (loopNum == -1) { + // This is very common and not really a problem. + return hleLogDebug(Log::ME, ATRAC_ERROR_NO_LOOP_INFORMATION, "no loop information to write to!"); + } else { + return hleLogError(Log::ME, ATRAC_ERROR_NO_LOOP_INFORMATION, "no loop information to write to!"); + } } atrac->SetLoopNum(loopNum);