mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Move most backend functionality to VideoCommon
This commit is contained in:
@ -10,13 +10,14 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/WindowSystemInfo.h"
|
||||
#include "VideoBackends/Vulkan/Constants.h"
|
||||
#include "VideoBackends/Vulkan/Texture2D.h"
|
||||
#include "VideoCommon/TextureConfig.h"
|
||||
|
||||
namespace Vulkan
|
||||
{
|
||||
class CommandBufferManager;
|
||||
class ObjectCache;
|
||||
class VKTexture;
|
||||
class VKFramebuffer;
|
||||
|
||||
class SwapChain
|
||||
{
|
||||
@ -44,19 +45,14 @@ public:
|
||||
{
|
||||
return m_swap_chain_images[m_current_swap_chain_image_index].image;
|
||||
}
|
||||
Texture2D* GetCurrentTexture() const
|
||||
VKTexture* GetCurrentTexture() const
|
||||
{
|
||||
return m_swap_chain_images[m_current_swap_chain_image_index].texture.get();
|
||||
}
|
||||
VkFramebuffer GetCurrentFramebuffer() const
|
||||
VKFramebuffer* GetCurrentFramebuffer() const
|
||||
{
|
||||
return m_swap_chain_images[m_current_swap_chain_image_index].framebuffer;
|
||||
return m_swap_chain_images[m_current_swap_chain_image_index].framebuffer.get();
|
||||
}
|
||||
VkRenderPass GetLoadRenderPass() const { return m_render_pass; }
|
||||
VkRenderPass GetClearRenderPass() const { return m_clear_render_pass; }
|
||||
VkSemaphore GetImageAvailableSemaphore() const { return m_image_available_semaphore; }
|
||||
VkSemaphore GetRenderingFinishedSemaphore() const { return m_rendering_finished_semaphore; }
|
||||
|
||||
VkResult AcquireNextImage();
|
||||
|
||||
bool RecreateSurface(void* native_handle);
|
||||
@ -67,9 +63,6 @@ public:
|
||||
bool SetVSync(bool enabled);
|
||||
|
||||
private:
|
||||
bool CreateSemaphores();
|
||||
void DestroySemaphores();
|
||||
|
||||
bool SelectSurfaceFormat();
|
||||
bool SelectPresentMode();
|
||||
|
||||
@ -84,8 +77,8 @@ private:
|
||||
struct SwapChainImage
|
||||
{
|
||||
VkImage image;
|
||||
std::unique_ptr<Texture2D> texture;
|
||||
VkFramebuffer framebuffer;
|
||||
std::unique_ptr<VKTexture> texture;
|
||||
std::unique_ptr<VKFramebuffer> framebuffer;
|
||||
};
|
||||
|
||||
WindowSystemInfo m_wsi;
|
||||
@ -99,12 +92,6 @@ private:
|
||||
std::vector<SwapChainImage> m_swap_chain_images;
|
||||
u32 m_current_swap_chain_image_index = 0;
|
||||
|
||||
VkSemaphore m_image_available_semaphore = VK_NULL_HANDLE;
|
||||
VkSemaphore m_rendering_finished_semaphore = VK_NULL_HANDLE;
|
||||
|
||||
VkRenderPass m_render_pass = VK_NULL_HANDLE;
|
||||
VkRenderPass m_clear_render_pass = VK_NULL_HANDLE;
|
||||
|
||||
u32 m_width = 0;
|
||||
u32 m_height = 0;
|
||||
u32 m_layers = 0;
|
||||
|
Reference in New Issue
Block a user