From 95a14ca8308630a0d5f41ad163dc01c31a808d90 Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Fri, 1 Dec 2017 23:48:58 +0100 Subject: [PATCH 1/6] Add hotkey to toggle audio and video dumping together in sync. --- Common/KeyMap.cpp | 1 + Common/KeyMap.h | 1 + UI/EmuScreen.cpp | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/Common/KeyMap.cpp b/Common/KeyMap.cpp index d14d0a832a..ffe76c87a0 100644 --- a/Common/KeyMap.cpp +++ b/Common/KeyMap.cpp @@ -649,6 +649,7 @@ const KeyMap_IntStrPair psp_button_names[] = { #ifndef MOBILE_DEVICE {VIRTKEY_FRAME_ADVANCE, "Frame Advance"}, {VIRTKEY_REWIND, "Rewind"}, + {VIRTKEY_RECORD, "Audio/Video Recording" }, #endif {VIRTKEY_SAVE_STATE, "Save State"}, {VIRTKEY_LOAD_STATE, "Load State"}, diff --git a/Common/KeyMap.h b/Common/KeyMap.h index 5305d9d424..fd56d4d8f5 100644 --- a/Common/KeyMap.h +++ b/Common/KeyMap.h @@ -51,6 +51,7 @@ enum { VIRTKEY_AXIS_SWAP = 0x40000013, VIRTKEY_DEVMENU = 0x40000014, VIRTKEY_FRAME_ADVANCE = 0x40000015, + VIRTKEY_RECORD = 0x40000016, VIRTKEY_LAST, VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST }; diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index f8d8727899..403aaa5275 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -454,6 +454,28 @@ void EmuScreen::onVKeyDown(int virtualKeyCode) { break; } +#ifndef MOBILE_DEVICE + case VIRTKEY_RECORD: + { + if (g_Config.bDumpFrames == g_Config.bDumpAudio) { + g_Config.bDumpFrames = !g_Config.bDumpFrames; + g_Config.bDumpAudio = !g_Config.bDumpAudio; + } else { + // This hotkey should always toggle both audio and video together. + // So let's make sure that's the only outcome even if video OR audio was already being dumped. + if (g_Config.bDumpFrames) { + AVIDump::Stop(); + AVIDump::Start(PSP_CoreParameter().renderWidth, PSP_CoreParameter().renderHeight); + g_Config.bDumpAudio = true; + } else { + WAVDump::Reset(); + g_Config.bDumpFrames = true; + } + } + break; + } +#endif + case VIRTKEY_AXIS_X_MIN: case VIRTKEY_AXIS_X_MAX: setVKeyAnalogX(CTRL_STICK_LEFT, VIRTKEY_AXIS_X_MIN, VIRTKEY_AXIS_X_MAX); From b2bb1b676e5a5f2f6cdc32645786e519a01eb59e Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 1 Dec 2017 18:25:06 -0800 Subject: [PATCH 2/6] Reporting: Oops, fix module load log line. Typo from 0a36549 - meant to disable reporting. --- Core/HLE/sceKernelModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index a87bf16d1e..bc37345197 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1432,7 +1432,7 @@ static Module *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 loadAdd delete [] newptr; if (!reportedModule && IsHLEVersionedModule(modinfo->name)) { - INFO_LOG_REPORT(SCEMODULE, "Loading module %s with version %04x, devkit %08x", modinfo->name, modinfo->moduleVersion, devkitVersion); + INFO_LOG(SCEMODULE, "Loading module %s with version %04x, devkit %08x", modinfo->name, modinfo->moduleVersion, devkitVersion); if (!strcmp(modinfo->name, "sceMpeg_library")) { __MpegLoadModule(modinfo->moduleVersion); From b84c15c663088b05be8978393587a42448770b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Dec 2017 09:39:36 +0100 Subject: [PATCH 3/6] Vulkan: Remove misguided assert about backbuffer clearing mode. --- ext/native/thin3d/VulkanQueueRunner.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/native/thin3d/VulkanQueueRunner.cpp b/ext/native/thin3d/VulkanQueueRunner.cpp index 59937c9d39..a293fbf33c 100644 --- a/ext/native/thin3d/VulkanQueueRunner.cpp +++ b/ext/native/thin3d/VulkanQueueRunner.cpp @@ -594,8 +594,6 @@ void VulkanQueueRunner::PerformBindFramebufferAsRenderTarget(const VKRStep &step w = vulkan_->GetBackbufferWidth(); h = vulkan_->GetBackbufferHeight(); renderPass = GetBackbufferRenderPass(); - _dbg_assert_msg_(G3D, step.render.color == VKRRenderPassAction::CLEAR || step.render.color == VKRRenderPassAction::DONT_CARE, "Backbuffer pass should only be CLEAR or DONT_CARE"); - _dbg_assert_msg_(G3D, step.render.depthStencil == VKRRenderPassAction::CLEAR || step.render.depthStencil == VKRRenderPassAction::DONT_CARE, "Backbuffer pass should only be CLEAR or DONT_CARE"); Uint8x4ToFloat4(clearVal[0].color.float32, step.render.clearColor); numClearVals = 2; // We don't bother with a depth buffer here. clearVal[1].depthStencil.depth = 0.0f; From 734d9c494c04c4b16940b6f10790ea273db6b707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Dec 2017 09:58:13 +0100 Subject: [PATCH 4/6] Fix bug in Vulkan non-buffered where clears could extend outside the frame, since Vulkan clears do not respect scissors. --- GPU/Common/SoftwareTransformCommon.cpp | 2 +- GPU/Common/SoftwareTransformCommon.h | 1 + GPU/D3D11/DrawEngineD3D11.cpp | 8 +++----- GPU/Directx9/DrawEngineDX9.cpp | 8 +++----- GPU/GLES/DrawEngineGLES.cpp | 8 +++----- GPU/Vulkan/DrawEngineVulkan.cpp | 12 ++++++------ 6 files changed, 17 insertions(+), 22 deletions(-) diff --git a/GPU/Common/SoftwareTransformCommon.cpp b/GPU/Common/SoftwareTransformCommon.cpp index a7f0410038..c92b9b9131 100644 --- a/GPU/Common/SoftwareTransformCommon.cpp +++ b/GPU/Common/SoftwareTransformCommon.cpp @@ -394,7 +394,7 @@ void SoftwareTransform( // TODO: This bleeds outside the play area in non-buffered mode. Big deal? Probably not. // TODO: Allow creating a depth clear and a color draw. bool reallyAClear = false; - if (maxIndex > 1 && prim == GE_PRIM_RECTANGLES && gstate.isModeClear()) { + if (maxIndex > 1 && prim == GE_PRIM_RECTANGLES && gstate.isModeClear() && params->allowClear) { int scissorX2 = gstate.getScissorX2() + 1; int scissorY2 = gstate.getScissorY2() + 1; reallyAClear = IsReallyAClear(transformed, maxIndex, scissorX2, scissorY2); diff --git a/GPU/Common/SoftwareTransformCommon.h b/GPU/Common/SoftwareTransformCommon.h index 9ae3bd2697..9bc2e4da49 100644 --- a/GPU/Common/SoftwareTransformCommon.h +++ b/GPU/Common/SoftwareTransformCommon.h @@ -44,6 +44,7 @@ struct SoftwareTransformParams { TransformedVertex *transformedExpanded; FramebufferManagerCommon *fbman; TextureCacheCommon *texCache; + bool allowClear; bool allowSeparateAlphaClear; }; diff --git a/GPU/D3D11/DrawEngineD3D11.cpp b/GPU/D3D11/DrawEngineD3D11.cpp index 7f09171a13..d43edbdd89 100644 --- a/GPU/D3D11/DrawEngineD3D11.cpp +++ b/GPU/D3D11/DrawEngineD3D11.cpp @@ -635,16 +635,14 @@ rotateVBO: bool drawIndexed = false; u16 *inds = decIndex; TransformedVertex *drawBuffer = NULL; - SoftwareTransformResult result; - memset(&result, 0, sizeof(result)); - - SoftwareTransformParams params; - memset(¶ms, 0, sizeof(params)); + SoftwareTransformResult result{}; + SoftwareTransformParams params{}; params.decoded = decoded; params.transformed = transformed; params.transformedExpanded = transformedExpanded; params.fbman = framebufferManager_; params.texCache = textureCache_; + params.allowClear = true; params.allowSeparateAlphaClear = false; // D3D11 doesn't support separate alpha clears int maxIndex = indexGen.MaxIndex(); diff --git a/GPU/Directx9/DrawEngineDX9.cpp b/GPU/Directx9/DrawEngineDX9.cpp index da76b0024f..fbfafd13e3 100644 --- a/GPU/Directx9/DrawEngineDX9.cpp +++ b/GPU/Directx9/DrawEngineDX9.cpp @@ -599,16 +599,14 @@ rotateVBO: bool drawIndexed = false; u16 *inds = decIndex; TransformedVertex *drawBuffer = NULL; - SoftwareTransformResult result; - memset(&result, 0, sizeof(result)); - - SoftwareTransformParams params; - memset(¶ms, 0, sizeof(params)); + SoftwareTransformResult result{}; + SoftwareTransformParams params{}; params.decoded = decoded; params.transformed = transformed; params.transformedExpanded = transformedExpanded; params.fbman = framebufferManager_; params.texCache = textureCache_; + params.allowClear = true; params.allowSeparateAlphaClear = true; int maxIndex = indexGen.MaxIndex(); diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index 030400479a..95e6b53de9 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -670,17 +670,15 @@ rotateVBO: int numTrans; bool drawIndexed = false; u16 *inds = decIndex; - SoftwareTransformResult result; - memset(&result, 0, sizeof(result)); - + SoftwareTransformResult result{}; // TODO: Keep this static? Faster than repopulating? - SoftwareTransformParams params; - memset(¶ms, 0, sizeof(params)); + SoftwareTransformParams params{}; params.decoded = decoded; params.transformed = transformed; params.transformedExpanded = transformedExpanded; params.fbman = framebufferManager_; params.texCache = textureCache_; + params.allowClear = true; params.allowSeparateAlphaClear = true; int maxIndex = indexGen.MaxIndex(); diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 73fb6afe4e..04fb0c3423 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -897,17 +897,17 @@ void DrawEngineVulkan::DoFlush() { int numTrans = 0; bool drawIndexed = false; u16 *inds = decIndex; - TransformedVertex *drawBuffer = NULL; - SoftwareTransformResult result; - memset(&result, 0, sizeof(result)); - - SoftwareTransformParams params; - memset(¶ms, 0, sizeof(params)); + TransformedVertex *drawBuffer = nullptr; + SoftwareTransformResult result{}; + SoftwareTransformParams params{}; params.decoded = decoded; params.transformed = transformed; params.transformedExpanded = transformedExpanded; params.fbman = framebufferManager_; params.texCache = textureCache_; + // We have to force drawing of primitives if g_Config.iRenderingMode == 0 (non-buffered) because Vulkan clears + // do not respect scissor rects. + params.allowClear = g_Config.iRenderingMode != 0; params.allowSeparateAlphaClear = false; int maxIndex = indexGen.MaxIndex(); From 00d4da40aee4cb8f35825a2d60dab8b98daf4f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Dec 2017 12:06:56 +0100 Subject: [PATCH 5/6] Update lang --- assets/lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/lang b/assets/lang index c37028e6b6..6f00429315 160000 --- a/assets/lang +++ b/assets/lang @@ -1 +1 @@ -Subproject commit c37028e6b60e416ca52382ae8fdd76b6e77bede7 +Subproject commit 6f00429315374b0c6e5a38c7b578ccf3e0759c8a From 341611e16a8c8496cc5f605c9215ba139e5620ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Dec 2017 12:10:48 +0100 Subject: [PATCH 6/6] Update AndroidManifest.xml to 1.5.3.0, just in case anyone is still using the old build system where this isn't automatic. --- android/AndroidManifest.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index e145a623e2..f4db4a5280 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,9 +2,9 @@ - + android:versionCode="15030000" + android:versionName="1.5.3.0"> +