git.s-ol.nu ~forks/DiligentCore / cfe063c
code cleanup azhirnov authored 6 months ago assiduous committed 6 months ago
65 changed file(s) with 9 addition(s) and 136 deletion(s). Raw diff Collapse all Expand all
1010 include/D3D11TypeDefinitions.h
1111 include/DeviceContextD3D11Impl.hpp
1212 include/DisjointQueryPool.hpp
13 include/EngineD3D11Defines.h
1413 include/EngineD3D11ImplTraits.hpp
1514 include/pch.h
1615 include/FenceD3D11Impl.hpp
3232 #include <atlbase.h>
3333
3434 #include "EngineD3D11ImplTraits.hpp"
35 #include "BufferD3D11.h"
3635 #include "BufferBase.hpp"
3736
3837 namespace Diligent
3232 #include <atlbase.h>
3333
3434 #include "EngineD3D11ImplTraits.hpp"
35 #include "BufferViewD3D11.h"
3635 #include "BufferViewBase.hpp"
3736
3837 namespace Diligent
3131
3232 #include <vector>
3333
34 #include "DeviceContextD3D11.h"
34 #include "EngineD3D11ImplTraits.hpp"
3535 #include "DeviceContextBase.hpp"
3636 #include "BufferD3D11Impl.hpp"
3737 #include "TextureBaseD3D11.hpp"
+0
-32
Graphics/GraphicsEngineD3D11/include/EngineD3D11Defines.h less more
0 /*
1 * Copyright 2019-2021 Diligent Graphics LLC
2 * Copyright 2015-2019 Egor Yusov
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * In no event and under no legal theory, whether in tort (including negligence),
17 * contract, or otherwise, unless required by applicable law (such as deliberate
18 * and grossly negligent acts) or agreed to in writing, shall any Contributor be
19 * liable for any damages, including any direct, indirect, special, incidental,
20 * or consequential damages of any character arising as a result of this License or
21 * out of the use or inability to use the software (including but not limited to damages
22 * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
23 * all other commercial damages or losses), even if such Contributor has been advised
24 * of the possibility of such damages.
25 */
26
27 #pragma once
28
29 #ifdef DILIGENT_DEBUG
30 # define VERIFY_SHADER_BINDINGS
31 #endif
3333 #include <atlbase.h>
3434
3535 #include "EngineD3D11ImplTraits.hpp"
36 #include "FenceD3D11.h"
3736 #include "FenceBase.hpp"
3837
3938 namespace Diligent
2929 /// \file
3030 /// Declaration of Diligent::PipelineStateD3D11Impl class
3131
32 #include "PipelineStateD3D11.h"
33 #include "RenderDeviceD3D11.h"
32 #include "EngineD3D11ImplTraits.hpp"
3433 #include "PipelineStateBase.hpp"
3534
3635 #include "PipelineResourceSignatureD3D11Impl.hpp" // Required by PipelineStateBase
3333 #include <atlbase.h>
3434
3535 #include "EngineD3D11ImplTraits.hpp"
36 #include "QueryD3D11.h"
3736 #include "QueryBase.hpp"
3837 #include "DisjointQueryPool.hpp"
3938
3030 /// Declaration of Diligent::RenderPassD3D11Impl class
3131
3232 #include "EngineD3D11ImplTraits.hpp"
33 #include "RenderDeviceD3D11.h"
3433 #include "RenderPassBase.hpp"
3534
3635 namespace Diligent
3736 {
38
39 class FixedBlockMemoryAllocator;
4037
4138 /// Render pass implementation in Direct3D11 backend.
4239 class RenderPassD3D11Impl final : public RenderPassBase<EngineD3D11ImplTraits>
3232 #include <atlbase.h>
3333
3434 #include "EngineD3D11ImplTraits.hpp"
35 #include "SamplerD3D11.h"
3635 #include "SamplerBase.hpp"
3736
3837 namespace Diligent
3232 #include <atlbase.h>
3333
3434 #include "EngineD3D11ImplTraits.hpp"
35 #include "ShaderD3D11.h"
3635 #include "ShaderBase.hpp"
3736 #include "ShaderD3DBase.hpp"
38 #include "EngineD3D11Defines.h"
3937 #include "ShaderResourcesD3D11.hpp"
4038
4139 namespace Diligent
3030 /// Declaration of Diligent::ShaderResourceBindingD3D11Impl class
3131
3232 #include "EngineD3D11ImplTraits.hpp"
33
34 #include "ShaderResourceBindingD3D11.h"
35 #include "RenderDeviceD3D11.h"
3633 #include "ShaderResourceBindingBase.hpp"
3734
3835 // ShaderResourceCacheD3D11 and ShaderVariableManagerD3D11 are required by ShaderResourceBindingBase
2929 /// \file
3030 /// Declaration of Diligent::TextureBaseD3D11 class
3131
32 #include "TextureD3D11.h"
33 #include "RenderDeviceD3D11.h"
32 #include "EngineD3D11ImplTraits.hpp"
3433 #include "TextureBase.hpp"
3534 #include "TextureViewD3D11Impl.hpp"
3635 #include "RenderDeviceD3D11Impl.hpp"
3232 #include <atlbase.h>
3333
3434 #include "EngineD3D11ImplTraits.hpp"
35 #include "TextureViewD3D11.h"
3635 #include "TextureViewBase.hpp"
3736
3837 namespace Diligent
6969 # include <d3d11_4.h>
7070 #endif
7171
72 #include "EngineD3D11Defines.h"
7372 #include "Errors.hpp"
7473 #include "RefCntAutoPtr.hpp"
7574 #include "DebugUtilities.hpp"
3636 #include "TextureViewD3D11Impl.hpp"
3737 #include "PipelineStateD3D11Impl.hpp"
3838 #include "ShaderResourceBindingD3D11Impl.hpp"
39 #include "EngineD3D11Defines.h"
4039 #include "CommandListD3D11Impl.hpp"
4140 #include "RenderDeviceD3D11Impl.hpp"
4241 #include "FenceD3D11Impl.hpp"
3030 /// Declaration of Diligent::BottomLevelASD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "BottomLevelASD3D12.h"
3433 #include "BottomLevelASBase.hpp"
3534 #include "D3D12ResourceBase.hpp"
3635
3030 /// Declaration of Diligent::BufferD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "BufferD3D12.h"
3433 #include "BufferBase.hpp"
3534 #include "BufferViewD3D12Impl.hpp" // Required by BufferBase
3635 #include "D3D12ResourceBase.hpp"
3030 /// Declaration of Diligent::BufferViewD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "BufferViewD3D12.h"
3433 #include "BufferViewBase.hpp"
3534 #include "DescriptorHeap.hpp"
3635
3232 #include <unordered_map>
3333 #include <vector>
3434
35 #include "DeviceContextD3D12.h"
35 #include "EngineD3D12ImplTraits.hpp"
3636 #include "DeviceContextNextGenBase.hpp"
3737
3838 // D3D12 object implementations are required by DeviceContextBase
3030 /// Declaration of Diligent::FenceD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "FenceD3D12.h"
3433 #include "FenceBase.hpp"
3534
3635 namespace Diligent
3232 #include <vector>
3333
3434 #include "EngineD3D12ImplTraits.hpp"
35 #include "PipelineStateD3D12.h"
3635 #include "PipelineStateBase.hpp"
3736 #include "PipelineResourceSignatureD3D12Impl.hpp" // Requiured by PipelineStateBase
3837 #include "RootSignature.hpp"
3232 #include <array>
3333
3434 #include "EngineD3D12ImplTraits.hpp"
35 #include "QueryD3D12.h"
3635 #include "QueryBase.hpp"
3736 #include "QueryManagerD3D12.hpp"
3837
3030 /// Declaration of Diligent::SamplerD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "SamplerD3D12.h"
3433 #include "SamplerBase.hpp"
3534 #include "DescriptorHeap.hpp"
3635
3030 /// Declaration of Diligent::ShaderBindingTableD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "ShaderBindingTableD3D12.h"
3433 #include "ShaderBindingTableBase.hpp"
3534 #include "TopLevelASD3D12Impl.hpp"
3635 #include "D3D12ResourceBase.hpp"
3030 /// Declaration of Diligent::ShaderD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "ShaderD3D12.h"
3433 #include "ShaderBase.hpp"
3534 #include "ShaderD3DBase.hpp"
3635 #include "ShaderResourcesD3D12.hpp"
3736
3837 namespace Diligent
3938 {
40
41 class ResourceMapping;
4239
4340 /// Implementation of a shader object in Direct3D12 backend.
4441 class ShaderD3D12Impl final : public ShaderBase<EngineD3D12ImplTraits>, public ShaderD3DBase
3131
3232 #include "EngineD3D12ImplTraits.hpp"
3333 #include "ShaderResourceBindingBase.hpp"
34 #include "ShaderResourceBindingD3D12.h"
3534
3635 // ShaderVariableManagerD3D12 and ShaderResourceCacheD3D12 are required by ShaderResourceBindingBase
3736 #include "ShaderVariableManagerD3D12.hpp"
3938
4039 namespace Diligent
4140 {
42
43 class PipelineResourceSignatureD3D12Impl;
4441
4542 /// Implementation of the Diligent::IShaderResourceBindingD3D12 interface
4643 // sizeof(ShaderResourceBindingD3D12Impl) == 96 (x64, msvc, Release)
3030 /// Declaration of Diligent::TextureD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "TextureD3D12.h"
3433 #include "TextureBase.hpp"
3534 #include "TextureViewD3D12Impl.hpp"
3635 #include "D3D12ResourceBase.hpp"
3030 /// Declaration of Diligent::TextureViewD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "TextureViewD3D12.h"
3433 #include "TextureViewBase.hpp"
3534 #include "DescriptorHeap.hpp"
3635
3030 /// Declaration of Diligent::TopLevelASD3D12Impl class
3131
3232 #include "EngineD3D12ImplTraits.hpp"
33 #include "TopLevelASD3D12.h"
3433 #include "TopLevelASBase.hpp"
3534 #include "D3D12ResourceBase.hpp"
3635 #include "BottomLevelASD3D12Impl.hpp" // Required by TopLevelASBase
2727 #pragma once
2828
2929 #include "EngineGLImplTraits.hpp"
30 #include "BufferGL.h"
3130 #include "BufferBase.hpp"
3231 #include "BufferViewGLImpl.hpp" // Required by BufferBase
3332 #include "GLObjectWrapper.hpp"
2727 #pragma once
2828
2929 #include "EngineGLImplTraits.hpp"
30 #include "BufferViewGL.h"
3130 #include "BufferViewBase.hpp"
3231 #include "GLObjectWrapper.hpp"
3332
2929 #include <vector>
3030
3131 #include "EngineGLImplTraits.hpp"
32 #include "DeviceContextGL.h"
3332 #include "DeviceContextBase.hpp"
3433
3534 // GL object implementations are required by DeviceContextBase
3333 #include <atomic>
3434
3535 #include "EngineGLImplTraits.hpp"
36 #include "FenceGL.h"
3736 #include "FenceBase.hpp"
3837 #include "GLObjectWrapper.hpp"
3938
4444
4545 namespace Diligent
4646 {
47
48 class RenderDeviceGLImpl;
4947
5048 enum BINDING_RANGE : Uint32
5149 {
2929 #include <vector>
3030
3131 #include "EngineGLImplTraits.hpp"
32 #include "PipelineStateGL.h"
3332 #include "PipelineStateBase.hpp"
3433
3534 #include "PipelineResourceSignatureGLImpl.hpp" // Requiured by PipelineStateBase
3030 /// Declaration of Diligent::QueryGLImpl class
3131
3232 #include "EngineGLImplTraits.hpp"
33 #include "QueryGL.h"
3433 #include "QueryBase.hpp"
3534 #include "GLObjectWrapper.hpp"
3635
2727 #pragma once
2828
2929 #include "EngineGLImplTraits.hpp"
30 #include "SamplerGL.h"
3130 #include "SamplerBase.hpp"
3231 #include "GLObjectWrapper.hpp"
3332
2727 #pragma once
2828
2929 #include "EngineGLImplTraits.hpp"
30 #include "ShaderGL.h"
3130 #include "ShaderBase.hpp"
3231 #include "GLObjectWrapper.hpp"
3332 #include "ShaderResourcesGL.hpp"
3030 /// Declaration of Diligent::ShaderResourceBindingGLImpl class
3131
3232 #include "EngineGLImplTraits.hpp"
33 #include "ShaderResourceBindingGL.h"
3433 #include "ShaderResourceBindingBase.hpp"
3534 #include "ShaderResourcesGL.hpp"
3635
2727 #pragma once
2828
2929 #include "EngineGLImplTraits.hpp"
30 #include "TextureGL.h"
3130 #include "TextureBase.hpp"
3231 #include "TextureViewGLImpl.hpp" // Required by TextureBase
3332 #include "GLObjectWrapper.hpp"
2727 #pragma once
2828
2929 #include "EngineGLImplTraits.hpp"
30 #include "TextureViewGL.h"
3130 #include "TextureViewBase.hpp"
3231 #include "GLObjectWrapper.hpp"
3332
3030 /// Definition of the Diligent::BottomLevelASVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "BottomLevelASVk.h"
3433 #include "BottomLevelASBase.hpp"
3534 #include "VulkanUtilities/VulkanObjectWrappers.hpp"
3635 #include "VulkanUtilities/VulkanMemoryManager.hpp"
3030 /// Declaration of Diligent::BufferViewVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "BufferViewVk.h"
3433 #include "BufferViewBase.hpp"
3534 #include "VulkanUtilities/VulkanObjectWrappers.hpp"
3635
3030 /// Declaration of Diligent::BufferVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "BufferVk.h"
3433 #include "BufferBase.hpp"
3534 #include "BufferViewVkImpl.hpp" // Required by BufferBase
3635
3434 #include <atomic>
3535
3636 #include "EngineVkImplTraits.hpp"
37 #include "CommandQueueVk.h"
3837 #include "ObjectBase.hpp"
3938 #include "FenceVkImpl.hpp"
4039
3333 #include <bitset>
3434
3535 #include "EngineVkImplTraits.hpp"
36
37 #include "DeviceContextVk.h"
3836 #include "DeviceContextNextGenBase.hpp"
3937
4038 // Vk object implementations are required by DeviceContextBase
3333 #include <atomic>
3434
3535 #include "EngineVkImplTraits.hpp"
36 #include "FenceVk.h"
3736 #include "FenceBase.hpp"
3837 #include "VulkanUtilities/VulkanFencePool.hpp"
3938
3030 /// Declaration of Diligent::FramebufferVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "FramebufferVk.h"
3433 #include "FramebufferBase.hpp"
3534 #include "VulkanUtilities/VulkanObjectWrappers.hpp"
3635
3232
3333 namespace Diligent
3434 {
35
36 class RenderDeviceVkImpl;
3735
3836 template <typename VulkanObjectWrapperType>
3937 class ManagedVulkanObject : public DeviceObjectBase<IDeviceObject, RenderDeviceVkImpl, DeviceObjectAttribs>
4747 namespace Diligent
4848 {
4949
50 class RenderDeviceVkImpl;
51 class ShaderVariableManagerVk;
5250 struct SPIRVShaderResourceAttribs;
5351
5452 /// Implementation of the Diligent::PipelineResourceSignatureVkImpl class
3333 #include <memory>
3434
3535 #include "EngineVkImplTraits.hpp"
36 #include "PipelineStateVk.h"
3736 #include "PipelineStateBase.hpp"
3837 #include "PipelineResourceSignatureVkImpl.hpp" // Required by PipelineStateBase
3938
4645
4746 namespace Diligent
4847 {
49
50 class FixedBlockMemoryAllocator;
51 class ShaderVariableManagerVk;
52 class ShaderVkImpl;
53 class ShaderResourceBindingVkImpl;
5448
5549 /// Pipeline state object implementation in Vulkan backend.
5650 class PipelineStateVkImpl final : public PipelineStateBase<EngineVkImplTraits>
3232 #include <array>
3333
3434 #include "EngineVkImplTraits.hpp"
35 #include "QueryVk.h"
3635 #include "QueryBase.hpp"
3736 #include "QueryManagerVk.hpp"
3837
3938 namespace Diligent
4039 {
41
42 class FixedBlockMemoryAllocator;
4340
4441 /// Query implementation in Vulkan backend.
4542 class QueryVkImpl final : public QueryBase<EngineVkImplTraits>
3232
3333 #include "EngineVkImplTraits.hpp"
3434
35 #include "CommandQueueVk.h"
36
3735 #include "RenderDeviceBase.hpp"
3836 #include "RenderDeviceNextGenBase.hpp"
3937
2929 /// \file
3030 /// Declaration of Diligent::RenderPassVkImpl class
3131
32 #include "RenderDeviceVk.h"
33 #include "RenderPassVk.h"
32 #include "EngineVkImplTraits.hpp"
3433 #include "RenderPassBase.hpp"
35 #include "RenderDeviceVkImpl.hpp"
3634 #include "VulkanUtilities/VulkanObjectWrappers.hpp"
3735
3836 namespace Diligent
3937 {
40
41 class FixedBlockMemoryAllocator;
4238
4339 /// Render pass implementation in Vulkan backend.
4440 class RenderPassVkImpl final : public RenderPassBase<EngineVkImplTraits>
3030 /// Declaration of Diligent::SamplerVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "SamplerVk.h"
3433 #include "SamplerBase.hpp"
3534 #include "VulkanUtilities/VulkanObjectWrappers.hpp"
3635
3736 namespace Diligent
3837 {
39
40 class FixedBlockMemoryAllocator;
4138
4239 /// Sampler object object implementation in Vulkan backend.
4340 class SamplerVkImpl final : public SamplerBase<EngineVkImplTraits>
3030 /// Definition of the Diligent::ShaderBindingTableVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "ShaderBindingTableVk.h"
3433 #include "ShaderBindingTableBase.hpp"
3534 #include "TopLevelASVkImpl.hpp"
3635 #include "PipelineStateVkImpl.hpp"
3030 /// Declaration of Diligent::ShaderResourceBindingVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "ShaderResourceBindingVk.h"
3433 #include "ShaderResourceBindingBase.hpp"
3534 #include "ShaderBase.hpp"
3635
3030 /// Declaration of Diligent::ShaderVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "ShaderVk.h"
3433 #include "ShaderBase.hpp"
3534 #include "SPIRVShaderResources.hpp"
3635
3736 namespace Diligent
3837 {
39
40 class ResourceMapping;
41 class FixedBlockMemoryAllocator;
4238
4339 /// Shader object object implementation in Vulkan backend.
4440 class ShaderVkImpl final : public ShaderBase<EngineVkImplTraits>
3030 /// Declaration of Diligent::TextureViewVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "TextureViewVk.h"
3433 #include "TextureViewBase.hpp"
3534 #include "VulkanUtilities/VulkanObjectWrappers.hpp"
3635
3736 namespace Diligent
3837 {
39
40 class FixedBlockMemoryAllocator;
4138
4239 /// Texture view implementation in Vulkan backend.
4340 class TextureViewVkImpl final : public TextureViewBase<EngineVkImplTraits>
3030 /// Declaration of Diligent::TextureVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "TextureVk.h"
3433 #include "TextureBase.hpp"
3534 #include "TextureViewVkImpl.hpp"
3635 #include "VulkanUtilities/VulkanMemoryManager.hpp"
3030 /// Definition of the Diligent::TopLevelASVkImpl class
3131
3232 #include "EngineVkImplTraits.hpp"
33 #include "TopLevelASVk.h"
3433 #include "TopLevelASBase.hpp"
3534 #include "BottomLevelASVkImpl.hpp"
3635 #include "VulkanUtilities/VulkanObjectWrappers.hpp"
3030 # define VK_NO_PROTOTYPES
3131 #endif
3232
33 #define VK_ENABLE_BETA_EXTENSIONS
34 #include "vulkan/vulkan.h"
35
3336 #define VK_FORMAT_RANGE_SIZE (VK_FORMAT_ASTC_12x12_SRGB_BLOCK - VK_FORMAT_UNDEFINED + 1)
3437
3538 #if DILIGENT_USE_VOLK
36 # define VK_ENABLE_BETA_EXTENSIONS
3739 # include "volk/volk.h"
38 #else
39 # include "vulkan/vulkan.h"
4040 #endif
4141
4242 #if defined(VK_USE_PLATFORM_XLIB_KHR) || defined(_X11_XLIB_H_)
2828 #include <vector>
2929
3030 #include "RenderPassVkImpl.hpp"
31 #include "RenderDeviceVkImpl.hpp"
3132 #include "VulkanTypeConversions.hpp"
3233
3334 namespace Diligent
3232 #include "VulkanTypeConversions.hpp"
3333 #include "EngineMemory.h"
3434
35 #ifdef VK_USE_PLATFORM_WIN32_KHR
36 # define WIN32_LEAN_AND_MEAN
37 # include <Windows.h>
38 # undef CreateSemaphore
39 #endif
40
4135 namespace Diligent
4236 {
4337