diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2021-03-14 03:16:11 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2021-03-19 00:38:22 +0000 |
| commit | 0169a272f45ccc03dabc9c121e238cb929bcae76 (patch) | |
| tree | 698f920ce7b8abb73a2d7ba1da0c96339fe938dc /Graphics/GraphicsEngineD3D11 | |
| parent | Unified fence implementations in all backends (diff) | |
| download | DiligentCore-0169a272f45ccc03dabc9c121e238cb929bcae76.tar.gz DiligentCore-0169a272f45ccc03dabc9c121e238cb929bcae76.zip | |
D3D11 backend: some header clean-up plus few minor updates
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
22 files changed, 37 insertions, 40 deletions
diff --git a/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.hpp index 99afb43f..bd2985c6 100644 --- a/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.hpp @@ -30,6 +30,8 @@ /// \file /// Declaration of Diligent::BufferD3D11Impl class +#include <atlbase.h> + #include "EngineD3D11ImplTraits.hpp" #include "BufferD3D11.h" #include "BufferBase.hpp" @@ -37,8 +39,6 @@ namespace Diligent { -class RenderDeviceD3D11Impl; - /// Buffer object implementation in Direct3D11 backend. class BufferD3D11Impl final : public BufferBase<EngineD3D11ImplTraits> { diff --git a/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.hpp index 44121a4a..c02e509a 100644 --- a/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.hpp @@ -30,16 +30,15 @@ /// \file /// Declaration of Diligent::BufferViewD3D11Impl class +#include <atlbase.h> + +#include "EngineD3D11ImplTraits.hpp" #include "BufferViewD3D11.h" -#include "RenderDeviceD3D11.h" #include "BufferViewBase.hpp" -#include "RenderDeviceD3D11Impl.hpp" namespace Diligent { -class FixedBlockMemoryAllocator; - /// Buffer view implementation in Direct3D11 backend. class BufferViewD3D11Impl final : public BufferViewBase<EngineD3D11ImplTraits> { diff --git a/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.hpp index 14a9b394..e2d15924 100644 --- a/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.hpp @@ -30,6 +30,8 @@ /// \file /// Declaration of Diligent::CommandListD3D11Impl class +#include <atlbase.h> + #include "EngineD3D11ImplTraits.hpp" #include "CommandListBase.hpp" diff --git a/Graphics/GraphicsEngineD3D11/include/DisjointQueryPool.hpp b/Graphics/GraphicsEngineD3D11/include/DisjointQueryPool.hpp index 44faf9bf..2aaf90ea 100644 --- a/Graphics/GraphicsEngineD3D11/include/DisjointQueryPool.hpp +++ b/Graphics/GraphicsEngineD3D11/include/DisjointQueryPool.hpp @@ -31,6 +31,7 @@ /// Declaration of Diligent::DisjointQueryPool class #include <memory> +#include <atlbase.h> namespace Diligent { diff --git a/Graphics/GraphicsEngineD3D11/include/FenceD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/FenceD3D11Impl.hpp index 49b5ea54..4e1ef18a 100644 --- a/Graphics/GraphicsEngineD3D11/include/FenceD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/FenceD3D11Impl.hpp @@ -71,7 +71,7 @@ private: { CComPtr<ID3D11DeviceContext> pd3d11Ctx; CComPtr<ID3D11Query> pd3d11Query; - Uint64 Value; + const Uint64 Value; PendingFenceData(CComPtr<ID3D11DeviceContext> pCtx, CComPtr<ID3D11Query> pQuery, Uint64 _Value) : // clang-format off diff --git a/Graphics/GraphicsEngineD3D11/include/FramebufferD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/FramebufferD3D11Impl.hpp index 1cd1654a..c27136e8 100644 --- a/Graphics/GraphicsEngineD3D11/include/FramebufferD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/FramebufferD3D11Impl.hpp @@ -30,15 +30,12 @@ /// \file /// Declaration of Diligent::FramebufferD3D11Impl class -#include "RenderDeviceD3D11.h" +#include "EngineD3D11ImplTraits.hpp" #include "FramebufferBase.hpp" -#include "RenderDeviceD3D11Impl.hpp" namespace Diligent { -class FixedBlockMemoryAllocator; - /// Render pass implementation in Direct3D11 backend. class FramebufferD3D11Impl final : public FramebufferBase<EngineD3D11ImplTraits> { diff --git a/Graphics/GraphicsEngineD3D11/include/QueryD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/QueryD3D11Impl.hpp index 6d011c5d..6af07f43 100644 --- a/Graphics/GraphicsEngineD3D11/include/QueryD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/QueryD3D11Impl.hpp @@ -31,17 +31,16 @@ /// Declaration of Diligent::QueryD3D11Impl class #include <memory> +#include <atlbase.h> +#include "EngineD3D11ImplTraits.hpp" #include "QueryD3D11.h" #include "QueryBase.hpp" -#include "RenderDeviceD3D11Impl.hpp" #include "DisjointQueryPool.hpp" namespace Diligent { -class FixedBlockMemoryAllocator; - /// Query implementation in Direct3D11 backend. class QueryD3D11Impl final : public QueryBase<EngineD3D11ImplTraits> { diff --git a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp index bd9cf2f9..4f66492c 100644 --- a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.hpp @@ -32,7 +32,6 @@ #include "EngineD3D11ImplTraits.hpp" #include "RenderDeviceD3DBase.hpp" -#include "DeviceContextD3D11.h" namespace Diligent { diff --git a/Graphics/GraphicsEngineD3D11/include/RenderPassD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/RenderPassD3D11Impl.hpp index 82a5d290..66294bb4 100644 --- a/Graphics/GraphicsEngineD3D11/include/RenderPassD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/RenderPassD3D11Impl.hpp @@ -30,9 +30,9 @@ /// \file /// Declaration of Diligent::RenderPassD3D11Impl class +#include "EngineD3D11ImplTraits.hpp" #include "RenderDeviceD3D11.h" #include "RenderPassBase.hpp" -#include "RenderDeviceD3D11Impl.hpp" namespace Diligent { diff --git a/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.hpp index 415b8b69..07c6f682 100644 --- a/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.hpp @@ -30,16 +30,15 @@ /// \file /// Declaration of Diligent::SamplerD3D11Impl class +#include <atlbase.h> + +#include "EngineD3D11ImplTraits.hpp" #include "SamplerD3D11.h" -#include "RenderDeviceD3D11.h" #include "SamplerBase.hpp" -#include "RenderDeviceD3D11Impl.hpp" namespace Diligent { -class FixedBlockMemoryAllocator; - /// Sampler implementation in Direct3D11 backend. class SamplerD3D11Impl final : public SamplerBase<EngineD3D11ImplTraits> { diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.hpp index b17e473d..6b87ce6c 100644 --- a/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.hpp @@ -30,21 +30,18 @@ /// \file /// Declaration of Diligent::ShaderD3D11Impl class +#include <atlbase.h> + +#include "EngineD3D11ImplTraits.hpp" #include "ShaderD3D11.h" -#include "RenderDeviceD3D11.h" #include "ShaderBase.hpp" #include "ShaderD3DBase.hpp" -#include "ShaderResourceCacheD3D11.hpp" #include "EngineD3D11Defines.h" #include "ShaderResourcesD3D11.hpp" -#include "RenderDeviceD3D11Impl.hpp" namespace Diligent { -class FixedBlockMemoryAllocator; -class ResourceMapping; - /// Shader implementation in Direct3D11 backend. class ShaderD3D11Impl final : public ShaderBase<EngineD3D11ImplTraits>, public ShaderD3DBase { diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp index 36be84cc..13226d95 100644 --- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.hpp @@ -30,7 +30,7 @@ /// \file /// Declaration of Diligent::ShaderResourceBindingD3D11Impl class -#include <array> +#include "EngineD3D11ImplTraits.hpp" #include "ShaderResourceBindingD3D11.h" #include "RenderDeviceD3D11.h" diff --git a/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.hpp index 4bb89268..639feeb7 100644 --- a/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.hpp @@ -30,16 +30,15 @@ /// \file /// Declaration of Diligent::TextureViewD3D11Impl class +#include <atlbase.h> + +#include "EngineD3D11ImplTraits.hpp" #include "TextureViewD3D11.h" -#include "RenderDeviceD3D11.h" #include "TextureViewBase.hpp" -#include "RenderDeviceD3D11Impl.hpp" namespace Diligent { -class FixedBlockMemoryAllocator; - /// Texture view implementation in Direct3D11 backend. class TextureViewD3D11Impl final : public TextureViewBase<EngineD3D11ImplTraits> { diff --git a/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp index 3166c4aa..49a9c238 100644 --- a/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp @@ -29,8 +29,6 @@ #include "BufferD3D11Impl.hpp" -#include <atlbase.h> - #include "RenderDeviceD3D11Impl.hpp" #include "DeviceContextD3D11Impl.hpp" #include "BufferViewD3D11Impl.hpp" @@ -71,11 +69,11 @@ BufferD3D11Impl::BufferD3D11Impl(IReferenceCounters* pRefCounters, if (m_Desc.BindFlags & BIND_UNIFORM_BUFFER) { - static constexpr Uint32 Alignment = 16; - m_Desc.uiSizeInBytes = AlignUp(m_Desc.uiSizeInBytes, Alignment); + static constexpr Uint32 Alignment{16}; + m_Desc.uiSizeInBytes = AlignUp(m_Desc.uiSizeInBytes, Alignment); } - D3D11_BUFFER_DESC D3D11BuffDesc; + D3D11_BUFFER_DESC D3D11BuffDesc{}; D3D11BuffDesc.BindFlags = BindFlagsToD3D11BindFlags(m_Desc.BindFlags); D3D11BuffDesc.ByteWidth = m_Desc.uiSizeInBytes; D3D11BuffDesc.MiscFlags = 0; @@ -233,7 +231,7 @@ void BufferD3D11Impl::CreateViewInternal(const BufferViewDesc& OrigViewDesc, IBu try { - auto* pDeviceD3D11Impl = ValidatedCast<RenderDeviceD3D11Impl>(GetDevice()); + auto* pDeviceD3D11Impl = GetDevice(); auto& BuffViewAllocator = pDeviceD3D11Impl->GetBuffViewObjAllocator(); VERIFY(&BuffViewAllocator == &m_dbgBuffViewAllocator, "Buff view allocator does not match allocator provided at buffer initialization"); diff --git a/Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp index 8844b8d8..123c8c7b 100644 --- a/Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp @@ -28,6 +28,7 @@ #include "pch.h" #include "BufferViewD3D11Impl.hpp" #include "BufferD3D11Impl.hpp" +#include "RenderDeviceD3D11Impl.hpp" namespace Diligent { diff --git a/Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp b/Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp index c1d5ef78..b69242e8 100644 --- a/Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp +++ b/Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp @@ -26,6 +26,7 @@ */ #include "pch.h" + #include "D3D11TypeConversions.hpp" #include "D3D11TypeDefinitions.h" diff --git a/Graphics/GraphicsEngineD3D11/src/FramebufferD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/FramebufferD3D11Impl.cpp index b4f9ae2a..ccfb74a9 100644 --- a/Graphics/GraphicsEngineD3D11/src/FramebufferD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/FramebufferD3D11Impl.cpp @@ -28,6 +28,7 @@ #include "pch.h" #include "FramebufferD3D11Impl.hpp" +#include "RenderDeviceD3D11Impl.hpp" #include "EngineMemory.h" namespace Diligent diff --git a/Graphics/GraphicsEngineD3D11/src/QueryD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/QueryD3D11Impl.cpp index bf36e6a5..98c103ae 100644 --- a/Graphics/GraphicsEngineD3D11/src/QueryD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/QueryD3D11Impl.cpp @@ -28,6 +28,7 @@ #include "pch.h" #include "QueryD3D11Impl.hpp" +#include "RenderDeviceD3D11Impl.hpp" #include "DeviceContextD3D11Impl.hpp" namespace Diligent diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp index 3523e5b4..4ff5502d 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp @@ -26,7 +26,9 @@ */ #include "pch.h" + #include "RenderDeviceD3D11Impl.hpp" + #include "DeviceContextD3D11Impl.hpp" #include "BufferD3D11Impl.hpp" #include "ShaderD3D11Impl.hpp" @@ -34,7 +36,6 @@ #include "Texture2D_D3D11.hpp" #include "Texture3D_D3D11.hpp" #include "SamplerD3D11Impl.hpp" -#include "D3D11TypeConversions.hpp" #include "TextureViewD3D11Impl.hpp" #include "PipelineStateD3D11Impl.hpp" #include "ShaderResourceBindingD3D11Impl.hpp" @@ -43,6 +44,8 @@ #include "QueryD3D11Impl.hpp" #include "RenderPassD3D11Impl.hpp" #include "FramebufferD3D11Impl.hpp" + +#include "D3D11TypeConversions.hpp" #include "EngineMemory.h" namespace Diligent diff --git a/Graphics/GraphicsEngineD3D11/src/RenderPassD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderPassD3D11Impl.cpp index 1654da5a..a959b4c1 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderPassD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderPassD3D11Impl.cpp @@ -28,6 +28,7 @@ #include "pch.h" #include "RenderPassD3D11Impl.hpp" +#include "RenderDeviceD3D11Impl.hpp" #include "EngineMemory.h" namespace Diligent diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp index 9191c9ce..fbedb21c 100644 --- a/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp @@ -29,7 +29,6 @@ #include "ShaderD3D11Impl.hpp" #include "RenderDeviceD3D11Impl.hpp" -#include "ResourceMapping.h" namespace Diligent { diff --git a/Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp index 8c044823..1a26871a 100644 --- a/Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp @@ -27,7 +27,7 @@ #include "pch.h" #include "TextureViewD3D11Impl.hpp" -#include "DeviceContextD3D11Impl.hpp" +#include "RenderDeviceD3D11Impl.hpp" namespace Diligent { |
