mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
VideoCommon: Add support for Abstract Framebuffers
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include <memory>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#include "VideoCommon/AbstractFramebuffer.h"
|
||||
#include "VideoCommon/AbstractStagingTexture.h"
|
||||
#include "VideoCommon/AbstractTexture.h"
|
||||
|
||||
@ -80,4 +81,32 @@ private:
|
||||
VkFence m_flush_fence = VK_NULL_HANDLE;
|
||||
};
|
||||
|
||||
class VKFramebuffer final : public AbstractFramebuffer
|
||||
{
|
||||
public:
|
||||
VKFramebuffer(const VKTexture* color_attachment, const VKTexture* depth_attachment, u32 width,
|
||||
u32 height, u32 layers, u32 samples, VkFramebuffer fb,
|
||||
VkRenderPass load_render_pass, VkRenderPass discard_render_pass,
|
||||
VkRenderPass clear_render_pass);
|
||||
~VKFramebuffer() override;
|
||||
|
||||
VkFramebuffer GetFB() const { return m_fb; }
|
||||
VkRenderPass GetLoadRenderPass() const { return m_load_render_pass; }
|
||||
VkRenderPass GetDiscardRenderPass() const { return m_discard_render_pass; }
|
||||
VkRenderPass GetClearRenderPass() const { return m_clear_render_pass; }
|
||||
void TransitionForRender() const;
|
||||
void TransitionForSample() const;
|
||||
|
||||
static std::unique_ptr<VKFramebuffer> Create(const VKTexture* color_attachments,
|
||||
const VKTexture* depth_attachment);
|
||||
|
||||
protected:
|
||||
const VKTexture* m_color_attachment;
|
||||
const VKTexture* m_depth_attachment;
|
||||
VkFramebuffer m_fb;
|
||||
VkRenderPass m_load_render_pass;
|
||||
VkRenderPass m_discard_render_pass;
|
||||
VkRenderPass m_clear_render_pass;
|
||||
};
|
||||
|
||||
} // namespace Vulkan
|
||||
|
Reference in New Issue
Block a user