mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Vulkan: Implement post-processing backend
No new features, just parity with OpenGL.
This commit is contained in:
45
Source/Core/VideoBackends/Vulkan/PostProcessing.h
Normal file
45
Source/Core/VideoBackends/Vulkan/PostProcessing.h
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "VideoBackends/Vulkan/VulkanContext.h"
|
||||
|
||||
#include "VideoCommon/PostProcessing.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
|
||||
namespace Vulkan
|
||||
{
|
||||
class Texture2D;
|
||||
|
||||
class VulkanPostProcessing : public PostProcessingShaderImplementation
|
||||
{
|
||||
public:
|
||||
VulkanPostProcessing() = default;
|
||||
~VulkanPostProcessing();
|
||||
|
||||
bool Initialize(const Texture2D* font_texture);
|
||||
|
||||
void BlitFromTexture(const TargetRectangle& dst, const TargetRectangle& src,
|
||||
const Texture2D* src_tex, int src_layer, VkRenderPass render_pass);
|
||||
|
||||
void UpdateConfig();
|
||||
|
||||
private:
|
||||
size_t CalculateUniformsSize() const;
|
||||
void FillUniformBuffer(u8* buf, const TargetRectangle& src, const Texture2D* src_tex,
|
||||
int src_layer);
|
||||
|
||||
bool CompileDefaultShader();
|
||||
bool RecompileShader();
|
||||
std::string GetGLSLUniformBlock() const;
|
||||
|
||||
const Texture2D* m_font_texture = nullptr;
|
||||
VkShaderModule m_fragment_shader = VK_NULL_HANDLE;
|
||||
VkShaderModule m_default_fragment_shader = VK_NULL_HANDLE;
|
||||
};
|
||||
|
||||
} // namespace
|
Reference in New Issue
Block a user