sceVideoOutGetFlipStatus implementation
This commit is contained in:
parent
fd8dc05313
commit
5b6bbfc327
|
@ -31,4 +31,12 @@ VideoConfigInternal* VideoOutCtx::getCtx(int handle) {
|
||||||
if (handle != 1) return nullptr;
|
if (handle != 1) return nullptr;
|
||||||
return &m_video_out_ctx; // assuming that it's the only ctx TODO check if we need more
|
return &m_video_out_ctx; // assuming that it's the only ctx TODO check if we need more
|
||||||
}
|
}
|
||||||
}; // namespace HLE::Graphics::Objects
|
|
||||||
|
void FlipQueue::getFlipStatus(VideoConfigInternal* cfg, SceVideoOutFlipStatus* out) {
|
||||||
|
Lib::LockMutexGuard lock(m_mutex);
|
||||||
|
|
||||||
|
*out = cfg->m_flip_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
}; // namespace HLE::Graphics::Objects
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@ using namespace HLE::Libs::Graphics::VideoOut;
|
||||||
|
|
||||||
namespace HLE::Graphics::Objects {
|
namespace HLE::Graphics::Objects {
|
||||||
|
|
||||||
|
//class FlipQueue;
|
||||||
|
|
||||||
struct VideoConfigInternal {
|
struct VideoConfigInternal {
|
||||||
Lib::Mutex m_mutex;
|
Lib::Mutex m_mutex;
|
||||||
SceVideoOutResolutionStatus m_resolution;
|
SceVideoOutResolutionStatus m_resolution;
|
||||||
|
@ -16,6 +18,17 @@ struct VideoConfigInternal {
|
||||||
int m_flip_rate = 0;
|
int m_flip_rate = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class FlipQueue {
|
||||||
|
public:
|
||||||
|
FlipQueue() {}
|
||||||
|
virtual ~FlipQueue() {}
|
||||||
|
|
||||||
|
void getFlipStatus(VideoConfigInternal* cfg, SceVideoOutFlipStatus* out);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Lib::Mutex m_mutex;
|
||||||
|
};
|
||||||
|
|
||||||
class VideoOutCtx {
|
class VideoOutCtx {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -24,8 +37,10 @@ class VideoOutCtx {
|
||||||
void Init(u32 width, u32 height);
|
void Init(u32 width, u32 height);
|
||||||
int Open();
|
int Open();
|
||||||
VideoConfigInternal* getCtx(int handle);
|
VideoConfigInternal* getCtx(int handle);
|
||||||
|
FlipQueue& getFlipQueue() { return m_flip_queue; }
|
||||||
private:
|
private:
|
||||||
Lib::Mutex m_mutex;
|
Lib::Mutex m_mutex;
|
||||||
VideoConfigInternal m_video_out_ctx;
|
VideoConfigInternal m_video_out_ctx;
|
||||||
|
FlipQueue m_flip_queue;
|
||||||
};
|
};
|
||||||
}; // namespace HLE::Graphics::Objects
|
}; // namespace HLE::Graphics::Objects
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
#include <magic_enum.hpp>
|
#include <magic_enum.hpp>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "Objects/video_out_ctx.h"
|
#include "Objects/video_out_ctx.h"
|
||||||
|
|
||||||
#include "Util/Singleton.h"
|
#include "Util/Singleton.h"
|
||||||
|
|
||||||
namespace HLE::Libs::Graphics::VideoOut {
|
namespace HLE::Libs::Graphics::VideoOut {
|
||||||
|
@ -116,8 +116,19 @@ s32 PS4_SYSV_ABI sceVideoOutSubmitFlip(s32 handle, s32 bufferIndex, s32 flipMode
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
s32 PS4_SYSV_ABI sceVideoOutGetFlipStatus(s32 handle, SceVideoOutFlipStatus* status) {
|
s32 PS4_SYSV_ABI sceVideoOutGetFlipStatus(s32 handle, SceVideoOutFlipStatus* status) {
|
||||||
// BREAKPOINT();
|
PRINT_FUNCTION_NAME();
|
||||||
PRINT_DUMMY_FUNCTION_NAME();
|
auto* videoOut = Singleton<HLE::Graphics::Objects::VideoOutCtx>::Instance();
|
||||||
|
auto* ctx = videoOut->getCtx(handle);
|
||||||
|
videoOut->getFlipQueue().getFlipStatus(ctx, status);
|
||||||
|
|
||||||
|
LOG_INFO_IF(log_file_videoout, "count = {}\n", status->count);
|
||||||
|
LOG_INFO_IF(log_file_videoout, "processTime = {}\n", status->processTime);
|
||||||
|
LOG_INFO_IF(log_file_videoout, "tsc = {}\n", status->tsc);
|
||||||
|
LOG_INFO_IF(log_file_videoout, "submitTsc = {}\n", status->submitTsc);
|
||||||
|
LOG_INFO_IF(log_file_videoout, "flipArg = {}\n", status->flipArg);
|
||||||
|
LOG_INFO_IF(log_file_videoout, "gcQueueNum = {}\n", status->gcQueueNum);
|
||||||
|
LOG_INFO_IF(log_file_videoout, "flipPendingNum = {}\n", status->flipPendingNum);
|
||||||
|
LOG_INFO_IF(log_file_videoout, "currentBuffer = {}\n", status->currentBuffer);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
s32 PS4_SYSV_ABI sceVideoOutGetResolutionStatus(s32 handle, SceVideoOutResolutionStatus* status) {
|
s32 PS4_SYSV_ABI sceVideoOutGetResolutionStatus(s32 handle, SceVideoOutResolutionStatus* status) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace HLE::Libs::LibKernel {
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceKernelWaitEqueue(/*SceKernelEqueue eq, SceKernelEvent* ev,*/ int num, int* out /*, SceKernelUseconds* timo*/)
|
int PS4_SYSV_ABI sceKernelWaitEqueue(/*SceKernelEqueue eq, SceKernelEvent* ev,*/ int num, int* out /*, SceKernelUseconds* timo*/)
|
||||||
{
|
{
|
||||||
BREAKPOINT();
|
PRINT_DUMMY_FUNCTION_NAME();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include "LibSceGnmDriver.h"
|
#include "LibSceGnmDriver.h"
|
||||||
#include "Libs.h"
|
#include "Libs.h"
|
||||||
#include "../Loader/Elf.h"
|
#include "../Loader/Elf.h"
|
||||||
|
#include <Util/log.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
namespace HLE::Libs::LibSceGnmDriver {
|
namespace HLE::Libs::LibSceGnmDriver {
|
||||||
|
|
||||||
|
@ -61,7 +63,9 @@ namespace HLE::Libs::LibSceGnmDriver {
|
||||||
{ return 0;
|
{ return 0;
|
||||||
}
|
}
|
||||||
int32_t sceGnmSubmitDone()
|
int32_t sceGnmSubmitDone()
|
||||||
{ return 0;
|
{
|
||||||
|
PRINT_DUMMY_FUNCTION_NAME();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
int /* MipStatsError*/ sceGnmDisableMipStatsReport()
|
int /* MipStatsError*/ sceGnmDisableMipStatsReport()
|
||||||
{ return 0;
|
{ return 0;
|
||||||
|
@ -84,7 +88,8 @@ namespace HLE::Libs::LibSceGnmDriver {
|
||||||
void sceGnmDriverTraceInProgress(){}
|
void sceGnmDriverTraceInProgress(){}
|
||||||
void sceGnmDriverTriggerCapture(){}
|
void sceGnmDriverTriggerCapture(){}
|
||||||
void sceGnmEndWorkload(){}
|
void sceGnmEndWorkload(){}
|
||||||
void sceGnmFlushGarlic(){}
|
void sceGnmFlushGarlic() { PRINT_DUMMY_FUNCTION_NAME();
|
||||||
|
}
|
||||||
void sceGnmGetEqEventType(){}
|
void sceGnmGetEqEventType(){}
|
||||||
void sceGnmGetEqTimeStamp(){}
|
void sceGnmGetEqTimeStamp(){}
|
||||||
void sceGnmGetGpuBlockStatus(){}
|
void sceGnmGetGpuBlockStatus(){}
|
||||||
|
|
Loading…
Reference in New Issue