SRSDK  0.10.39
Loading...
Searching...
No Matches
interlacer.vulkan.hpp
Go to the documentation of this file.
1#ifndef CNSDK_LEIA_CORE_CXX_INTERLACER_VULKAN_HPP
2#define CNSDK_LEIA_CORE_CXX_INTERLACER_VULKAN_HPP
3
6
12namespace leia {
13
18public:
20 InterlacerInitConfiguration const& config,
21 VkDevice device,
22 VkPhysicalDevice physicalDevice,
23 VkFormatInt renderTargetFormat,
24 VkFormatInt depthStencilFormat,
25 int32_t maxInFlightFrameCount)
26 : Interlacer(leia_interlacer_vulkan_initialize(
27 core.GetHandle(), config.GetHandle(), device, physicalDevice, renderTargetFormat, depthStencilFormat, maxInFlightFrameCount),
28 true)
29 {
30 }
35
36 void DoPostProcess(int32_t width,
37 int32_t height,
38 bool blendedInterlace,
39 VkFramebuffer frameBuffer,
40 VkImage colorImage,
41 VkImage depthImage,
42 VkSemaphore imageAvailableSemaphore,
43 VkSemaphore renderFinishedSemaphore,
44 int32_t currentFrame)
45 {
46 leia_interlacer_vulkan_do_post_process(
47 _interlacer, width, height, blendedInterlace, frameBuffer, colorImage, depthImage, imageAvailableSemaphore, renderFinishedSemaphore, currentFrame);
48 }
49
62 void SetSourceViews(VkImage texture, VkImageView textureView, int32_t viewIndex = 0, int layer = 0)
63 {
64 leia_interlacer_vulkan_set_source_views(_interlacer, texture, textureView, viewIndex, layer);
65 }
66
67 InterlacerVulkan(leia_interlacer* nonOwningInterlacer) : Interlacer(nonOwningInterlacer, false)
68 {
69 }
70};
71
74{
75 if (interlacer && interlacer->GetGraphicsAPI() == LEIA_GRAPHICS_API_VULKAN)
76 {
77 return static_cast<InterlacerVulkan*>(interlacer);
78 }
79 return nullptr;
80}
81
82} // namespace leia
83
88#endif // CNSDK_LEIA_CORE_CXX_INTERLACER_VULKAN_HPP
C++ wrapper for leia_core.
Definition core.hpp:151
C++ wrapper for leia_interlacer.
Definition interlacer.hpp:26
leia_interlacer * _interlacer
Definition interlacer.hpp:367
LEIA_NODISCARD GraphicsAPI GetGraphicsAPI()
Definition interlacer.hpp:344
LEIA_NODISCARD leia_interlacer * GetHandle() const
Definition interlacer.hpp:350
C++ wrapper for leia_interlacer_init_configuration.
Definition interlacer.hpp:604
C++ wrapper for Vulkan leia_interlacer.
Definition interlacer.vulkan.hpp:17
void SetSourceViews(VkImage texture, VkImageView textureView, int32_t viewIndex=0, int layer=0)
Set Vulkan view texture.
Definition interlacer.vulkan.hpp:62
void DoPostProcess(int32_t width, int32_t height, bool blendedInterlace, VkFramebuffer frameBuffer, VkImage colorImage, VkImage depthImage, VkSemaphore imageAvailableSemaphore, VkSemaphore renderFinishedSemaphore, int32_t currentFrame)
Definition interlacer.vulkan.hpp:36
InterlacerVulkan & operator=(InterlacerVulkan const &)=delete
InterlacerVulkan(InterlacerVulkan const &)=delete
InterlacerVulkan & operator=(InterlacerVulkan &&)=default
InterlacerVulkan(Core &core, InterlacerInitConfiguration const &config, VkDevice device, VkPhysicalDevice physicalDevice, VkFormatInt renderTargetFormat, VkFormatInt depthStencilFormat, int32_t maxInFlightFrameCount)
Definition interlacer.vulkan.hpp:19
InterlacerVulkan(leia_interlacer *nonOwningInterlacer)
Definition interlacer.vulkan.hpp:67
InterlacerVulkan(InterlacerVulkan &&)=default
@ LEIA_GRAPHICS_API_VULKAN
Definition types.h:17
#define LEIA_NODISCARD
Definition defines.h:86
struct VkPhysicalDevice_T * VkPhysicalDevice
Definition interlacer.vulkan.h:11
struct VkImageView_T * VkImageView
Definition interlacer.vulkan.h:14
int32_t VkFormatInt
Definition interlacer.vulkan.h:19
struct VkFramebuffer_T * VkFramebuffer
Definition interlacer.vulkan.h:12
struct VkDevice_T * VkDevice
Definition interlacer.vulkan.h:10
struct VkSemaphore_T * VkSemaphore
Definition interlacer.vulkan.h:15
struct VkImage_T * VkImage
Definition interlacer.vulkan.h:13
Definition types.hpp:10
LEIA_NODISCARD InterlacerVulkan * AsVulkan(Interlacer *interlacer)
Definition interlacer.vulkan.hpp:73
The main entity used for performing interlacing on Leia devices.
Definition interlacer.h:41