mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-28 18:46:06 +00:00
hot-fix: Tracy operation restored; memory leak fix as a bonus
This commit is contained in:
parent
3001b007f6
commit
e7c4ffe032
2
externals/CMakeLists.txt
vendored
2
externals/CMakeLists.txt
vendored
|
@ -193,7 +193,7 @@ option(TRACY_ENABLE "" ON)
|
||||||
option(TRACY_NO_CRASH_HANDLER "" ON) # Otherwise texture cache exceptions will be treaten as a crash
|
option(TRACY_NO_CRASH_HANDLER "" ON) # Otherwise texture cache exceptions will be treaten as a crash
|
||||||
option(TRACY_ON_DEMAND "" ON)
|
option(TRACY_ON_DEMAND "" ON)
|
||||||
option(TRACY_NO_FRAME_IMAGE "" ON)
|
option(TRACY_NO_FRAME_IMAGE "" ON)
|
||||||
option(TRACY_FIBERS "" ON) # For AmdGpu frontend profiling
|
option(TRACY_FIBERS "" OFF) # For AmdGpu frontend profiling, disabled due to instability
|
||||||
option(TRACY_NO_SYSTEM_TRACING "" ON)
|
option(TRACY_NO_SYSTEM_TRACING "" ON)
|
||||||
option(TRACY_NO_CALLSTACK "" ON)
|
option(TRACY_NO_CALLSTACK "" ON)
|
||||||
option(TRACY_NO_CODE_TRANSFER "" ON)
|
option(TRACY_NO_CODE_TRANSFER "" ON)
|
||||||
|
|
|
@ -17,6 +17,8 @@ static inline bool IsProfilerConnected() {
|
||||||
return tracy::GetProfiler().IsConnected();
|
return tracy::GetProfiler().IsConnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define TRACY_GPU_ENABLED 0
|
||||||
|
|
||||||
#define CUSTOM_LOCK(type, varname) \
|
#define CUSTOM_LOCK(type, varname) \
|
||||||
tracy::LockableCtx varname { \
|
tracy::LockableCtx varname { \
|
||||||
[]() -> const tracy::SourceLocationData* { \
|
[]() -> const tracy::SourceLocationData* { \
|
||||||
|
@ -58,5 +60,10 @@ enum MarkersPalette : int {
|
||||||
|
|
||||||
#define FRAME_END FrameMark
|
#define FRAME_END FrameMark
|
||||||
|
|
||||||
|
#ifdef TRACY_FIBERS
|
||||||
#define FIBER_ENTER(name) TracyFiberEnter(name)
|
#define FIBER_ENTER(name) TracyFiberEnter(name)
|
||||||
#define FIBER_EXIT TracyFiberLeave
|
#define FIBER_EXIT TracyFiberLeave
|
||||||
|
#else
|
||||||
|
#define FIBER_ENTER(name)
|
||||||
|
#define FIBER_EXIT
|
||||||
|
#endif
|
||||||
|
|
|
@ -488,6 +488,7 @@ int PS4_SYSV_ABI sceGnmDestroyWorkloadStream() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PS4_SYSV_ABI sceGnmDingDong(u32 gnm_vqid, u32 next_offs_dw) {
|
void PS4_SYSV_ABI sceGnmDingDong(u32 gnm_vqid, u32 next_offs_dw) {
|
||||||
|
HLE_TRACE;
|
||||||
LOG_DEBUG(Lib_GnmDriver, "vqid {}, offset_dw {}", gnm_vqid, next_offs_dw);
|
LOG_DEBUG(Lib_GnmDriver, "vqid {}, offset_dw {}", gnm_vqid, next_offs_dw);
|
||||||
|
|
||||||
if (gnm_vqid == 0) {
|
if (gnm_vqid == 0) {
|
||||||
|
@ -2166,6 +2167,7 @@ int PS4_SYSV_ABI sceGnmSubmitCommandBuffersForWorkload(u32 workload, u32 count,
|
||||||
u32* dcb_sizes_in_bytes,
|
u32* dcb_sizes_in_bytes,
|
||||||
const u32* ccb_gpu_addrs[],
|
const u32* ccb_gpu_addrs[],
|
||||||
u32* ccb_sizes_in_bytes) {
|
u32* ccb_sizes_in_bytes) {
|
||||||
|
HLE_TRACE;
|
||||||
LOG_DEBUG(Lib_GnmDriver, "called");
|
LOG_DEBUG(Lib_GnmDriver, "called");
|
||||||
|
|
||||||
if (!dcb_gpu_addrs || !dcb_sizes_in_bytes) {
|
if (!dcb_gpu_addrs || !dcb_sizes_in_bytes) {
|
||||||
|
@ -2258,6 +2260,7 @@ s32 PS4_SYSV_ABI sceGnmSubmitCommandBuffers(u32 count, const u32* dcb_gpu_addrs[
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceGnmSubmitDone() {
|
int PS4_SYSV_ABI sceGnmSubmitDone() {
|
||||||
|
HLE_TRACE;
|
||||||
LOG_DEBUG(Lib_GnmDriver, "called");
|
LOG_DEBUG(Lib_GnmDriver, "called");
|
||||||
WaitGpuIdle();
|
WaitGpuIdle();
|
||||||
if (!liverpool->IsGpuIdle()) {
|
if (!liverpool->IsGpuIdle()) {
|
||||||
|
|
|
@ -659,7 +659,8 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span<const u32> dcb, std::span<c
|
||||||
// there are no other submits to yield to we can sleep the thread
|
// there are no other submits to yield to we can sleep the thread
|
||||||
// instead and allow other tasks to run.
|
// instead and allow other tasks to run.
|
||||||
const u64* wait_addr = wait_reg_mem->Address<u64*>();
|
const u64* wait_addr = wait_reg_mem->Address<u64*>();
|
||||||
if (vo_port->IsVoLabel(wait_addr) && num_submits == 1) {
|
if (vo_port->IsVoLabel(wait_addr) &&
|
||||||
|
num_submits == mapped_queues[GfxQueueId].submits.size()) {
|
||||||
vo_port->WaitVoLabel([&] { return wait_reg_mem->Test(); });
|
vo_port->WaitVoLabel([&] { return wait_reg_mem->Test(); });
|
||||||
}
|
}
|
||||||
while (!wait_reg_mem->Test()) {
|
while (!wait_reg_mem->Test()) {
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/config.h"
|
#include "common/config.h"
|
||||||
|
#include "common/debug.h"
|
||||||
#include "sdl_window.h"
|
#include "sdl_window.h"
|
||||||
#include "video_core/renderer_vulkan/liverpool_to_vk.h"
|
#include "video_core/renderer_vulkan/liverpool_to_vk.h"
|
||||||
#include "video_core/renderer_vulkan/vk_instance.h"
|
#include "video_core/renderer_vulkan/vk_instance.h"
|
||||||
|
@ -261,7 +262,8 @@ bool Instance::CreateDevice() {
|
||||||
// The next two extensions are required to be available together in order to support write masks
|
// The next two extensions are required to be available together in order to support write masks
|
||||||
color_write_en = add_extension(VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME);
|
color_write_en = add_extension(VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME);
|
||||||
color_write_en &= add_extension(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME);
|
color_write_en &= add_extension(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME);
|
||||||
const bool calibrated_timestamps = add_extension(VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME);
|
const bool calibrated_timestamps =
|
||||||
|
TRACY_GPU_ENABLED ? add_extension(VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) : false;
|
||||||
const bool robustness = add_extension(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME);
|
const bool robustness = add_extension(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME);
|
||||||
list_restart = add_extension(VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME);
|
list_restart = add_extension(VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME);
|
||||||
maintenance5 = add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
|
maintenance5 = add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
|
||||||
|
|
Loading…
Reference in a new issue