mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
format source files
This commit is contained in:
@@ -18,11 +18,11 @@ struct DisplayBufferImage {
|
||||
};
|
||||
|
||||
DisplayBufferImage DisplayBufferFind(uint64_t addr, bool render_target = false);
|
||||
int DisplayBufferSubmitFlipFromGpu(Graphics::CommandBuffer* buffer, int handle, int index,
|
||||
int flip_mode, int64_t flip_arg, uint64_t* request_id);
|
||||
int DisplayBufferSubmitFlipFromGpu(Graphics::CommandBuffer* buffer, int handle, int index,
|
||||
int flip_mode, int64_t flip_arg, uint64_t* request_id);
|
||||
uint64_t DisplayBufferPrepareNextFlipOnGpu(Graphics::CommandBuffer* buffer);
|
||||
void DisplayBufferCompleteFlipFromGpu(uint64_t request_id);
|
||||
void DisplayBufferWaitForFlipQueueSlot();
|
||||
void DisplayBufferCompleteFlipFromGpu(uint64_t request_id);
|
||||
void DisplayBufferWaitForFlipQueueSlot();
|
||||
|
||||
} // namespace Libs::Presentation
|
||||
|
||||
|
||||
@@ -163,28 +163,28 @@ public:
|
||||
virtual ~FlipQueue() { KYTY_NOT_IMPLEMENTED; }
|
||||
KYTY_CLASS_NO_COPY(FlipQueue);
|
||||
|
||||
bool Reserve(VideoOutConfig* cfg, int index, int64_t flip_arg, bool gpu_eop,
|
||||
uint64_t* request_id);
|
||||
void Prepare(uint64_t request_id, Graphics::CommandBuffer* buffer);
|
||||
bool Reserve(VideoOutConfig* cfg, int index, int64_t flip_arg, bool gpu_eop,
|
||||
uint64_t* request_id);
|
||||
void Prepare(uint64_t request_id, Graphics::CommandBuffer* buffer);
|
||||
uint64_t PrepareNextCpu(Graphics::CommandBuffer* buffer);
|
||||
void Complete(uint64_t request_id);
|
||||
void WaitForSubmitSlot();
|
||||
bool Flip(uint32_t micros);
|
||||
bool HasPending(VideoOutConfig* cfg, int start_index, int count);
|
||||
void GetFlipStatus(VideoOutConfig* cfg, VideoOutFlipStatus* out);
|
||||
void Wait(VideoOutConfig* cfg, int index);
|
||||
void Complete(uint64_t request_id);
|
||||
void WaitForSubmitSlot();
|
||||
bool Flip(uint32_t micros);
|
||||
bool HasPending(VideoOutConfig* cfg, int start_index, int count);
|
||||
void GetFlipStatus(VideoOutConfig* cfg, VideoOutFlipStatus* out);
|
||||
void Wait(VideoOutConfig* cfg, int index);
|
||||
|
||||
private:
|
||||
enum class RequestState { Reserved, Recording, Ready, Presenting };
|
||||
|
||||
struct Request {
|
||||
uint64_t id;
|
||||
VideoOutConfig* cfg;
|
||||
int index;
|
||||
int64_t flip_arg;
|
||||
uint64_t submit_ptc;
|
||||
bool gpu_eop;
|
||||
RequestState state;
|
||||
uint64_t id;
|
||||
VideoOutConfig* cfg;
|
||||
int index;
|
||||
int64_t flip_arg;
|
||||
uint64_t submit_ptc;
|
||||
bool gpu_eop;
|
||||
RequestState state;
|
||||
Graphics::PreparedFrame* frame;
|
||||
};
|
||||
|
||||
@@ -194,7 +194,7 @@ private:
|
||||
Common::CondVar m_done_cond_var;
|
||||
std::list<Request> m_requests;
|
||||
std::list<Request> m_cpu_requests;
|
||||
bool m_processing = false;
|
||||
bool m_processing = false;
|
||||
uint64_t m_next_request_id = 1;
|
||||
};
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ VkSurfaceCapabilitiesKHR* VulkanGetSurfaceCapabilities();
|
||||
|
||||
GraphicContext* WindowGetGraphicContext();
|
||||
|
||||
void WindowInit(uint32_t width, uint32_t height);
|
||||
void WindowRun();
|
||||
void WindowWaitForGraphicInitialized();
|
||||
void WindowInit(uint32_t width, uint32_t height);
|
||||
void WindowRun();
|
||||
void WindowWaitForGraphicInitialized();
|
||||
PreparedFrame* WindowPrepareFrame(CommandBuffer* buffer, VideoOutVulkanImage* image);
|
||||
PreparedFrame* WindowPrepareBlankFrame(CommandBuffer* buffer, uint32_t width, uint32_t height,
|
||||
bool opaque);
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
namespace Libs::Graphics {
|
||||
|
||||
struct PreparedFrame {
|
||||
VulkanImage image {VulkanImageType::Unknown};
|
||||
VulkanImage image {VulkanImageType::Unknown};
|
||||
std::unique_ptr<CommandBuffer> present_commands;
|
||||
bool busy = false;
|
||||
bool busy = false;
|
||||
};
|
||||
|
||||
class PreparedFramePool {
|
||||
@@ -385,7 +385,8 @@ static void VulkanRecreateSwapchain() {
|
||||
}
|
||||
|
||||
static void ValidatePreparedCommand(CommandBuffer* buffer) {
|
||||
if (buffer == nullptr || buffer->IsInvalid() || buffer->GetQueue() != GraphicContext::QUEUE_GFX) {
|
||||
if (buffer == nullptr || buffer->IsInvalid() ||
|
||||
buffer->GetQueue() != GraphicContext::QUEUE_GFX) {
|
||||
EXIT("prepared frames must be recorded on the graphics queue\n");
|
||||
}
|
||||
EXIT_IF(g_render_ctx == nullptr);
|
||||
|
||||
Reference in New Issue
Block a user