mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
54 lines
1.7 KiB
C++
54 lines
1.7 KiB
C++
#ifndef EMULATOR_SRC_GRAPHICS_PRESENTATION_WINDOW_WINDOWINTERNAL_H_
|
|
#define EMULATOR_SRC_GRAPHICS_PRESENTATION_WINDOW_WINDOWINTERNAL_H_
|
|
|
|
#include "SDL_video.h"
|
|
#include "common/threads.h"
|
|
#include "graphics/host_gpu/graphicContext.h"
|
|
#include "graphics/host_gpu/vulkanCommon.h"
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
namespace Libs::Graphics {
|
|
|
|
struct WindowGame;
|
|
|
|
struct SurfaceCapabilities {
|
|
vk::SurfaceCapabilitiesKHR capabilities {};
|
|
std::vector<vk::SurfaceFormatKHR> formats;
|
|
std::vector<vk::PresentModeKHR> present_modes;
|
|
bool format_srgb_bgra32 = false;
|
|
bool format_unorm_bgra32 = false;
|
|
};
|
|
|
|
struct WindowContext {
|
|
GraphicContext graphic_ctx;
|
|
VulkanSwapchain* swapchain = nullptr;
|
|
SDL_Window* window = nullptr;
|
|
bool window_hidden = true;
|
|
vk::SurfaceKHR surface = nullptr;
|
|
SurfaceCapabilities* surface_capabilities = nullptr;
|
|
WindowGame* game = nullptr;
|
|
|
|
char device_name[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] = {0};
|
|
char processor_name[64] = {0};
|
|
|
|
Common::Mutex mutex;
|
|
bool graphic_initialized = false;
|
|
Common::CondVar graphic_initialized_condvar;
|
|
};
|
|
|
|
extern WindowContext* g_window_ctx;
|
|
|
|
void VulkanGetSurfaceCapabilities(vk::PhysicalDevice physical_device, vk::SurfaceKHR surface,
|
|
SurfaceCapabilities* capabilities);
|
|
VulkanSwapchain* VulkanCreateSwapchain(GraphicContext* ctx, uint32_t image_count);
|
|
void VulkanCreate(WindowContext* ctx);
|
|
|
|
void WindowUpdateIcon();
|
|
void WindowUpdateTitle();
|
|
|
|
} // namespace Libs::Graphics
|
|
|
|
#endif // EMULATOR_SRC_GRAPHICS_PRESENTATION_WINDOW_WINDOWINTERNAL_H_
|