Compare commits

...

5 Commits

Author SHA1 Message Date
Niram7777
162cb18d9d
Vulkan destroy presenter members before device (#4222) 2026-04-05 00:47:26 +03:00
Stephen Miller
e24f42b03c
Lib.Sysmodule: Allow libSceSystemGesture LLE (#4223)
* Run libSceSystemGesture LLE

It's fully safe.

* Update sysmodule table appropriately.
2026-04-05 00:35:53 +03:00
kalaposfos13
93733a9ae8
Fix edge case for touch states (#4219) 2026-04-04 15:26:41 -05:00
Niram7777
fb067bc43f
Vulkan device destroy images_view on Swapchain::Destroy (#4218) 2026-04-04 22:30:28 +03:00
Niram7777
b365d5fe78
Vulkan device destroy DescriptorPool on Shutdown (#4217)
Validation Error: [ VUID-vkDestroyDevice-device-05137 ] | MessageID = 0x4872eaa0
vkDestroyDevice(): Object Tracking - For VkDevice 0x55ac6bd22670, VkDescriptorPool 0x300000000030 has not been destroyed.
The Vulkan spec states: All child objects created on device that can be destroyed or freed must have been destroyed or freed prior to destroying device (https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VUID-vkDestroyDevice-device-05137)
Objects: 1
    [0] VkDescriptorPool 0x300000000030
2026-04-04 21:57:22 +03:00
9 changed files with 35 additions and 18 deletions

View File

@ -150,12 +150,12 @@ The following firmware modules are supported and must be placed in shadPS4's `sy
<div align="center">
| Modules | Modules | Modules | Modules |
|-------------------------|-------------------------|-------------------------|-------------------------|
| libSceCesCs.sprx | libSceFont.sprx | libSceFontFt.sprx | libSceFreeTypeOt.sprx |
| libSceJpegDec.sprx | libSceJpegEnc.sprx | libSceJson.sprx | libSceJson2.sprx |
| libSceLibcInternal.sprx | libSceNgs2.sprx | libScePngEnc.sprx | libSceRtc.sprx |
| libSceUlt.sprx | libSceAudiodec.sprx | | |
| Modules | Modules | Modules | Modules |
|--------------------------|--------------------------|--------------------------|--------------------------|
| libSceAudiodec.sprx | libSceCesCs.sprx | libSceFont.sprx | libSceFontFt.sprx |
| libSceFreeTypeOt.sprx | libSceJpegDec.sprx | libSceJpegEnc.sprx | libSceJson.sprx |
| libSceJson2.sprx | libSceLibcInternal.sprx | libSceNgs2.sprx | libScePngEnc.sprx |
| libSceRtc.sprx | libSceSystemGesture.sprx | libSceUlt.sprx | |
</div>
> [!Caution]

View File

@ -63,7 +63,6 @@
#include "core/libraries/system/posix.h"
#include "core/libraries/system/systemservice.h"
#include "core/libraries/system/userservice.h"
#include "core/libraries/system_gesture/system_gesture.h"
#include "core/libraries/ulobjmgr/ulobjmgr.h"
#include "core/libraries/usbd/usbd.h"
#include "core/libraries/videodec/videodec.h"
@ -120,7 +119,6 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) {
Libraries::Random::RegisterLib(sym);
Libraries::Usbd::RegisterLib(sym);
Libraries::Pad::RegisterLib(sym);
Libraries::SystemGesture::RegisterLib(sym);
Libraries::Ajm::RegisterLib(sym);
Libraries::ErrorDialog::RegisterLib(sym);
Libraries::ImeDialog::RegisterLib(sym);

View File

@ -423,12 +423,18 @@ int ProcessStates(s32 handle, OrbisPadData* pData, Input::GameController& contro
states[i].touchpad[1].ID = 2;
}
pData[i].touchData.touch[0].x = states[i].touchpad[0].x;
pData[i].touchData.touch[0].y = states[i].touchpad[0].y;
pData[i].touchData.touch[0].id = states[i].touchpad[0].ID;
pData[i].touchData.touch[1].x = states[i].touchpad[1].x;
pData[i].touchData.touch[1].y = states[i].touchpad[1].y;
pData[i].touchData.touch[1].id = states[i].touchpad[1].ID;
if (!states[i].touchpad[0].state && states[i].touchpad[1].state) {
pData[i].touchData.touch[0].x = states[i].touchpad[1].x;
pData[i].touchData.touch[0].y = states[i].touchpad[1].y;
pData[i].touchData.touch[0].id = states[i].touchpad[1].ID;
} else {
pData[i].touchData.touch[0].x = states[i].touchpad[0].x;
pData[i].touchData.touch[0].y = states[i].touchpad[0].y;
pData[i].touchData.touch[0].id = states[i].touchpad[0].ID;
pData[i].touchData.touch[1].x = states[i].touchpad[1].x;
pData[i].touchData.touch[1].y = states[i].touchpad[1].y;
pData[i].touchData.touch[1].id = states[i].touchpad[1].ID;
}
pData[i].connected = connected;
pData[i].timestamp = states[i].time;
pData[i].connectedCount = connected_count;

View File

@ -20,6 +20,7 @@
#include "core/libraries/sysmodule/sysmodule_error.h"
#include "core/libraries/sysmodule/sysmodule_internal.h"
#include "core/libraries/sysmodule/sysmodule_table.h"
#include "core/libraries/system_gesture/system_gesture.h"
#include "core/linker.h"
#include "emulator.h"
@ -223,7 +224,8 @@ s32 loadModuleInternal(s32 index, s32 argc, const void* argv, s32* res_out) {
{"libSceAudiodec.sprx", nullptr},
{"libSceFont.sprx", &Libraries::Font::RegisterlibSceFont},
{"libSceFontFt.sprx", &Libraries::FontFt::RegisterlibSceFontFt},
{"libSceFreeTypeOt.sprx", nullptr}});
{"libSceFreeTypeOt.sprx", nullptr},
{"libSceSystemGesture.sprx", &Libraries::SystemGesture::RegisterLib}});
// Iterate through the allowed array
const auto it = std::ranges::find_if(

View File

@ -1219,6 +1219,10 @@ void ImGuiImplVulkanDestroyDeviceObjects() {
v.device.destroyDescriptorSetLayout(bd->descriptor_set_layout, v.allocator);
bd->descriptor_set_layout = VK_NULL_HANDLE;
}
if (bd->descriptor_pool) {
v.device.destroyDescriptorPool(bd->descriptor_pool, v.allocator);
bd->descriptor_pool = VK_NULL_HANDLE;
}
if (bd->pipeline_layout) {
v.device.destroyPipelineLayout(bd->pipeline_layout, v.allocator);
bd->pipeline_layout = VK_NULL_HANDLE;

View File

@ -8,6 +8,7 @@
#include "common/assert.h"
#include "common/debug.h"
#include "common/types.h"
#include "imgui/renderer/imgui_core.h"
#include "sdl_window.h"
#include "video_core/renderer_vulkan/liverpool_to_vk.h"
#include "video_core/renderer_vulkan/vk_instance.h"
@ -183,6 +184,7 @@ Instance::Instance(Frontend::WindowSDL& window, s32 physical_device_index,
}
Instance::~Instance() {
ImGui::Core::Shutdown(GetDevice());
vmaDestroyAllocator(allocator);
}

View File

@ -144,7 +144,6 @@ Presenter::~Presenter() {
device.destroyImageView(frame.image_view);
device.destroyFence(frame.present_done);
}
ImGui::Core::Shutdown(device);
}
bool Presenter::IsVideoOutSurface(const AmdGpu::ColorBuffer& color_buffer) const {

View File

@ -112,13 +112,13 @@ private:
u32 expected_frame_width{1920};
u32 expected_frame_height{1080};
Frontend::WindowSDL& window;
Instance instance;
HostPasses::FsrPass fsr_pass;
HostPasses::FsrPass::Settings fsr_settings{};
HostPasses::PostProcessingPass::Settings pp_settings{};
HostPasses::PostProcessingPass pp_pass;
Frontend::WindowSDL& window;
AmdGpu::Liverpool* liverpool;
Instance instance;
Scheduler draw_scheduler;
Scheduler present_scheduler;
Scheduler flip_scheduler;

View File

@ -261,6 +261,12 @@ void Swapchain::Destroy() {
LOG_WARNING(Render_Vulkan, "Failed to wait for device to become idle: {}",
vk::to_string(wait_result));
}
for (auto& image_view : images_view) {
device.destroyImageView(image_view);
}
images_view.clear();
if (swapchain) {
device.destroySwapchainKHR(swapchain);
}