summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-28 18:45:43 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-28 18:45:43 +0000
commit5e9b0dd7fb610e326739676aa0a0d9615a8e9c2d (patch)
tree76b4d1299cb573311918f0ac566a157e029e67bc /Graphics/GraphicsEngineD3D11
parentReworked IShaderD3D::GetHLSLResource method to be compatible wit C (diff)
downloadDiligentCore-5e9b0dd7fb610e326739676aa0a0d9615a8e9c2d.tar.gz
DiligentCore-5e9b0dd7fb610e326739676aa0a0d9615a8e9c2d.zip
Reworked C inteface method calls to use CALL_IFACE_METHOD macro
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h10
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h20
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h10
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h6
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h2
12 files changed, 31 insertions, 31 deletions
diff --git a/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h b/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
index 75c4da50..d5172c05 100644
--- a/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
@@ -68,7 +68,7 @@ typedef struct IBufferD3D11
struct IBufferD3D11Vtbl* pVtbl;
} IBufferD3D11;
-# define IBufferD3D11_GetD3D11Buffer(This) (This)->pVtbl->BufferD3D11.GetD3D11Buffer((IBufferD3D11*)(This))
+# define IBufferD3D11_GetD3D11Buffer(This) CALL_IFACE_METHOD(BufferD3D11, GetD3D11Buffer, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h b/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
index 82676456..242aeb09 100644
--- a/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
@@ -68,7 +68,7 @@ typedef struct IBufferViewD3D11
struct IBufferViewD3D11Vtbl* pVtbl;
} IBufferViewD3D11;
-# define IBufferViewD3D11_GetD3D11View(This) (This)->pVtbl->BufferViewD3D11.GetD3D11View((IBufferViewD3D11*)(This))
+# define IBufferViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(BufferViewD3D11, GetD3D11View, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h b/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
index cd85ca5c..150aa38c 100644
--- a/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
@@ -68,7 +68,7 @@ typedef struct IDeviceContextD3D11
struct IDeviceContextD3D11Vtbl* pVtbl;
} IDeviceContextD3D11;
-# define IDeviceContextD3D11_GetD3D11DeviceContext(This) (This)->pVtbl->DeviceContextD3D11.GetD3D11DeviceContext((IDeviceContextD3D11*)(This))
+# define IDeviceContextD3D11_GetD3D11DeviceContext(This) CALL_IFACE_METHOD(DeviceContextD3D11, GetD3D11DeviceContext, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h b/Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h
index 09e72ea4..ae2268b5 100644
--- a/Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h
@@ -170,11 +170,11 @@ typedef struct IEngineFactoryD3D11
// clang-format off
-# define IEngineFactoryD3D11_CreateDeviceAndContextsD3D11(This, ...) (This)->pVtbl->EngineFactoryD3D11.CreateDeviceAndContextsD3D11((IEngineFactoryD3D11*)(This), __VA_ARGS__)
-# define IEngineFactoryD3D11_CreateSwapChainD3D11(This, ...) (This)->pVtbl->EngineFactoryD3D11.CreateSwapChainD3D11 ((IEngineFactoryD3D11*)(This), __VA_ARGS__)
-# define IEngineFactoryD3D11_AttachToD3D11Device(This, ...) (This)->pVtbl->EngineFactoryD3D11.AttachToD3D11Device ((IEngineFactoryD3D11*)(This), __VA_ARGS__)
-# define IEngineFactoryD3D11_EnumerateAdapters(This, ...) (This)->pVtbl->EngineFactoryD3D11.EnumerateAdapters ((IEngineFactoryD3D11*)(This), __VA_ARGS__)
-# define IEngineFactoryD3D11_EnumerateDisplayModes(This, ...) (This)->pVtbl->EngineFactoryD3D11.EnumerateDisplayModes ((IEngineFactoryD3D11*)(This), __VA_ARGS__)
+# define IEngineFactoryD3D11_CreateDeviceAndContextsD3D11(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, CreateDeviceAndContextsD3D11, This, __VA_ARGS__)
+# define IEngineFactoryD3D11_CreateSwapChainD3D11(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, CreateSwapChainD3D11, This, __VA_ARGS__)
+# define IEngineFactoryD3D11_AttachToD3D11Device(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, AttachToD3D11Device, This, __VA_ARGS__)
+# define IEngineFactoryD3D11_EnumerateAdapters(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, EnumerateAdapters, This, __VA_ARGS__)
+# define IEngineFactoryD3D11_EnumerateDisplayModes(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, EnumerateDisplayModes, This, __VA_ARGS__)
// clang-format on
diff --git a/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h b/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
index fd277602..948baf8d 100644
--- a/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
@@ -127,16 +127,16 @@ typedef struct IPipelineStateD3D11
// clang-format off
-# define IPipelineStateD3D11_GetD3D11BlendState(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11BlendState ((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11RasterizerState(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11RasterizerState ((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11DepthStencilState(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11DepthStencilState((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11InputLayout(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11InputLayout ((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11VertexShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11VertexShader ((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11PixelShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11PixelShader ((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11GeometryShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11GeometryShader ((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11DomainShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11DomainShader ((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11HullShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11HullShader ((IPipelineStateD3D11*)(This))
-# define IPipelineStateD3D11_GetD3D11ComputeShader(This) (This)->pVtbl->PipelineStateD3D11.GetD3D11ComputeShader ((IPipelineStateD3D11*)(This))
+# define IPipelineStateD3D11_GetD3D11BlendState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11BlendState, This)
+# define IPipelineStateD3D11_GetD3D11RasterizerState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11RasterizerState, This)
+# define IPipelineStateD3D11_GetD3D11DepthStencilState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11DepthStencilState, This)
+# define IPipelineStateD3D11_GetD3D11InputLayout(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11InputLayout, This)
+# define IPipelineStateD3D11_GetD3D11VertexShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11VertexShader, This)
+# define IPipelineStateD3D11_GetD3D11PixelShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11PixelShader, This)
+# define IPipelineStateD3D11_GetD3D11GeometryShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11GeometryShader, This)
+# define IPipelineStateD3D11_GetD3D11DomainShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11DomainShader, This)
+# define IPipelineStateD3D11_GetD3D11HullShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11HullShader, This)
+# define IPipelineStateD3D11_GetD3D11ComputeShader(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11ComputeShader, This)
// clang-format on
diff --git a/Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h b/Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h
index 96b52d27..80d693dc 100644
--- a/Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h
@@ -65,7 +65,7 @@ typedef struct IQueryD3D11
struct IQueryD3D11Vtbl* pVtbl;
} IQueryD3D11;
-# define IQueryD3D11_GetD3D11Query(This) (This)->pVtbl->QueryD3D11.GetD3D11Query((IQueryD3D11*)(This))
+# define IQueryD3D11_GetD3D11Query(This) CALL_IFACE_METHOD(QueryD3D11, GetD3D11Query, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
index ecb4ec73..734aaa67 100644
--- a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
@@ -130,11 +130,11 @@ typedef struct IRenderDeviceD3D11
// clang-format off
-# define IRenderDeviceD3D11_GetD3D11Device(This) (This)->pVtbl->RenderDeviceD3D11.GetD3D11Device ((IRenderDeviceD3D11*)(This))
-# define IRenderDeviceD3D11_CreateBufferFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D11.CreateBufferFromD3DResource ((IRenderDeviceD3D11*)(This), __VA_ARGS__)
-# define IRenderDeviceD3D11_CreateTexture1DFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D11.CreateTexture1DFromD3DResource((IRenderDeviceD3D11*)(This), __VA_ARGS__)
-# define IRenderDeviceD3D11_CreateTexture2DFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D11.CreateTexture2DFromD3DResource((IRenderDeviceD3D11*)(This), __VA_ARGS__)
-# define IRenderDeviceD3D11_CreateTexture3DFromD3DResource(This, ...) (This)->pVtbl->RenderDeviceD3D11.CreateTexture3DFromD3DResource((IRenderDeviceD3D11*)(This), __VA_ARGS__)
+# define IRenderDeviceD3D11_GetD3D11Device(This) CALL_IFACE_METHOD(RenderDeviceD3D11, GetD3D11Device, This)
+# define IRenderDeviceD3D11_CreateBufferFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D11, CreateBufferFromD3DResource, This, __VA_ARGS__)
+# define IRenderDeviceD3D11_CreateTexture1DFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D11, CreateTexture1DFromD3DResource, This, __VA_ARGS__)
+# define IRenderDeviceD3D11_CreateTexture2DFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D11, CreateTexture2DFromD3DResource, This, __VA_ARGS__)
+# define IRenderDeviceD3D11_CreateTexture3DFromD3DResource(This, ...) CALL_IFACE_METHOD(RenderDeviceD3D11, CreateTexture3DFromD3DResource, This, __VA_ARGS__)
// clang-format on
diff --git a/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h b/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
index 8dbd054d..de5377a8 100644
--- a/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
@@ -68,7 +68,7 @@ typedef struct ISamplerD3D11
struct ISamplerD3D11Vtbl* pVtbl;
} ISamplerD3D11;
-# define ISamplerD3D11_GetD3D11SamplerState(This) (This)->pVtbl->SamplerD3D11.GetD3D11SamplerState((ISamplerD3D11*)(This))
+# define ISamplerD3D11_GetD3D11SamplerState(This) CALL_IFACE_METHOD(SamplerD3D11, GetD3D11SamplerState, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h b/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
index afa876e4..29d8345d 100644
--- a/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
@@ -68,7 +68,7 @@ typedef struct IShaderD3D11
struct IShaderD3D11Vtbl* pVtbl;
} IShaderD3D11;
-# define IShaderD3D11_GetD3D11Shader(This) (This)->pVtbl->ShaderD3D11.GetD3D11Shader((IShaderD3D11*)(This))
+# define IShaderD3D11_GetD3D11Shader(This) CALL_IFACE_METHOD(ShaderD3D11, GetD3D11Shader, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h b/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
index a7c743de..22a4a739 100644
--- a/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
@@ -77,9 +77,9 @@ typedef struct ISwapChainD3D11
// clang-format off
-# define ISwapChainD3D11_GetCurrentBackBufferRTV(This) (This)->pVtbl->SwapChainD3D11.GetCurrentBackBufferRTV((ISwapChainD3D11*)(This))
-# define ISwapChainD3D11_GetDepthBufferDSV(This) (This)->pVtbl->SwapChainD3D11.GetDepthBufferDSV ((ISwapChainD3D11*)(This))
-# define ISwapChainD3D11_GetDXGISwapChain(This) (This)->pVtbl->SwapChainD3D11.GetDXGISwapChain ((ISwapChainD3D11*)(This))
+# define ISwapChainD3D11_GetCurrentBackBufferRTV(This) CALL_IFACE_METHOD(SwapChainD3D11, GetCurrentBackBufferRTV, This)
+# define ISwapChainD3D11_GetDepthBufferDSV(This) CALL_IFACE_METHOD(SwapChainD3D11, GetDepthBufferDSV, This)
+# define ISwapChainD3D11_GetDXGISwapChain(This) CALL_IFACE_METHOD(SwapChainD3D11, GetDXGISwapChain, This)
// clang-format on
diff --git a/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h b/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
index df0390b4..fbfc9e15 100644
--- a/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
@@ -68,7 +68,7 @@ typedef struct ITextureD3D11
struct ITextureD3D11Vtbl* pVtbl;
} ITextureD3D11;
-# define ITextureD3D11_GetD3D11Texture(This) (This)->pVtbl->TextureD3D11.GetD3D11Texture((ITextureD3D11*)(This))
+# define ITextureD3D11_GetD3D11Texture(This) CALL_IFACE_METHOD(TextureD3D11, GetD3D11Texture, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h b/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
index dca5db9e..0e27e5e3 100644
--- a/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
@@ -68,7 +68,7 @@ typedef struct ITextureViewD3D11
struct ITextureViewD3D11Vtbl* pVtbl;
} ITextureViewD3D11;
-# define ITextureViewD3D11_GetD3D11View(This) (This)->pVtbl->TextureViewD3D11.GetD3D11View((ITextureViewD3D11*)(This))
+# define ITextureViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(TextureViewD3D11, GetD3D11View, This)
#endif