summaryrefslogtreecommitdiffstats
path: root/Graphics
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-07-25 04:31:09 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-07-25 04:31:09 +0000
commitc746f802d7b23d9c5ee0f52a7e5428a32bf3f316 (patch)
tree344b4a987341150fda9fd7f8642b902e9f96df71 /Graphics
parentFixed performance issue with resetting unchanged vertex buffers (diff)
downloadDiligentCore-c746f802d7b23d9c5ee0f52a7e5428a32bf3f316.tar.gz
DiligentCore-c746f802d7b23d9c5ee0f52a7e5428a32bf3f316.zip
Updated DeviceContextBase to use final types for pipeline state, buffers and texture views
Diffstat (limited to 'Graphics')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceContextBase.h110
-rw-r--r--Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h3
-rw-r--r--Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h7
-rw-r--r--Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h3
-rw-r--r--Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h1
-rw-r--r--Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp8
-rw-r--r--Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h3
-rw-r--r--Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h3
-rw-r--r--Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.h8
-rw-r--r--Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.h3
-rw-r--r--Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.h1
-rw-r--r--Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp12
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h7
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h3
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h2
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.h3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h7
-rw-r--r--Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h3
-rw-r--r--Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp14
53 files changed, 150 insertions, 125 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h
index aae0ef1f..1a291a10 100644
--- a/Graphics/GraphicsEngine/include/DeviceContextBase.h
+++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h
@@ -50,17 +50,22 @@ struct VertexStreamInfo
/// Base implementation of the device context.
-/// \tparam BaseInterface - base interface that this class will inheret.
+/// \tparam BaseInterface - base interface that this class will inheret.
+/// \tparam BufferImplType - buffer implemenation type (BufferD3D11Impl, BufferD3D12Impl, etc.)
+/// \tparam TextureViewImplType - texture view implemenation type (TextureViewD3D11Impl, TextureViewD3D12Impl, etc.)
+/// \tparam PipelineStateImplType - pipeline state implementation type (PipelineStateD3D11Impl, PipelineStateD3D12Impl, etc.)
/// \remarks Device context keeps strong references to all objects currently bound to
/// the pipeline: buffers, states, samplers, shaders, etc.
/// The context also keeps strong references to the device and
/// the swap chain.
-template<typename BaseInterface>
+template<typename BaseInterface,
+ typename BufferImplType,
+ typename TextureViewImplType,
+ typename PipelineStateImplType>
class DeviceContextBase : public ObjectBase<BaseInterface>
{
public:
-
- typedef ObjectBase<BaseInterface> TObjectBase;
+ using TObjectBase = ObjectBase<BaseInterface>;
/// \param pRefCounters - reference counters object that controls the lifetime of this device context.
/// \param pRenderDevice - render device.
@@ -88,7 +93,6 @@ public:
inline virtual void SetPipelineState(IPipelineState* pPipelineState)override = 0;
/// Base implementation of IDeviceContext::CommitShaderResources(); validates parameters.
- template<typename PSOImplType>
inline bool CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, Uint32 Flags, int);
/// Base implementation of IDeviceContext::SetIndexBuffer(); caches the strong reference to the index buffer
@@ -150,11 +154,13 @@ protected:
/// Number of bound vertex streams
Uint32 m_NumVertexStreams = 0;
- /// Strong reference to the bound pipeline state object
- RefCntAutoPtr<IPipelineState> m_pPipelineState;
+ /// Strong reference to the bound pipeline state object.
+ /// Use final PSO implementation type to avoid virtual calls to AddRef()/Release()
+ RefCntAutoPtr<PipelineStateImplType> m_pPipelineState;
- /// Strong reference to the bound index buffer
- RefCntAutoPtr<IBuffer> m_pIndexBuffer;
+ /// Strong reference to the bound index buffer.
+ /// Use final buffer implementation type to avoid virtual calls to AddRef()/Release()
+ RefCntAutoPtr<BufferImplType> m_pIndexBuffer;
/// Offset from the beginning of the index buffer to the start of the index data, in bytes.
Uint32 m_IndexDataStartOffset = 0;
@@ -175,8 +181,9 @@ protected:
/// Number of current scissor rects
Uint32 m_NumScissorRects = 0;
- /// Vector of strong references to the bound render targets
- RefCntAutoPtr<ITextureView> m_pBoundRenderTargets[MaxRenderTargets];
+ /// Vector of strong references to the bound render targets.
+ /// Use final texture view implementation type to avoid virtual calls to AddRef()/Release()
+ RefCntAutoPtr<TextureViewImplType> m_pBoundRenderTargets[MaxRenderTargets];
/// Number of bound render targets
Uint32 m_NumBoundRenderTargets = 0;
/// Width of the currently bound framebuffer
@@ -189,15 +196,16 @@ protected:
/// buffer are currently bound
bool m_IsDefaultFramebufferBound = false;
- /// Strong references to the bound depth stencil view
- RefCntAutoPtr<ITextureView> m_pBoundDepthStencil;
+ /// Strong references to the bound depth stencil view.
+ /// Use final texture view implementation type to avoid virtual calls to AddRef()/Release()
+ RefCntAutoPtr<TextureViewImplType> m_pBoundDepthStencil;
const bool m_bIsDeferred = false;
};
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer** ppBuffers, Uint32* pOffsets, Uint32 Flags )
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer** ppBuffers, Uint32* pOffsets, Uint32 Flags )
{
#ifdef DEVELOPMENT
if ( StartSlot >= MaxBufferSlots )
@@ -247,15 +255,14 @@ inline void DeviceContextBase<BaseInterface> :: SetVertexBuffers( Uint32 StartSl
m_VertexStreams[m_NumVertexStreams--] = VertexStreamInfo{};
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: SetPipelineState(IPipelineState* pPipelineState)
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetPipelineState(IPipelineState* pPipelineState)
{
- m_pPipelineState = pPipelineState;
+ m_pPipelineState = ValidatedCast<PipelineStateImplType>(pPipelineState);
}
-template<typename BaseInterface>
-template<typename PSOImplType>
-inline bool DeviceContextBase<BaseInterface> :: CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, Uint32 Flags, int)
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline bool DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, Uint32 Flags, int)
{
#ifdef DEVELOPMENT
if (!m_pPipelineState)
@@ -266,8 +273,7 @@ inline bool DeviceContextBase<BaseInterface> :: CommitShaderResources(IShaderRes
if (pShaderResourceBinding)
{
- auto* pPSOImpl = m_pPipelineState.RawPtr<PSOImplType>();
- if (pPSOImpl->IsIncompatibleWith(pShaderResourceBinding->GetPipelineState()))
+ if (m_pPipelineState->IsIncompatibleWith(pShaderResourceBinding->GetPipelineState()))
{
LOG_ERROR_MESSAGE("Shader resource binding object is not compatible with the currently bound pipeline state");
return false;
@@ -277,20 +283,20 @@ inline bool DeviceContextBase<BaseInterface> :: CommitShaderResources(IShaderRes
return true;
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: InvalidateState()
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: InvalidateState()
{
- DeviceContextBase<BaseInterface> :: ClearStateCache();
+ DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: ClearStateCache();
m_IsDefaultFramebufferBound = false;
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: SetIndexBuffer( IBuffer* pIndexBuffer, Uint32 ByteOffset )
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetIndexBuffer( IBuffer* pIndexBuffer, Uint32 ByteOffset )
{
- m_pIndexBuffer = pIndexBuffer;
+ m_pIndexBuffer = ValidatedCast<BufferImplType>(pIndexBuffer);
m_IndexDataStartOffset = ByteOffset;
#ifdef DEVELOPMENT
- const auto &BuffDesc = m_pIndexBuffer->GetDesc();
+ const auto& BuffDesc = m_pIndexBuffer->GetDesc();
if ( !(BuffDesc.BindFlags & BIND_INDEX_BUFFER) )
{
LOG_ERROR_MESSAGE( "Buffer \"", BuffDesc.Name ? BuffDesc.Name : "", "\" being bound as index buffer was not created with BIND_INDEX_BUFFER flag" );
@@ -299,8 +305,8 @@ inline void DeviceContextBase<BaseInterface> :: SetIndexBuffer( IBuffer* pIndexB
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: GetPipelineState(IPipelineState** ppPSO, float* BlendFactors, Uint32& StencilRef)
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: GetPipelineState(IPipelineState** ppPSO, float* BlendFactors, Uint32& StencilRef)
{
VERIFY( ppPSO != nullptr, "Null pointer provided null" );
VERIFY(* ppPSO == nullptr, "Memory address contains a pointer to a non-null blend state" );
@@ -318,8 +324,8 @@ inline void DeviceContextBase<BaseInterface> :: GetPipelineState(IPipelineState*
StencilRef = m_StencilRef;
};
-template<typename BaseInterface>
-inline bool DeviceContextBase<BaseInterface> ::SetBlendFactors(const float* BlendFactors, int)
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline bool DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> ::SetBlendFactors(const float* BlendFactors, int)
{
bool FactorsDiffer = false;
for( Uint32 f = 0; f < 4; ++f )
@@ -331,8 +337,8 @@ inline bool DeviceContextBase<BaseInterface> ::SetBlendFactors(const float* Blen
return FactorsDiffer;
}
-template<typename BaseInterface>
-inline bool DeviceContextBase<BaseInterface> :: SetStencilRef(Uint32 StencilRef, int)
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline bool DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetStencilRef(Uint32 StencilRef, int)
{
if (m_StencilRef != StencilRef)
{
@@ -342,8 +348,8 @@ inline bool DeviceContextBase<BaseInterface> :: SetStencilRef(Uint32 StencilRef,
return false;
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: SetViewports( Uint32 NumViewports, const Viewport* pViewports, Uint32& RTWidth, Uint32& RTHeight )
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetViewports( Uint32 NumViewports, const Viewport* pViewports, Uint32& RTWidth, Uint32& RTHeight )
{
if ( RTWidth == 0 || RTHeight == 0 )
{
@@ -370,8 +376,8 @@ inline void DeviceContextBase<BaseInterface> :: SetViewports( Uint32 NumViewport
}
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: GetViewports( Uint32 &NumViewports, Viewport* pViewports )
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: GetViewports( Uint32 &NumViewports, Viewport* pViewports )
{
NumViewports = m_NumViewports;
if ( pViewports )
@@ -381,8 +387,8 @@ inline void DeviceContextBase<BaseInterface> :: GetViewports( Uint32 &NumViewpor
}
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: SetScissorRects( Uint32 NumRects, const Rect* pRects, Uint32& RTWidth, Uint32& RTHeight )
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetScissorRects( Uint32 NumRects, const Rect* pRects, Uint32& RTWidth, Uint32& RTHeight )
{
if ( RTWidth == 0 || RTHeight == 0 )
{
@@ -401,8 +407,8 @@ inline void DeviceContextBase<BaseInterface> :: SetScissorRects( Uint32 NumRects
}
}
-template<typename BaseInterface>
-inline bool DeviceContextBase<BaseInterface> :: SetRenderTargets( Uint32 NumRenderTargets, ITextureView* ppRenderTargets[], ITextureView* pDepthStencil, Uint32 Dummy )
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline bool DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: SetRenderTargets( Uint32 NumRenderTargets, ITextureView* ppRenderTargets[], ITextureView* pDepthStencil, Uint32 Dummy )
{
bool bBindRenderTargets = false;
m_FramebufferWidth = 0;
@@ -475,7 +481,7 @@ inline bool DeviceContextBase<BaseInterface> :: SetRenderTargets( Uint32 NumRend
// can safely compare pointers.
if ( m_pBoundRenderTargets[rt] != pRTView )
{
- m_pBoundRenderTargets[rt] = pRTView;
+ m_pBoundRenderTargets[rt] = ValidatedCast<TextureViewImplType>(pRTView);
bBindRenderTargets = true;
}
}
@@ -513,7 +519,7 @@ inline bool DeviceContextBase<BaseInterface> :: SetRenderTargets( Uint32 NumRend
if ( m_pBoundDepthStencil != pDepthStencil)
{
- m_pBoundDepthStencil = pDepthStencil;
+ m_pBoundDepthStencil = ValidatedCast<TextureViewImplType>(pDepthStencil);
bBindRenderTargets = true;
}
@@ -523,8 +529,8 @@ inline bool DeviceContextBase<BaseInterface> :: SetRenderTargets( Uint32 NumRend
return bBindRenderTargets;
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: GetRenderTargets( Uint32 &NumRenderTargets, ITextureView** ppRTVs, ITextureView** ppDSV )
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: GetRenderTargets( Uint32 &NumRenderTargets, ITextureView** ppRTVs, ITextureView** ppDSV )
{
NumRenderTargets = m_NumBoundRenderTargets;
@@ -556,8 +562,8 @@ inline void DeviceContextBase<BaseInterface> :: GetRenderTargets( Uint32 &NumRen
}
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: ClearStateCache()
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: ClearStateCache()
{
for(Uint32 stream=0; stream < m_NumVertexStreams; ++stream)
m_VertexStreams[stream] = VertexStreamInfo();
@@ -591,8 +597,8 @@ inline void DeviceContextBase<BaseInterface> :: ClearStateCache()
ResetRenderTargets();
}
-template<typename BaseInterface>
-inline void DeviceContextBase<BaseInterface> :: ResetRenderTargets()
+template<typename BaseInterface, typename BufferImplType, typename TextureViewImplType, typename PipelineStateImplType>
+inline void DeviceContextBase<BaseInterface, BufferImplType, TextureViewImplType, PipelineStateImplType> :: ResetRenderTargets()
{
for (Uint32 rt = 0; rt < m_NumBoundRenderTargets; ++rt)
m_pBoundRenderTargets[rt].Release();
diff --git a/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h
index 69ae864d..1a37c0d8 100644
--- a/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h
@@ -51,7 +51,7 @@ enum class D3D11BufferState
class BufferD3D11Impl : public BufferBase<IBufferD3D11, BufferViewD3D11Impl, FixedBlockMemoryAllocator>
{
public:
- typedef BufferBase<IBufferD3D11, BufferViewD3D11Impl, FixedBlockMemoryAllocator> TBufferBase;
+ using TBufferBase = BufferBase<IBufferD3D11, BufferViewD3D11Impl, FixedBlockMemoryAllocator>;
BufferD3D11Impl(IReferenceCounters* pRefCounters,
FixedBlockMemoryAllocator& BuffViewObjMemAllocator,
diff --git a/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h
index da91f747..7b875fa8 100644
--- a/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h
@@ -38,7 +38,7 @@ class FixedBlockMemoryAllocator;
class BufferViewD3D11Impl : public BufferViewBase<IBufferViewD3D11>
{
public:
- typedef BufferViewBase<IBufferViewD3D11> TBufferViewBase;
+ using TBufferViewBase = BufferViewBase<IBufferViewD3D11>;
BufferViewD3D11Impl( IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
diff --git a/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h
index d2a596d2..24235560 100644
--- a/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h
@@ -38,7 +38,8 @@ class FixedBlockMemoryAllocator;
class CommandListD3D11Impl : public CommandListBase<ICommandList>
{
public:
- typedef CommandListBase<ICommandList> TCommandListBase;
+ using TCommandListBase = CommandListBase<ICommandList>;
+
CommandListD3D11Impl(IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
ID3D11CommandList* pd3d11CommandList);
diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
index 7d30761c..469dd621 100644
--- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
@@ -29,6 +29,9 @@
#include "DeviceContextD3D11.h"
#include "DeviceContextBase.h"
#include "ShaderD3D11Impl.h"
+#include "BufferD3D11Impl.h"
+#include "TextureViewD3D11Impl.h"
+#include "PipelineStateD3D11Impl.h"
#ifdef _DEBUG
# define VERIFY_CONTEXT_BINDINGS
@@ -38,10 +41,10 @@ namespace Diligent
{
/// Implementation of the Diligent::IDeviceContextD3D11 interface
-class DeviceContextD3D11Impl : public DeviceContextBase<IDeviceContextD3D11>
+class DeviceContextD3D11Impl : public DeviceContextBase<IDeviceContextD3D11, BufferD3D11Impl, TextureViewD3D11Impl, PipelineStateD3D11Impl>
{
public:
- typedef DeviceContextBase<IDeviceContextD3D11> TDeviceContextBase;
+ using TDeviceContextBase = DeviceContextBase<IDeviceContextD3D11, BufferD3D11Impl, TextureViewD3D11Impl, PipelineStateD3D11Impl>;
DeviceContextD3D11Impl(IReferenceCounters* pRefCounters,
IMemoryAllocator& Allocator,
diff --git a/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h
index 2180cc0a..04d0d8e6 100644
--- a/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h
@@ -40,7 +40,7 @@ class FixedBlockMemoryAllocator;
class PipelineStateD3D11Impl : public PipelineStateBase<IPipelineStateD3D11, IRenderDeviceD3D11>
{
public:
- typedef PipelineStateBase<IPipelineStateD3D11, IRenderDeviceD3D11> TPipelineStateBase;
+ using TPipelineStateBase = PipelineStateBase<IPipelineStateD3D11, IRenderDeviceD3D11>;
PipelineStateD3D11Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D11Impl* pDeviceD3D11,
diff --git a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h
index 4ab28877..28f65829 100644
--- a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h
@@ -38,7 +38,7 @@ namespace Diligent
class RenderDeviceD3D11Impl : public RenderDeviceD3DBase<IRenderDeviceD3D11>
{
public:
- typedef RenderDeviceD3DBase<IRenderDeviceD3D11> TRenderDeviceBase;
+ using TRenderDeviceBase = RenderDeviceD3DBase<IRenderDeviceD3D11>;
RenderDeviceD3D11Impl( IReferenceCounters* pRefCounters,
IMemoryAllocator& RawMemAllocator,
diff --git a/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h
index 6aa5ed43..2d060515 100644
--- a/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h
@@ -38,7 +38,7 @@ class FixedBlockMemoryAllocator;
class SamplerD3D11Impl : public SamplerBase<ISamplerD3D11, IRenderDeviceD3D11>
{
public:
- typedef SamplerBase<ISamplerD3D11, IRenderDeviceD3D11> TSamplerBase;
+ using TSamplerBase = SamplerBase<ISamplerD3D11, IRenderDeviceD3D11>;
SamplerD3D11Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D11Impl* pRenderDeviceD3D11,
diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h
index 6823dbb0..53d6d209 100644
--- a/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h
@@ -45,7 +45,7 @@ class ResourceMapping;
class ShaderD3D11Impl : public ShaderBase<IShaderD3D11, IRenderDeviceD3D11>, public ShaderD3DBase
{
public:
- typedef ShaderBase<IShaderD3D11, IRenderDeviceD3D11> TShaderBase;
+ using TShaderBase = ShaderBase<IShaderD3D11, IRenderDeviceD3D11>;
ShaderD3D11Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D11Impl* pRenderDeviceD3D11,
diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h
index bb29591c..d85cde13 100644
--- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h
@@ -41,7 +41,8 @@ class FixedBlockMemoryAllocator;
class ShaderResourceBindingD3D11Impl : public ShaderResourceBindingBase<IShaderResourceBindingD3D11>
{
public:
- typedef ShaderResourceBindingBase<IShaderResourceBindingD3D11> TBase;
+ using TBase = ShaderResourceBindingBase<IShaderResourceBindingD3D11>;
+
ShaderResourceBindingD3D11Impl(IReferenceCounters* pRefCounters,
class PipelineStateD3D11Impl* pPSO,
bool IsInternal);
diff --git a/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h
index 1f6a3325..cc9abd44 100644
--- a/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h
@@ -38,6 +38,7 @@ class SwapChainD3D11Impl : public SwapChainD3DBase<ISwapChainD3D11, IDXGISwapCha
{
public:
using TSwapChainBase = SwapChainD3DBase<ISwapChainD3D11, IDXGISwapChain>;
+
SwapChainD3D11Impl(IReferenceCounters* pRefCounters,
const SwapChainDesc& SCDesc,
const FullScreenModeDesc& FSDesc,
diff --git a/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h
index 3dca4273..b4882089 100644
--- a/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h
@@ -39,7 +39,7 @@ class FixedBlockMemoryAllocator;
class TextureViewD3D11Impl : public TextureViewBase<ITextureViewD3D11>
{
public:
- typedef TextureViewBase<ITextureViewD3D11> TTextureViewBase;
+ using TTextureViewBase = TextureViewBase<ITextureViewD3D11>;
TextureViewD3D11Impl( IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
index 1af4d49e..0692c48c 100644
--- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
@@ -541,7 +541,7 @@ namespace Diligent
void DeviceContextD3D11Impl::CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, Uint32 Flags)
{
- if( !DeviceContextBase::CommitShaderResources<PipelineStateD3D11Impl>(pShaderResourceBinding, Flags, 0 /*Dummy*/) )
+ if( !DeviceContextBase::CommitShaderResources(pShaderResourceBinding, Flags, 0 /*Dummy*/) )
return;
if(Flags & COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES)
@@ -555,7 +555,7 @@ namespace Diligent
if (TDeviceContextBase::SetStencilRef(StencilRef, 0))
{
ID3D11DepthStencilState* pd3d11DSS =
- m_pPipelineState ? m_pPipelineState.RawPtr<PipelineStateD3D11Impl>()->GetD3D11DepthStencilState() : nullptr;
+ m_pPipelineState ? m_pPipelineState->GetD3D11DepthStencilState() : nullptr;
m_pd3d11DeviceContext->OMSetDepthStencilState( pd3d11DSS, m_StencilRef );
}
}
@@ -570,7 +570,7 @@ namespace Diligent
if(m_pPipelineState)
{
SampleMask = m_pPipelineState->GetDesc().GraphicsPipeline.SampleMask;
- pd3d11BS = m_pPipelineState.RawPtr<PipelineStateD3D11Impl>()->GetD3D11BlendState();
+ pd3d11BS = m_pPipelineState->GetD3D11BlendState();
}
m_pd3d11DeviceContext->OMSetBlendState(pd3d11BS, m_BlendFactors, SampleMask);
}
@@ -683,7 +683,7 @@ namespace Diligent
}
#endif
- auto* pPipelineStateD3D11 = m_pPipelineState.RawPtr<PipelineStateD3D11Impl>();
+ auto* pPipelineStateD3D11 = m_pPipelineState.RawPtr();
#ifdef _DEBUG
if (pPipelineStateD3D11->GetDesc().IsComputePipeline)
{
diff --git a/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h
index 51ac7489..9a804c0c 100644
--- a/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h
@@ -42,7 +42,8 @@ class FixedBlockMemoryAllocator;
class BufferD3D12Impl : public BufferBase<IBufferD3D12, BufferViewD3D12Impl, FixedBlockMemoryAllocator>, public D3D12ResourceBase
{
public:
- typedef BufferBase<IBufferD3D12, BufferViewD3D12Impl, FixedBlockMemoryAllocator> TBufferBase;
+ using TBufferBase = BufferBase<IBufferD3D12, BufferViewD3D12Impl, FixedBlockMemoryAllocator>;
+
BufferD3D12Impl(IReferenceCounters* pRefCounters,
FixedBlockMemoryAllocator& BuffViewObjMemAllocator,
class RenderDeviceD3D12Impl* pDeviceD3D12,
diff --git a/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.h
index 7a8336d6..8b074440 100644
--- a/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.h
@@ -39,7 +39,7 @@ class FixedBlockMemoryAllocator;
class BufferViewD3D12Impl : public BufferViewBase<IBufferViewD3D12>
{
public:
- typedef BufferViewBase<IBufferViewD3D12> TBufferViewBase;
+ using TBufferViewBase = BufferViewBase<IBufferViewD3D12>;
BufferViewD3D12Impl( IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h
index bf97df8c..767abf3b 100644
--- a/Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h
@@ -35,7 +35,8 @@ namespace Diligent
class CommandListD3D12Impl : public CommandListBase<ICommandList>
{
public:
- typedef CommandListBase<ICommandList> TCommandListBase;
+ using TCommandListBase = CommandListBase<ICommandList>;
+
CommandListD3D12Impl(IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
class CommandContext* pCmdContext) :
diff --git a/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h
index 0db94e2b..d30fa2b4 100644
--- a/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h
@@ -36,7 +36,7 @@ namespace Diligent
class CommandQueueD3D12Impl : public ObjectBase<ICommandQueueD3D12>
{
public:
- typedef ObjectBase<ICommandQueueD3D12> TBase;
+ using TBase = ObjectBase<ICommandQueueD3D12>;
CommandQueueD3D12Impl(IReferenceCounters *pRefCounters, ID3D12CommandQueue *pd3d12NativeCmdQueue, ID3D12Fence *pd3d12Fence);
~CommandQueueD3D12Impl();
diff --git a/Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.h
index 785c6f32..2dfdfacf 100644
--- a/Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.h
@@ -29,7 +29,9 @@
#include "DeviceContextD3D12.h"
#include "DeviceContextBase.h"
#include "GenerateMips.h"
-
+#include "BufferD3D12Impl.h"
+#include "TextureViewD3D12Impl.h"
+#include "PipelineStateD3D12Impl.h"
#ifdef _DEBUG
# define VERIFY_CONTEXT_BINDINGS
#endif
@@ -38,10 +40,10 @@ namespace Diligent
{
/// Implementation of the Diligent::IDeviceContext interface
-class DeviceContextD3D12Impl : public DeviceContextBase<IDeviceContextD3D12>
+class DeviceContextD3D12Impl : public DeviceContextBase<IDeviceContextD3D12, BufferD3D12Impl, TextureViewD3D12Impl, PipelineStateD3D12Impl>
{
public:
- typedef DeviceContextBase<IDeviceContextD3D12> TDeviceContextBase;
+ using TDeviceContextBase = DeviceContextBase<IDeviceContextD3D12, BufferD3D12Impl, TextureViewD3D12Impl, PipelineStateD3D12Impl>;
DeviceContextD3D12Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D12Impl* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.h
index f4aed5d4..d0525325 100644
--- a/Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.h
@@ -42,7 +42,7 @@ class FixedBlockMemoryAllocator;
class PipelineStateD3D12Impl : public PipelineStateBase<IPipelineStateD3D12, IRenderDeviceD3D12>
{
public:
- typedef PipelineStateBase<IPipelineStateD3D12, IRenderDeviceD3D12> TPipelineStateBase;
+ using TPipelineStateBase = PipelineStateBase<IPipelineStateD3D12, IRenderDeviceD3D12>;
PipelineStateD3D12Impl( IReferenceCounters *pRefCounters, class RenderDeviceD3D12Impl *pDeviceD3D12, const PipelineStateDesc &PipelineDesc );
~PipelineStateD3D12Impl();
diff --git a/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h
index 34b8f864..e0e947f9 100644
--- a/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h
@@ -44,7 +44,7 @@ namespace Diligent
class RenderDeviceD3D12Impl : public RenderDeviceD3DBase<IRenderDeviceD3D12>
{
public:
- typedef RenderDeviceD3DBase<IRenderDeviceD3D12> TRenderDeviceBase;
+ using TRenderDeviceBase = RenderDeviceD3DBase<IRenderDeviceD3D12>;
RenderDeviceD3D12Impl( IReferenceCounters* pRefCounters,
IMemoryAllocator& RawMemAllocator,
diff --git a/Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.h
index 0c34888c..65813e83 100644
--- a/Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.h
@@ -39,7 +39,7 @@ class FixedBlockMemoryAllocator;
class SamplerD3D12Impl : public SamplerBase<ISamplerD3D12, IRenderDeviceD3D12>
{
public:
- typedef SamplerBase<ISamplerD3D12, IRenderDeviceD3D12> TSamplerBase;
+ using TSamplerBase = SamplerBase<ISamplerD3D12, IRenderDeviceD3D12>;
SamplerD3D12Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D12Impl* pRenderDeviceD3D12,
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.h
index fc61928b..5005f9d6 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.h
@@ -46,7 +46,7 @@ class FixedBlockMemoryAllocator;
class ShaderD3D12Impl : public ShaderBase<IShaderD3D12, IRenderDeviceD3D12>, public ShaderD3DBase
{
public:
- typedef ShaderBase<IShaderD3D12, IRenderDeviceD3D12> TShaderBase;
+ using TShaderBase = ShaderBase<IShaderD3D12, IRenderDeviceD3D12>;
ShaderD3D12Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D12Impl* pRenderDeviceD3D12,
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.h
index a87b4b91..b9b39487 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.h
@@ -41,7 +41,8 @@ class FixedBlockMemoryAllocator;
class ShaderResourceBindingD3D12Impl : public ShaderResourceBindingBase<IShaderResourceBindingD3D12>
{
public:
- typedef ShaderResourceBindingBase<IShaderResourceBindingD3D12> TBase;
+ using TBase = ShaderResourceBindingBase<IShaderResourceBindingD3D12>;
+
ShaderResourceBindingD3D12Impl(IReferenceCounters* pRefCounters,
class PipelineStateD3D12Impl* pPSO,
bool IsPSOInternal);
diff --git a/Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.h
index 9cca636e..30153804 100644
--- a/Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.h
@@ -40,6 +40,7 @@ class SwapChainD3D12Impl : public SwapChainD3DBase<ISwapChainD3D12, IDXGISwapCha
{
public:
using TSwapChainBase = SwapChainD3DBase<ISwapChainD3D12, IDXGISwapChain3>;
+
SwapChainD3D12Impl(IReferenceCounters* pRefCounters,
const SwapChainDesc& SwapChainDesc,
const FullScreenModeDesc& FSDesc,
diff --git a/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h
index 86cc6f0e..46d88f6c 100644
--- a/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h
@@ -42,7 +42,7 @@ class FixedBlockMemoryAllocator;
class TextureD3D12Impl : public TextureBase<ITextureD3D12, TextureViewD3D12Impl, FixedBlockMemoryAllocator>, public D3D12ResourceBase
{
public:
- typedef TextureBase<ITextureD3D12, TextureViewD3D12Impl, FixedBlockMemoryAllocator> TTextureBase;
+ using TTextureBase = TextureBase<ITextureD3D12, TextureViewD3D12Impl, FixedBlockMemoryAllocator>;
// Creates a new D3D12 resource
TextureD3D12Impl(IReferenceCounters* pRefCounters,
diff --git a/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.h
index 072446d9..219fedf5 100644
--- a/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.h
@@ -39,7 +39,7 @@ class FixedBlockMemoryAllocator;
class TextureViewD3D12Impl : public TextureViewBase<ITextureViewD3D12>
{
public:
- typedef TextureViewBase<ITextureViewD3D12> TTextureViewBase;
+ using TTextureViewBase = TextureViewBase<ITextureViewD3D12>;
TextureViewD3D12Impl( IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
index 4484d615..f490ff9a 100644
--- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
@@ -170,13 +170,11 @@ namespace Diligent
void DeviceContextD3D12Impl::CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, Uint32 Flags)
{
- if (!DeviceContextBase::CommitShaderResources<PipelineStateD3D12Impl>(pShaderResourceBinding, Flags, 0 /*Dummy*/))
+ if (!DeviceContextBase::CommitShaderResources(pShaderResourceBinding, Flags, 0 /*Dummy*/))
return;
auto *pCtx = RequestCmdContext();
- auto *pPipelineStateD3D12 = m_pPipelineState.RawPtr<PipelineStateD3D12Impl>();
-
- m_pCommittedResourceCache = pPipelineStateD3D12->CommitAndTransitionShaderResources(pShaderResourceBinding, *pCtx, true, (Flags & COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES)!=0);
+ m_pCommittedResourceCache = m_pPipelineState->CommitAndTransitionShaderResources(pShaderResourceBinding, *pCtx, true, (Flags & COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES)!=0);
}
void DeviceContextD3D12Impl::SetStencilRef(Uint32 StencilRef)
@@ -261,7 +259,7 @@ namespace Diligent
void DeviceContextD3D12Impl::CommitD3D12VertexBuffers(GraphicsContext& GraphCtx)
{
- auto *pPipelineStateD3D12 = m_pPipelineState.RawPtr<PipelineStateD3D12Impl>();
+ auto *pPipelineStateD3D12 = m_pPipelineState.RawPtr();
// Do not initialize array with zeroes for performance reasons
D3D12_VERTEX_BUFFER_VIEW VBViews[MaxBufferSlots];// = {}
@@ -336,7 +334,7 @@ namespace Diligent
CommitD3D12IndexBuffer(DrawAttribs.IndexType);
}
- auto *pPipelineStateD3D12 = m_pPipelineState.RawPtr<PipelineStateD3D12Impl>();
+ auto *pPipelineStateD3D12 = m_pPipelineState.RawPtr();
if(m_bCommittedD3D12VBsUpToDate)
TransitionD3D12VertexBuffers(GraphCtx);
@@ -398,7 +396,7 @@ namespace Diligent
}
#endif
- auto *pPipelineStateD3D12 = m_pPipelineState.RawPtr<PipelineStateD3D12Impl>();
+ auto *pPipelineStateD3D12 = m_pPipelineState.RawPtr();
auto &ComputeCtx = RequestCmdContext()->AsComputeContext();
ComputeCtx.SetRootSignature( pPipelineStateD3D12->GetD3D12RootSignature() );
diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h
index cb0aa744..eb3b2de5 100644
--- a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.h
@@ -40,7 +40,7 @@ class FixedBlockMemoryAllocator;
class BufferGLImpl : public BufferBase<IBufferGL, BufferViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource
{
public:
- typedef BufferBase<IBufferGL, BufferViewGLImpl, FixedBlockMemoryAllocator> TBufferBase;
+ using TBufferBase = BufferBase<IBufferGL, BufferViewGLImpl, FixedBlockMemoryAllocator>;
BufferGLImpl(IReferenceCounters *pRefCounters,
FixedBlockMemoryAllocator &BuffViewObjMemAllocator,
diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h
index c2a11c4a..28cca382 100644
--- a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.h
@@ -42,7 +42,7 @@ struct BufferViewDesc;
class BufferViewGLImpl : public BufferViewBase<IBufferViewGL>
{
public:
- typedef BufferViewBase<IBufferViewGL> TBuffViewBase;
+ using TBuffViewBase = BufferViewBase<IBufferViewGL>;
BufferViewGLImpl( IReferenceCounters *pRefCounters,
IRenderDevice *pDevice,
diff --git a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
index f757f771..bff4710d 100644
--- a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.h
@@ -28,15 +28,18 @@
#include "BaseInterfacesGL.h"
#include "GLContextState.h"
#include "GLObjectWrapper.h"
+#include "BufferGLImpl.h"
+#include "TextureViewGLImpl.h"
+#include "PipelineStateGLImpl.h"
namespace Diligent
{
/// Implementation of the Diligent::IDeviceContextGL interface
-class DeviceContextGLImpl : public DeviceContextBase<IDeviceContextGL>
+class DeviceContextGLImpl : public DeviceContextBase<IDeviceContextGL, BufferGLImpl, TextureViewGLImpl, PipelineStateGLImpl>
{
public:
- typedef DeviceContextBase<IDeviceContextGL> TDeviceContextBase;
+ using TDeviceContextBase = DeviceContextBase<IDeviceContextGL, BufferGLImpl, TextureViewGLImpl, PipelineStateGLImpl>;
DeviceContextGLImpl( IReferenceCounters *pRefCounters, class RenderDeviceGLImpl *pDeviceGL, bool bIsDeferred );
diff --git a/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h
index 5aabba85..6e48b7b8 100644
--- a/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.h
@@ -39,7 +39,7 @@ class FixedBlockMemoryAllocator;
class PipelineStateGLImpl : public PipelineStateBase<IPipelineStateGL, IGLDeviceBaseInterface>
{
public:
- typedef PipelineStateBase<IPipelineStateGL, IGLDeviceBaseInterface> TPipelineStateBase;
+ using TPipelineStateBase = PipelineStateBase<IPipelineStateGL, IGLDeviceBaseInterface>;
PipelineStateGLImpl(IReferenceCounters *pRefCounters, class RenderDeviceGLImpl *pDeviceGL, const PipelineStateDesc& PipelineDesc, bool IsDeviceInternal = false);
~PipelineStateGLImpl();
diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h
index 36d611cd..adb0f833 100644
--- a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h
@@ -52,7 +52,7 @@ namespace Diligent
class RenderDeviceGLImpl : public RenderDeviceBase<IGLDeviceBaseInterface>
{
public:
- typedef RenderDeviceBase<IGLDeviceBaseInterface> TRenderDeviceBase;
+ using TRenderDeviceBase = RenderDeviceBase<IGLDeviceBaseInterface>;
RenderDeviceGLImpl( IReferenceCounters *pRefCounters, IMemoryAllocator &RawMemAllocator, const EngineGLAttribs &InitAttribs );
~RenderDeviceGLImpl();
diff --git a/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h
index 98dfe4be..19e3a480 100644
--- a/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.h
@@ -37,7 +37,7 @@ class FixedBlockMemoryAllocator;
class SamplerGLImpl : public SamplerBase<ISamplerGL, IGLDeviceBaseInterface>
{
public:
- typedef SamplerBase<ISamplerGL, IGLDeviceBaseInterface> TSamplerBase;
+ using TSamplerBase = SamplerBase<ISamplerGL, IGLDeviceBaseInterface>;
SamplerGLImpl( IReferenceCounters *pRefCounters, class RenderDeviceGLImpl *pDeviceGL, const SamplerDesc& SamplerDesc, bool bIsDeviceInternal = false );
~SamplerGLImpl();
diff --git a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h
index fd9ac9b8..cf0116c5 100644
--- a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.h
@@ -67,7 +67,7 @@ inline GLenum ShaderTypeToGLShaderBit(SHADER_TYPE ShaderType)
class ShaderGLImpl : public ShaderBase<IShaderGL, IGLDeviceBaseInterface>
{
public:
- typedef ShaderBase<IShaderGL, IGLDeviceBaseInterface> TShaderBase;
+ using TShaderBase = ShaderBase<IShaderGL, IGLDeviceBaseInterface>;
ShaderGLImpl( IReferenceCounters *pRefCounters, class RenderDeviceGLImpl *pDeviceGL, const ShaderCreationAttribs &ShaderCreationAttribs, bool bIsDeviceInternal = false );
~ShaderGLImpl();
diff --git a/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h
index 53c1af98..61b9d013 100644
--- a/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.h
@@ -40,7 +40,8 @@ class FixedBlockMemoryAllocator;
class ShaderResourceBindingGLImpl : public ShaderResourceBindingBase<IShaderResourceBindingGL>
{
public:
- typedef ShaderResourceBindingBase<IShaderResourceBindingGL> TBase;
+ using TBase = ShaderResourceBindingBase<IShaderResourceBindingGL>;
+
ShaderResourceBindingGLImpl(IReferenceCounters *pRefCounters, class PipelineStateGLImpl *pPSO);
~ShaderResourceBindingGLImpl();
diff --git a/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h
index f3c01d18..c37f736c 100644
--- a/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.h
@@ -36,7 +36,7 @@ class IMemoryAllocator;
class SwapChainGLImpl final : public SwapChainBase<ISwapChainGL>
{
public:
- typedef SwapChainBase<ISwapChainGL> TSwapChainBase;
+ using TSwapChainBase = SwapChainBase<ISwapChainGL>;
SwapChainGLImpl(IReferenceCounters *pRefCounters,
const EngineGLAttribs &InitAttribs,
diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h
index c0c5ca66..f8be69c2 100644
--- a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h
+++ b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.h
@@ -41,7 +41,7 @@ class FixedBlockMemoryAllocator;
class TextureBaseGL : public TextureBase<ITextureGL, TextureViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource
{
public:
- typedef TextureBase<ITextureGL, TextureViewGLImpl, FixedBlockMemoryAllocator> TTextureBase;
+ using TTextureBase = TextureBase<ITextureGL, TextureViewGLImpl, FixedBlockMemoryAllocator>;
TextureBaseGL(IReferenceCounters *pRefCounters,
FixedBlockMemoryAllocator& TexViewObjAllocator,
diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h
index f06ed0d2..8675a86c 100644
--- a/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h
+++ b/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.h
@@ -37,7 +37,7 @@ class FixedBlockMemoryAllocator;
class TextureViewGLImpl : public TextureViewBase<ITextureViewGL>
{
public:
- typedef TextureViewBase<ITextureViewGL> TTextureViewBase;
+ using TTextureViewBase = TextureViewBase<ITextureViewGL>;
TextureViewGLImpl(IReferenceCounters *pRefCounters,
class IRenderDevice *pDevice,
diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
index a1509fbb..df788886 100644
--- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp
@@ -131,7 +131,7 @@ namespace Diligent
void DeviceContextGLImpl::CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, Uint32 Flags)
{
- if(!DeviceContextBase::CommitShaderResources<PipelineStateGLImpl>(pShaderResourceBinding, Flags, 0))
+ if(!DeviceContextBase::CommitShaderResources(pShaderResourceBinding, Flags, 0))
return;
if(m_CommitedResourcesTentativeBarriers != 0)
@@ -342,8 +342,8 @@ namespace Diligent
LOG_ERROR("No pipeline state is bound");
return;
}
- auto *pPipelineStateGL = m_pPipelineState.RawPtr<PipelineStateGLImpl>();
- auto *pShaderResBindingGL = ValidatedCast<ShaderResourceBindingGLImpl>(pResBinding);
+ auto* pPipelineStateGL = m_pPipelineState.RawPtr();
+ auto* pShaderResBindingGL = ValidatedCast<ShaderResourceBindingGLImpl>(pResBinding);
const auto &DeviceCaps = pRenderDeviceGL->GetDeviceCaps();
auto &Prog = pPipelineStateGL->GetGLProgram();
diff --git a/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h b/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h
index 6c88c16e..5d6671ce 100644
--- a/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h
@@ -41,7 +41,7 @@ class BufferVkImpl;
class BufferViewVkImpl : public BufferViewBase<IBufferViewVk>
{
public:
- typedef BufferViewBase<IBufferViewVk> TBufferViewBase;
+ using TBufferViewBase = BufferViewBase<IBufferViewVk>;
BufferViewVkImpl( IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
diff --git a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
index e4a0edf4..6b448e1b 100644
--- a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
@@ -45,7 +45,8 @@ class FixedBlockMemoryAllocator;
class BufferVkImpl : public BufferBase<IBufferVk, BufferViewVkImpl, FixedBlockMemoryAllocator>
{
public:
- typedef BufferBase<IBufferVk, BufferViewVkImpl, FixedBlockMemoryAllocator> TBufferBase;
+ using TBufferBase = BufferBase<IBufferVk, BufferViewVkImpl, FixedBlockMemoryAllocator>;
+
BufferVkImpl(IReferenceCounters* pRefCounters,
FixedBlockMemoryAllocator& BuffViewObjMemAllocator,
class RenderDeviceVkImpl* pDeviceVk,
diff --git a/Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.h b/Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.h
index d309b49e..d4507a28 100644
--- a/Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/CommandListVkImpl.h
@@ -36,7 +36,8 @@ namespace Diligent
class CommandListVkImpl : public CommandListBase<ICommandList>
{
public:
- typedef CommandListBase<ICommandList> TCommandListBase;
+ using TCommandListBase = CommandListBase<ICommandList>;
+
CommandListVkImpl(IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
IDeviceContext* pDeferredCtx,
diff --git a/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h b/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h
index b1ec606f..5a3de325 100644
--- a/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h
@@ -41,7 +41,7 @@ namespace Diligent
class CommandQueueVkImpl : public ObjectBase<ICommandQueueVk>
{
public:
- typedef ObjectBase<ICommandQueueVk> TBase;
+ using TBase = ObjectBase<ICommandQueueVk>;
CommandQueueVkImpl(IReferenceCounters* pRefCounters,
std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
diff --git a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
index 26e74a25..4470c028 100644
--- a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
@@ -37,15 +37,18 @@
#include "DescriptorPoolManager.h"
#include "PipelineLayout.h"
#include "GenerateMipsVkHelper.h"
+#include "BufferVKImpl.h"
+#include "TextureViewVKImpl.h"
+#include "PipelineStateVKImpl.h"
namespace Diligent
{
/// Implementation of the Diligent::IDeviceContext interface
-class DeviceContextVkImpl : public DeviceContextBase<IDeviceContextVk>
+class DeviceContextVkImpl : public DeviceContextBase<IDeviceContextVk, BufferVkImpl, TextureViewVkImpl, PipelineStateVkImpl>
{
public:
- typedef DeviceContextBase<IDeviceContextVk> TDeviceContextBase;
+ using TDeviceContextBase = DeviceContextBase<IDeviceContextVk, BufferVkImpl, TextureViewVkImpl, PipelineStateVkImpl>;
DeviceContextVkImpl(IReferenceCounters* pRefCounters,
class RenderDeviceVkImpl* pDevice,
diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h b/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h
index e06d853d..b98dedf5 100644
--- a/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h
@@ -48,7 +48,7 @@ class FixedBlockMemoryAllocator;
class PipelineStateVkImpl : public PipelineStateBase<IPipelineStateVk, IRenderDeviceVk>
{
public:
- typedef PipelineStateBase<IPipelineStateVk, IRenderDeviceVk> TPipelineStateBase;
+ using TPipelineStateBase = PipelineStateBase<IPipelineStateVk, IRenderDeviceVk>;
PipelineStateVkImpl( IReferenceCounters* pRefCounters, class RenderDeviceVkImpl* pDeviceVk, const PipelineStateDesc &PipelineDesc );
~PipelineStateVkImpl();
diff --git a/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h b/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h
index 612854f7..11257bf0 100644
--- a/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h
@@ -54,7 +54,7 @@ namespace Diligent
class RenderDeviceVkImpl : public RenderDeviceBase<IRenderDeviceVk>
{
public:
- typedef RenderDeviceBase<IRenderDeviceVk> TRenderDeviceBase;
+ using TRenderDeviceBase = RenderDeviceBase<IRenderDeviceVk>;
RenderDeviceVkImpl( IReferenceCounters* pRefCounters,
IMemoryAllocator& RawMemAllocator,
diff --git a/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h b/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h
index 23d4c713..c3595b0e 100644
--- a/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h
@@ -38,7 +38,7 @@ class FixedBlockMemoryAllocator;
class SamplerVkImpl : public SamplerBase<ISamplerVk, IRenderDeviceVk>
{
public:
- typedef SamplerBase<ISamplerVk, IRenderDeviceVk> TSamplerBase;
+ using TSamplerBase = SamplerBase<ISamplerVk, IRenderDeviceVk>;
SamplerVkImpl(IReferenceCounters* pRefCounters, class RenderDeviceVkImpl* pRenderDeviceVk, const SamplerDesc& SamplerDesc);
~SamplerVkImpl();
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h b/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h
index 978a967d..34186c61 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h
@@ -43,7 +43,8 @@ class FixedBlockMemoryAllocator;
class ShaderResourceBindingVkImpl : public ShaderResourceBindingBase<IShaderResourceBindingVk>
{
public:
- typedef ShaderResourceBindingBase<IShaderResourceBindingVk> TBase;
+ using TBase = ShaderResourceBindingBase<IShaderResourceBindingVk>;
+
ShaderResourceBindingVkImpl(IReferenceCounters* pRefCounters, class PipelineStateVkImpl* pPSO, bool IsPSOInternal);
~ShaderResourceBindingVkImpl();
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
index 2c6d7272..09d14a9b 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
@@ -43,7 +43,7 @@ class FixedBlockMemoryAllocator;
class ShaderVkImpl : public ShaderBase<IShaderVk, IRenderDeviceVk>
{
public:
- typedef ShaderBase<IShaderVk, IRenderDeviceVk> TShaderBase;
+ using TShaderBase = ShaderBase<IShaderVk, IRenderDeviceVk>;
ShaderVkImpl(IReferenceCounters* pRefCounters, class RenderDeviceVkImpl* pRenderDeviceVk, const ShaderCreationAttribs &CreationAttribs);
~ShaderVkImpl();
diff --git a/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h b/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h
index 018e1eb8..dcb62ab5 100644
--- a/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h
@@ -40,7 +40,8 @@ class IMemoryAllocator;
class SwapChainVkImpl : public SwapChainBase<ISwapChainVk>
{
public:
- typedef SwapChainBase<ISwapChainVk> TSwapChainBase;
+ using TSwapChainBase = SwapChainBase<ISwapChainVk>;
+
SwapChainVkImpl(IReferenceCounters* pRefCounters,
const SwapChainDesc& SwapChainDesc,
class RenderDeviceVkImpl* pRenderDeviceVk,
diff --git a/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h b/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h
index 63d66ac0..9863d6aa 100644
--- a/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h
@@ -39,7 +39,7 @@ class FixedBlockMemoryAllocator;
class TextureViewVkImpl : public TextureViewBase<ITextureViewVk>
{
public:
- typedef TextureViewBase<ITextureViewVk> TTextureViewBase;
+ using TTextureViewBase = TextureViewBase<ITextureViewVk>;
TextureViewVkImpl( IReferenceCounters* pRefCounters,
IRenderDevice* pDevice,
diff --git a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
index 660dd151..825a5f44 100644
--- a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
@@ -41,7 +41,7 @@ class FixedBlockMemoryAllocator;
class TextureVkImpl : public TextureBase<ITextureVk, TextureViewVkImpl, FixedBlockMemoryAllocator>
{
public:
- typedef TextureBase<ITextureVk, TextureViewVkImpl, FixedBlockMemoryAllocator> TTextureBase;
+ using TTextureBase = TextureBase<ITextureVk, TextureViewVkImpl, FixedBlockMemoryAllocator>;
// Creates a new Vk resource
TextureVkImpl(IReferenceCounters* pRefCounters,
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index 1c8352d6..b4cd4dc9 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -264,11 +264,10 @@ namespace Diligent
void DeviceContextVkImpl::CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, Uint32 Flags)
{
- if (!DeviceContextBase::CommitShaderResources<PipelineStateVkImpl>(pShaderResourceBinding, Flags, 0 /*Dummy*/))
+ if (!DeviceContextBase::CommitShaderResources(pShaderResourceBinding, Flags, 0 /*Dummy*/))
return;
- auto *pPipelineStateVk = m_pPipelineState.RawPtr<PipelineStateVkImpl>();
- pPipelineStateVk->CommitAndTransitionShaderResources(pShaderResourceBinding, this, true, Flags, &m_DesrSetBindInfo);
+ m_pPipelineState->CommitAndTransitionShaderResources(pShaderResourceBinding, this, true, Flags, &m_DesrSetBindInfo);
}
void DeviceContextVkImpl::SetStencilRef(Uint32 StencilRef)
@@ -304,9 +303,8 @@ namespace Diligent
void DeviceContextVkImpl::CommitVkVertexBuffers()
{
#ifdef DEVELOPMENT
- auto *pPipelineStateVk = m_pPipelineState.RawPtr<PipelineStateVkImpl>();
- if (m_NumVertexStreams < pPipelineStateVk->GetNumBufferSlotsUsed())
- LOG_ERROR("Currently bound pipeline state \"", pPipelineStateVk->GetDesc().Name, "\" expects ", pPipelineStateVk->GetNumBufferSlotsUsed(), " input buffer slots, but only ", m_NumVertexStreams, " is bound");
+ if (m_NumVertexStreams < m_pPipelineState->GetNumBufferSlotsUsed())
+ LOG_ERROR("Currently bound pipeline state \"", m_pPipelineState->GetDesc().Name, "\" expects ", m_pPipelineState->GetNumBufferSlotsUsed(), " input buffer slots, but only ", m_NumVertexStreams, " is bound");
#endif
// Do not initialize array with zeroes for performance reasons
VkBuffer vkVertexBuffers[MaxBufferSlots];// = {}
@@ -399,7 +397,7 @@ namespace Diligent
}
#endif
- auto *pPipelineStateVk = m_pPipelineState.RawPtr<PipelineStateVkImpl>();
+ auto *pPipelineStateVk = m_pPipelineState.RawPtr();
EnsureVkCmdBuffer();
@@ -507,7 +505,7 @@ namespace Diligent
}
#endif
- auto *pPipelineStateVk = m_pPipelineState.RawPtr<PipelineStateVkImpl>();
+ auto *pPipelineStateVk = m_pPipelineState.RawPtr();
EnsureVkCmdBuffer();