summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-07-24 00:28:38 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-08-02 19:21:34 +0000
commitd8584bffd8b32b71174983fa3f38694b65d42945 (patch)
treef7bc8fef6a95d82ec24173b5283a2a85fe06822f /Graphics/GraphicsEngineVulkan
parentFixed Metal build error (diff)
downloadDiligentCore-d8584bffd8b32b71174983fa3f38694b65d42945.tar.gz
DiligentCore-d8584bffd8b32b71174983fa3f38694b65d42945.zip
Added IRenderPassVk interface
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/CMakeLists.txt1
-rw-r--r--Graphics/GraphicsEngineVulkan/include/RenderPassVkImpl.hpp12
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/RenderPassVk.h64
3 files changed, 75 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
index 1696283c..102044b7 100644
--- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt
+++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
@@ -61,6 +61,7 @@ set(INTERFACE
interface/PipelineStateVk.h
interface/QueryVk.h
interface/RenderDeviceVk.h
+ interface/RenderPassVk.h
interface/SamplerVk.h
interface/ShaderVk.h
interface/ShaderResourceBindingVk.h
diff --git a/Graphics/GraphicsEngineVulkan/include/RenderPassVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/RenderPassVkImpl.hpp
index bc50624f..9cf34e08 100644
--- a/Graphics/GraphicsEngineVulkan/include/RenderPassVkImpl.hpp
+++ b/Graphics/GraphicsEngineVulkan/include/RenderPassVkImpl.hpp
@@ -31,8 +31,10 @@
/// Declaration of Diligent::RenderPassVkImpl class
#include "RenderDeviceVk.h"
+#include "RenderPassVk.h"
#include "RenderPassBase.hpp"
#include "RenderDeviceVkImpl.hpp"
+#include "VulkanUtilities/VulkanObjectWrappers.hpp"
namespace Diligent
{
@@ -40,15 +42,21 @@ namespace Diligent
class FixedBlockMemoryAllocator;
/// Render pass implementation in Direct3D11 backend.
-class RenderPassVkImpl final : public RenderPassBase<IRenderPass, RenderDeviceVkImpl>
+class RenderPassVkImpl final : public RenderPassBase<IRenderPassVk, RenderDeviceVkImpl>
{
public:
- using TRenderPassBase = RenderPassBase<IRenderPass, RenderDeviceVkImpl>;
+ using TRenderPassBase = RenderPassBase<IRenderPassVk, RenderDeviceVkImpl>;
RenderPassVkImpl(IReferenceCounters* pRefCounters,
RenderDeviceVkImpl* pDevice,
const RenderPassDesc& Desc);
~RenderPassVkImpl();
+
+ /// Implementation of ISamplerVk::GetVkRenderPass().
+ virtual VkRenderPass DILIGENT_CALL_TYPE GetVkRenderPass() const override final { return m_VkRenderPass; }
+
+private:
+ VulkanUtilities::RenderPassWrapper m_VkRenderPass;
};
} // namespace Diligent
diff --git a/Graphics/GraphicsEngineVulkan/interface/RenderPassVk.h b/Graphics/GraphicsEngineVulkan/interface/RenderPassVk.h
new file mode 100644
index 00000000..6096e723
--- /dev/null
+++ b/Graphics/GraphicsEngineVulkan/interface/RenderPassVk.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2019-2020 Diligent Graphics LLC
+ * Copyright 2015-2019 Egor Yusov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * In no event and under no legal theory, whether in tort (including negligence),
+ * contract, or otherwise, unless required by applicable law (such as deliberate
+ * and grossly negligent acts) or agreed to in writing, shall any Contributor be
+ * liable for any damages, including any direct, indirect, special, incidental,
+ * or consequential damages of any character arising as a result of this License or
+ * out of the use or inability to use the software (including but not limited to damages
+ * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
+ * all other commercial damages or losses), even if such Contributor has been advised
+ * of the possibility of such damages.
+ */
+
+#pragma once
+
+/// \file
+/// Definition of the Diligent::IRenderPassVk interface
+
+#include "../../GraphicsEngine/interface/RenderPass.h"
+
+DILIGENT_BEGIN_NAMESPACE(Diligent)
+
+// {3DE6938F-D34D-4135-A6FA-15A89E9525D0}
+static const INTERFACE_ID IID_RenderPassVk =
+ {0x3de6938f, 0xd34d, 0x4135, {0xa6, 0xfa, 0x15, 0xa8, 0x9e, 0x95, 0x25, 0xd0}};
+
+#define DILIGENT_INTERFACE_NAME IRenderPassVk
+#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+
+#define IRenderPassVkInclusiveMethods \
+ /*IRenderPassInclusiveMethods*/ IDeviceObjectInclusiveMethods; \
+ IRenderPassVkMethods RenderPassVk
+
+/// Exposes Vulkan-specific functionality of a RenderPass object.
+DILIGENT_BEGIN_INTERFACE(IRenderPassVk, IRenderPass)
+{
+ /// Returns a Vulkan RenderPass object handle
+ VIRTUAL VkRenderPass METHOD(GetVkRenderPass)() CONST PURE;
+};
+DILIGENT_END_INTERFACE
+
+#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
+
+#if DILIGENT_C_INTERFACE
+
+# define IRenderPassVk_GetVkRenderPass(This) CALL_IFACE_METHOD(RenderPassVk, GetVkRenderPass, This)
+
+#endif
+
+DILIGENT_END_NAMESPACE // namespace Diligent