summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-03-14 02:42:10 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-03-19 00:38:22 +0000
commitc8a2291bcf12adde60c42292903005b996b7a499 (patch)
tree018d2b005e4e3d89653584f567f1937863d009a9 /Graphics/GraphicsEngine
parentRenamed Align to AlignUp (diff)
downloadDiligentCore-c8a2291bcf12adde60c42292903005b996b7a499.tar.gz
DiligentCore-c8a2291bcf12adde60c42292903005b996b7a499.zip
Reworked CommandListBase to use EngineImplTraits like the rest of the base classes
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/CommandListBase.hpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/Graphics/GraphicsEngine/include/CommandListBase.hpp b/Graphics/GraphicsEngine/include/CommandListBase.hpp
index 0d4cea78..3dc83c08 100644
--- a/Graphics/GraphicsEngine/include/CommandListBase.hpp
+++ b/Graphics/GraphicsEngine/include/CommandListBase.hpp
@@ -43,15 +43,17 @@ struct CommandListDesc : public DeviceObjectAttribs
/// Template class implementing base functionality of the command list object.
-/// \tparam BaseInterface - Base interface that this class will inheret
-/// (Diligent::ICommandListD3D11, Diligent::ICommandListD3D12 or Diligent::ICommandListVk).
-/// \tparam RenderDeviceImplType - Type of the render device implementation
-/// (Diligent::RenderDeviceD3D11Impl, Diligent::RenderDeviceD3D12Impl,
-/// Diligent::RenderDeviceGLImpl, or Diligent::RenderDeviceVkImpl)
-template <class BaseInterface, class RenderDeviceImplType>
-class CommandListBase : public DeviceObjectBase<BaseInterface, RenderDeviceImplType, CommandListDesc>
+/// \tparam EngineImplTraits - Engine implementation type traits.
+template <typename EngineImplTraits>
+class CommandListBase : public DeviceObjectBase<typename EngineImplTraits::CommandListInterface, typename EngineImplTraits::RenderDeviceImplType, CommandListDesc>
{
public:
+ // Base interface that this class inherits (ICommandList).
+ using BaseInterface = typename EngineImplTraits::CommandListInterface;
+
+ // Render device implementation type (RenderDeviceD3D12Impl, RenderDeviceVkImpl, etc.).
+ using RenderDeviceImplType = typename EngineImplTraits::RenderDeviceImplType;
+
using TDeviceObjectBase = DeviceObjectBase<BaseInterface, RenderDeviceImplType, CommandListDesc>;
/// \param pRefCounters - Reference counters object that controls the lifetime of this command list.