summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-29 06:05:19 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-29 06:05:19 +0000
commit3d92951b74f0e788432a0f3a35f452e74d936fce (patch)
treefe401a2770aac16a5ab39ecf70fdd4a9ff22f38a /Graphics/GraphicsEngineVulkan
parentReworked interface definitions to use DILIGENT_BEGIN_INTERFACE/DILIGENT_END_I... (diff)
downloadDiligentCore-3d92951b74f0e788432a0f3a35f452e74d936fce.tar.gz
DiligentCore-3d92951b74f0e788432a0f3a35f452e74d936fce.zip
Reworked C interface to optimize inheritance handling
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h14
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/BufferVk.h14
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h12
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h13
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h13
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/FenceVk.h13
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h12
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/QueryVk.h13
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h13
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/SamplerVk.h12
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h13
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/ShaderVk.h4
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h12
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h14
-rw-r--r--Graphics/GraphicsEngineVulkan/interface/TextureVk.h14
15 files changed, 69 insertions, 117 deletions
diff --git a/Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h b/Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h
index aee3dd94..79972847 100644
--- a/Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_BufferViewVk =
#define DILIGENT_INTERFACE_NAME IBufferViewVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IBufferViewVkInclusiveMethods \
+ IBufferViewInclusiveMethods; \
+ IBufferViewVkMethods BufferViewVk
+
// clang-format off
/// Exposes Vulkan-specific functionality of a buffer view object.
@@ -55,16 +59,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-// clang-format on
-
-struct IBufferViewVkVtbl
-{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct IBufferViewMethods BufferView;
- struct IBufferViewVkMethods BufferViewVk;
-};
-
// clang-format off
# define IBufferViewVk_GetVkBufferView(This) CALL_IFACE_METHOD(BufferViewVk, GetVkBufferView, This)
diff --git a/Graphics/GraphicsEngineVulkan/interface/BufferVk.h b/Graphics/GraphicsEngineVulkan/interface/BufferVk.h
index 5e444cf1..ea889795 100644
--- a/Graphics/GraphicsEngineVulkan/interface/BufferVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/BufferVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_BufferVk =
#define DILIGENT_INTERFACE_NAME IBufferVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IBufferVkInclusiveMethods \
+ IBufferInclusiveMethods; \
+ IBufferVkMethods BufferVk
+
// clang-format off
/// Exposes Vulkan-specific functionality of a buffer object.
@@ -65,16 +69,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-// clang-format on
-
-struct IBufferVkVtbl
-{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct IBufferMethods Buffer;
- struct IBufferVkMethods BufferVk;
-};
-
# define IBufferVk_GetVkBuffer(This) CALL_IFACE_METHOD(BufferVk, GetVkBuffer, This)
# define IBufferVk_SetAccessFlags(This, ...) CALL_IFACE_METHOD(BufferVk, SetAccessFlags, This, __VA_ARGS__)
# define IBufferVk_GetAccessFlags(This) CALL_IFACE_METHOD(BufferVk, GetAccessFlags, This)
diff --git a/Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h b/Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h
index 9a93b1ae..bbe77ea8 100644
--- a/Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_CommandQueueVk =
#define DILIGENT_INTERFACE_NAME ICommandQueueVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define ICommandQueueVkInclusiveMethods \
+ IObjectInclusiveMethods; \
+ ICommandQueueVkMethods CommandQueueVk
+
// clang-format off
/// Command queue interface
@@ -89,14 +93,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-// clang-format on
-
-struct ICommandQueueVkVtbl
-{
- struct IObjectMethods Object;
- struct ICommandQueueVkMethods CommandQueueVk;
-};
-
// clang-format off
# define ICommandQueueVk_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueVk, GetNextFenceValue, This)
diff --git a/Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h b/Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h
index bad568e4..7b7db331 100644
--- a/Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h
@@ -42,6 +42,10 @@ static const INTERFACE_ID IID_DeviceContextVk =
#define DILIGENT_INTERFACE_NAME IDeviceContextVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IDeviceContextVkInclusiveMethods \
+ IDeviceContextInclusiveMethods; \
+ IDeviceContextVkMethods DeviceContextVk
+
// clang-format off
/// Exposes Vulkan-specific functionality of a device context.
@@ -92,15 +96,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-// clang-format on
-
-struct IDeviceContextVkVtbl
-{
- struct IObjectMethods Object;
- struct IDeviceContextMethods DeviceContext;
- struct IDeviceContextVkMethods DeviceContextVk;
-};
-
// clang-format off
# define IDeviceContextVk_TransitionImageLayout(This, ...) CALL_IFACE_METHOD(DeviceContextVk, TransitionImageLayout, This, __VA_ARGS__)
diff --git a/Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h b/Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h
index f9c8ad39..eb9c1f58 100644
--- a/Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h
@@ -58,6 +58,10 @@ static const INTERFACE_ID IID_EngineFactoryVk =
#define DILIGENT_INTERFACE_NAME IEngineFactoryVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IEngineFactoryVkInclusiveMethods \
+ IEngineFactoryInclusiveMethods; \
+ IEngineFactoryVkMethods EngineFactoryVk
+
// clang-format off
DILIGENT_BEGIN_INTERFACE(IEngineFactoryVk, IEngineFactory)
@@ -86,15 +90,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-// clang-format on
-
-struct IEngineFactoryVkVtbl
-{
- struct IObjectMethods Object;
- struct IEngineFactoryMethods EngineFactory;
- struct IEngineFactoryVkMethods EngineFactoryVk;
-};
-
// clang-format off
# define IEngineFactoryVk_CreateDeviceAndContextsVk(This, ...) CALL_IFACE_METHOD(EngineFactoryVk, CreateDeviceAndContextsVk, This, __VA_ARGS__)
diff --git a/Graphics/GraphicsEngineVulkan/interface/FenceVk.h b/Graphics/GraphicsEngineVulkan/interface/FenceVk.h
index ffa851b8..f11424b4 100644
--- a/Graphics/GraphicsEngineVulkan/interface/FenceVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/FenceVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_FenceVk =
#define DILIGENT_INTERFACE_NAME IFenceVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IFenceVkInclusiveMethods \
+ IFenceInclusiveMethods
+//IFenceVkMethods FenceVk
+
// clang-format off
#if DILIGENT_CPP_INTERFACE
@@ -59,13 +63,10 @@ DILIGENT_END_INTERFACE
// clang-format off
-struct IFenceVkVtbl
+typedef struct IFenceVkVtbl
{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct IFenceMethods Fence;
- //struct IFenceVkMethods FenceVk;
-};
+ IFenceVkInclusiveMethods;
+} IFenceVkVtbl;
typedef struct IFenceVk
{
diff --git a/Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h b/Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h
index 453851a7..679b6e73 100644
--- a/Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_PipelineStateVk =
#define DILIGENT_INTERFACE_NAME IPipelineStateVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IPipelineStateVkInclusiveMethods \
+ IPipelineStateInclusiveMethods; \
+ IPipelineStateVkMethods PipelineStateVk
+
/// Exposes Vulkan-specific functionality of a pipeline state object.
DILIGENT_BEGIN_INTERFACE(IPipelineStateVk, IPipelineState)
{
@@ -56,14 +60,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-struct IPipelineStateVkVtbl
-{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct IPipelineStateMethods PipelineState;
- struct IPipelineStateVkMethods PipelineStateVk;
-};
-
// clang-format off
# define IPipelineStateVk_GetVkRenderPass(This) CALL_IFACE_METHOD(PipelineStateVk, GetVkRenderPass, This)
diff --git a/Graphics/GraphicsEngineVulkan/interface/QueryVk.h b/Graphics/GraphicsEngineVulkan/interface/QueryVk.h
index a5179258..b096407c 100644
--- a/Graphics/GraphicsEngineVulkan/interface/QueryVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/QueryVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_QueryVk =
#define DILIGENT_INTERFACE_NAME IQueryVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IQueryVkInclusiveMethods \
+ IQueryInclusiveMethods
+//IQueryVkMethods QueryVk
+
#if DILIGENT_CPP_INTERFACE
/// Exposes Vulkan-specific functionality of a Query object.
@@ -53,13 +57,10 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-struct IQueryVkVtbl
+typedef struct IQueryVkVtbl
{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct IQueryMethods Query;
- //struct IQueryVkMethods QueryVk;
-};
+ IQueryVkInclusiveMethods;
+} IQueryVkVtbl;
typedef struct IQueryVk
{
diff --git a/Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h b/Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h
index e0099db7..dfded94f 100644
--- a/Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_RenderDeviceVk =
#define DILIGENT_INTERFACE_NAME IRenderDeviceVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IRenderDeviceVkInclusiveMethods \
+ IRenderDeviceInclusiveMethods; \
+ IRenderDeviceVkMethods RenderDeviceVk
+
// clang-format off
/// Exposes Vulkan-specific functionality of a render device.
@@ -115,15 +119,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-// clang-format on
-
-struct IRenderDeviceVkVtbl
-{
- struct IObjectMethods Object;
- struct IRenderDeviceMethods RenderDevice;
- struct IRenderDeviceVkMethods RenderDeviceVk;
-};
-
// clang-format off
# define IRenderDeviceVk_GetVkDevice(This) CALL_IFACE_METHOD(RenderDeviceVk, GetVkDevice, This)
diff --git a/Graphics/GraphicsEngineVulkan/interface/SamplerVk.h b/Graphics/GraphicsEngineVulkan/interface/SamplerVk.h
index a86e1a3e..024cb9ab 100644
--- a/Graphics/GraphicsEngineVulkan/interface/SamplerVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/SamplerVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_SamplerVk =
#define DILIGENT_INTERFACE_NAME ISamplerVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define ISamplerVkInclusiveMethods \
+ ISamplerInclusiveMethods; \
+ ISamplerVkMethods SamplerVk
+
/// Exposes Vulkan-specific functionality of a sampler object.
DILIGENT_BEGIN_INTERFACE(ISamplerVk, ISampler)
{
@@ -53,14 +57,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-struct ISamplerVkVtbl
-{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- //struct ISamplerMethods Sampler;
- struct ISamplerVkMethods SamplerVk;
-};
-
# define ISamplerVk_GetVkSampler(This) CALL_IFACE_METHOD(SamplerVk, GetVkSampler, This)
#endif
diff --git a/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h b/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h
index 4c86b7ff..092fc05f 100644
--- a/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_ShaderResourceBindingVk =
#define DILIGENT_INTERFACE_NAME IShaderResourceBindingVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define IShaderResourceBindingVkInclusiveMethods \
+ IShaderResourceBindingInclusiveMethods
+//IShaderResourceBindingVkMethods ShaderResourceBindingVk
+
#if DILIGENT_CPP_INTERFACE
/// Exposes Vulkan-specific functionality of a shader resource binding object.
@@ -53,13 +57,10 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-struct IShaderResourceBindingVkVtbl
+typedef struct IShaderResourceBindingVkVtbl
{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct IShaderResourceBindingMethods ShaderResourceBinding;
- //struct IShaderResourceBindingVkMethods ShaderResourceBindingVk;
-};
+ IShaderResourceBindingVkInclusiveMethods;
+} IShaderResourceBindingVkVtbl;
#endif
diff --git a/Graphics/GraphicsEngineVulkan/interface/ShaderVk.h b/Graphics/GraphicsEngineVulkan/interface/ShaderVk.h
index 9382180a..9436821a 100644
--- a/Graphics/GraphicsEngineVulkan/interface/ShaderVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/ShaderVk.h
@@ -43,6 +43,10 @@ DILIGENT_BEGIN_NAMESPACE(Diligent)
static const INTERFACE_ID IID_ShaderVk =
{0x8b0c91b4, 0xb1d8, 0x4e03, {0x92, 0x50, 0xa7, 0xe, 0x13, 0x1a, 0x59, 0xfa}};
+#define IShaderVkInclusiveMethods \
+ IShaderInclusiveMethods; \
+ IShaderVkMethods ShaderVk
+
#if DILIGENT_CPP_INTERFACE
/// Exposes Vulkan-specific functionality of a shader object.
diff --git a/Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h b/Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h
index 532ffbcf..389a6ba5 100644
--- a/Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h
@@ -44,6 +44,10 @@ static const INTERFACE_ID IID_SwapChainVk =
#define DILIGENT_INTERFACE_NAME ISwapChainVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define ISwapChainVkInclusiveMethods \
+ ISwapChainInclusiveMethods; \
+ ISwapChainVkMethods SwapChainVk
+
/// Exposes Vulkan-specific functionality of a swap chain.
DILIGENT_BEGIN_INTERFACE(ISwapChainVk, ISwapChain)
{
@@ -56,14 +60,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-struct ISwapChainVkVtbl
-{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct ISwapChainMethods SwapChain;
- struct ISwapChainVkMethods SwapChainVk;
-};
-
// clang-format off
# define ISwapChainVk_GetVkSwapChain(This) CALL_IFACE_METHOD(SwapChainVk, GetVkSwapChain, This)
diff --git a/Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h b/Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h
index c6ee2438..f37ae72b 100644
--- a/Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_TextureViewVk =
#define DILIGENT_INTERFACE_NAME ITextureViewVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define ITextureViewVkInclusiveMethods \
+ ITextureViewInclusiveMethods; \
+ ITextureViewVkMethods TextureViewVk
+
// clang-format off
/// Exposes Vulkan-specific functionality of a texture view object.
@@ -55,16 +59,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-// clang-format on
-
-struct ITextureViewVkVtbl
-{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct ITextureViewMethods TextureView;
- struct ITextureViewVkMethods TextureViewVk;
-};
-
// clang-format off
# define ITextureViewVk_GetVulkanImageView(This) CALL_IFACE_METHOD(TextureViewVk, GetVulkanImageView, This)
diff --git a/Graphics/GraphicsEngineVulkan/interface/TextureVk.h b/Graphics/GraphicsEngineVulkan/interface/TextureVk.h
index 7dd96782..c1f99888 100644
--- a/Graphics/GraphicsEngineVulkan/interface/TextureVk.h
+++ b/Graphics/GraphicsEngineVulkan/interface/TextureVk.h
@@ -41,6 +41,10 @@ static const INTERFACE_ID IID_TextureVk =
#define DILIGENT_INTERFACE_NAME ITextureVk
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
+#define ITextureVkInclusiveMethods \
+ ITextureInclusiveMethods; \
+ ITextureVkMethods TextureVk
+
// clang-format off
/// Exposes Vulkan-specific functionality of a texture object.
@@ -68,16 +72,6 @@ DILIGENT_END_INTERFACE
#if DILIGENT_C_INTERFACE
-// clang-format on
-
-struct ITextureVkVtbl
-{
- struct IObjectMethods Object;
- struct IDeviceObjectMethods DeviceObject;
- struct ITextureMethods Texture;
- struct ITextureVkMethods TextureVk;
-};
-
// clang-format off
# define ITextureVk_GetVkImage(This) CALL_IFACE_METHOD(TextureVk, GetVkImage,This)