From 00e8dcdb71c6ae3fefd83958ead19b1d72f544e4 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 26 Jan 2020 15:21:35 -0800 Subject: More .h -> .hpp renamings --- Graphics/GraphicsEngineD3D12/CMakeLists.txt | 2 +- .../include/D3D12TypeConversions.h | 74 ---------------------- .../include/D3D12TypeConversions.hpp | 74 ++++++++++++++++++++++ .../GraphicsEngineD3D12/src/BufferD3D12Impl.cpp | 4 +- .../GraphicsEngineD3D12/src/CommandContext.cpp | 2 +- .../src/D3D12TypeConversions.cpp | 4 +- .../src/DeviceContextD3D12Impl.cpp | 4 +- .../GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp | 2 +- .../src/PipelineStateD3D12Impl.cpp | 4 +- .../GraphicsEngineD3D12/src/QueryManagerD3D12.cpp | 2 +- .../src/RenderDeviceD3D12Impl.cpp | 2 +- Graphics/GraphicsEngineD3D12/src/RootSignature.cpp | 2 +- .../GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp | 2 +- .../GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp | 2 +- .../GraphicsEngineD3D12/src/TextureD3D12Impl.cpp | 4 +- 15 files changed, 92 insertions(+), 92 deletions(-) delete mode 100644 Graphics/GraphicsEngineD3D12/include/D3D12TypeConversions.h create mode 100644 Graphics/GraphicsEngineD3D12/include/D3D12TypeConversions.hpp (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/CMakeLists.txt b/Graphics/GraphicsEngineD3D12/CMakeLists.txt index fa3b4b70..6ea2fc22 100644 --- a/Graphics/GraphicsEngineD3D12/CMakeLists.txt +++ b/Graphics/GraphicsEngineD3D12/CMakeLists.txt @@ -10,7 +10,7 @@ set(INCLUDE include/CommandListManager.hpp include/CommandQueueD3D12Impl.hpp include/D3D12ResourceBase.hpp - include/D3D12TypeConversions.h + include/D3D12TypeConversions.hpp include/D3D12TypeDefinitions.h include/D3D12Utils.h include/d3dx12_win.h diff --git a/Graphics/GraphicsEngineD3D12/include/D3D12TypeConversions.h b/Graphics/GraphicsEngineD3D12/include/D3D12TypeConversions.h deleted file mode 100644 index bdaa3f5e..00000000 --- a/Graphics/GraphicsEngineD3D12/include/D3D12TypeConversions.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2019-2020 Diligent Graphics LLC - * Copyright 2015-2019 Egor Yusov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * In no event and under no legal theory, whether in tort (including negligence), - * contract, or otherwise, unless required by applicable law (such as deliberate - * and grossly negligent acts) or agreed to in writing, shall any Contributor be - * liable for any damages, including any direct, indirect, special, incidental, - * or consequential damages of any character arising as a result of this License or - * out of the use or inability to use the software (including but not limited to damages - * for loss of goodwill, work stoppage, computer failure or malfunction, or any and - * all other commercial damages or losses), even if such Contributor has been advised - * of the possibility of such damages. - */ - -#pragma once - -/// \file -/// Type conversion routines - -#include "GraphicsTypes.h" - -namespace Diligent -{ - -D3D12_COMPARISON_FUNC ComparisonFuncToD3D12ComparisonFunc(COMPARISON_FUNCTION Func); -D3D12_FILTER FilterTypeToD3D12Filter(FILTER_TYPE MinFilter, FILTER_TYPE MagFilter, FILTER_TYPE MipFilter); -D3D12_TEXTURE_ADDRESS_MODE TexAddressModeToD3D12AddressMode(TEXTURE_ADDRESS_MODE Mode); -D3D12_PRIMITIVE_TOPOLOGY TopologyToD3D12Topology(PRIMITIVE_TOPOLOGY Topology); - -void DepthStencilStateDesc_To_D3D12_DEPTH_STENCIL_DESC(const DepthStencilStateDesc& DepthStencilDesc, - D3D12_DEPTH_STENCIL_DESC& d3d12DSSDesc); -void RasterizerStateDesc_To_D3D12_RASTERIZER_DESC(const RasterizerStateDesc& RasterizerDesc, - D3D12_RASTERIZER_DESC& d3d11RSDesc); -void BlendStateDesc_To_D3D12_BLEND_DESC(const BlendStateDesc& BSDesc, - D3D12_BLEND_DESC& d3d12BlendDesc); - -void LayoutElements_To_D3D12_INPUT_ELEMENT_DESCs(const InputLayoutDesc& InputLayout, - std::vector>& d3d12InputElements); - -// clang-format off -void TextureViewDesc_to_D3D12_SRV_DESC(const TextureViewDesc& SRVDesc, D3D12_SHADER_RESOURCE_VIEW_DESC &D3D12SRVDesc, Uint32 SampleCount); -void TextureViewDesc_to_D3D12_RTV_DESC(const TextureViewDesc& RTVDesc, D3D12_RENDER_TARGET_VIEW_DESC &D3D12RTVDesc, Uint32 SampleCount); -void TextureViewDesc_to_D3D12_DSV_DESC(const TextureViewDesc& DSVDesc, D3D12_DEPTH_STENCIL_VIEW_DESC &D3D12DSVDesc, Uint32 SampleCount); -void TextureViewDesc_to_D3D12_UAV_DESC(const TextureViewDesc& UAVDesc, D3D12_UNORDERED_ACCESS_VIEW_DESC &D3D12UAVDesc); -// clang-format on - -void BufferViewDesc_to_D3D12_SRV_DESC(const BufferDesc& BuffDesc, - const BufferViewDesc& SRVDesc, - D3D12_SHADER_RESOURCE_VIEW_DESC& D3D12SRVDesc); -void BufferViewDesc_to_D3D12_UAV_DESC(const BufferDesc& BuffDesc, - const BufferViewDesc& UAVDesc, - D3D12_UNORDERED_ACCESS_VIEW_DESC& D3D12UAVDesc); - -D3D12_STATIC_BORDER_COLOR BorderColorToD3D12StaticBorderColor(const Float32 BorderColor[]); -D3D12_RESOURCE_STATES ResourceStateFlagsToD3D12ResourceStates(RESOURCE_STATE StateFlags); -RESOURCE_STATE D3D12ResourceStatesToResourceStateFlags(D3D12_RESOURCE_STATES StateFlags); - -D3D12_QUERY_HEAP_TYPE QueryTypeToD3D12QueryHeapType(QUERY_TYPE QueryType); -D3D12_QUERY_TYPE QueryTypeToD3D12QueryType(QUERY_TYPE QueryType); - -} // namespace Diligent diff --git a/Graphics/GraphicsEngineD3D12/include/D3D12TypeConversions.hpp b/Graphics/GraphicsEngineD3D12/include/D3D12TypeConversions.hpp new file mode 100644 index 00000000..bdaa3f5e --- /dev/null +++ b/Graphics/GraphicsEngineD3D12/include/D3D12TypeConversions.hpp @@ -0,0 +1,74 @@ +/* + * Copyright 2019-2020 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#pragma once + +/// \file +/// Type conversion routines + +#include "GraphicsTypes.h" + +namespace Diligent +{ + +D3D12_COMPARISON_FUNC ComparisonFuncToD3D12ComparisonFunc(COMPARISON_FUNCTION Func); +D3D12_FILTER FilterTypeToD3D12Filter(FILTER_TYPE MinFilter, FILTER_TYPE MagFilter, FILTER_TYPE MipFilter); +D3D12_TEXTURE_ADDRESS_MODE TexAddressModeToD3D12AddressMode(TEXTURE_ADDRESS_MODE Mode); +D3D12_PRIMITIVE_TOPOLOGY TopologyToD3D12Topology(PRIMITIVE_TOPOLOGY Topology); + +void DepthStencilStateDesc_To_D3D12_DEPTH_STENCIL_DESC(const DepthStencilStateDesc& DepthStencilDesc, + D3D12_DEPTH_STENCIL_DESC& d3d12DSSDesc); +void RasterizerStateDesc_To_D3D12_RASTERIZER_DESC(const RasterizerStateDesc& RasterizerDesc, + D3D12_RASTERIZER_DESC& d3d11RSDesc); +void BlendStateDesc_To_D3D12_BLEND_DESC(const BlendStateDesc& BSDesc, + D3D12_BLEND_DESC& d3d12BlendDesc); + +void LayoutElements_To_D3D12_INPUT_ELEMENT_DESCs(const InputLayoutDesc& InputLayout, + std::vector>& d3d12InputElements); + +// clang-format off +void TextureViewDesc_to_D3D12_SRV_DESC(const TextureViewDesc& SRVDesc, D3D12_SHADER_RESOURCE_VIEW_DESC &D3D12SRVDesc, Uint32 SampleCount); +void TextureViewDesc_to_D3D12_RTV_DESC(const TextureViewDesc& RTVDesc, D3D12_RENDER_TARGET_VIEW_DESC &D3D12RTVDesc, Uint32 SampleCount); +void TextureViewDesc_to_D3D12_DSV_DESC(const TextureViewDesc& DSVDesc, D3D12_DEPTH_STENCIL_VIEW_DESC &D3D12DSVDesc, Uint32 SampleCount); +void TextureViewDesc_to_D3D12_UAV_DESC(const TextureViewDesc& UAVDesc, D3D12_UNORDERED_ACCESS_VIEW_DESC &D3D12UAVDesc); +// clang-format on + +void BufferViewDesc_to_D3D12_SRV_DESC(const BufferDesc& BuffDesc, + const BufferViewDesc& SRVDesc, + D3D12_SHADER_RESOURCE_VIEW_DESC& D3D12SRVDesc); +void BufferViewDesc_to_D3D12_UAV_DESC(const BufferDesc& BuffDesc, + const BufferViewDesc& UAVDesc, + D3D12_UNORDERED_ACCESS_VIEW_DESC& D3D12UAVDesc); + +D3D12_STATIC_BORDER_COLOR BorderColorToD3D12StaticBorderColor(const Float32 BorderColor[]); +D3D12_RESOURCE_STATES ResourceStateFlagsToD3D12ResourceStates(RESOURCE_STATE StateFlags); +RESOURCE_STATE D3D12ResourceStatesToResourceStateFlags(D3D12_RESOURCE_STATES StateFlags); + +D3D12_QUERY_HEAP_TYPE QueryTypeToD3D12QueryHeapType(QUERY_TYPE QueryType); +D3D12_QUERY_TYPE QueryTypeToD3D12QueryType(QUERY_TYPE QueryType); + +} // namespace Diligent diff --git a/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp index 71d4ebce..b1c4c8e8 100644 --- a/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp @@ -29,10 +29,10 @@ #include "BufferD3D12Impl.hpp" #include "RenderDeviceD3D12Impl.hpp" #include "DeviceContextD3D12Impl.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" #include "BufferViewD3D12Impl.hpp" #include "GraphicsAccessories.hpp" -#include "DXGITypeConversions.h" +#include "DXGITypeConversions.hpp" #include "EngineMemory.h" #include "StringTools.hpp" diff --git a/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp b/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp index ebc46582..253d2822 100644 --- a/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp +++ b/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp @@ -31,7 +31,7 @@ #include "TextureD3D12Impl.hpp" #include "BufferD3D12Impl.hpp" #include "CommandListManager.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" namespace Diligent diff --git a/Graphics/GraphicsEngineD3D12/src/D3D12TypeConversions.cpp b/Graphics/GraphicsEngineD3D12/src/D3D12TypeConversions.cpp index dfb01d88..e1da052f 100644 --- a/Graphics/GraphicsEngineD3D12/src/D3D12TypeConversions.cpp +++ b/Graphics/GraphicsEngineD3D12/src/D3D12TypeConversions.cpp @@ -29,8 +29,8 @@ #include -#include "D3D12TypeConversions.h" -#include "DXGITypeConversions.h" +#include "D3D12TypeConversions.hpp" +#include "DXGITypeConversions.hpp" #include "D3D12TypeDefinitions.h" #include "D3DTypeConversionImpl.hpp" diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp index ba509cd5..582b8cad 100644 --- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp @@ -34,11 +34,11 @@ #include "TextureD3D12Impl.hpp" #include "BufferD3D12Impl.hpp" #include "FenceD3D12Impl.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" #include "d3dx12_win.h" #include "D3D12DynamicHeap.hpp" #include "CommandListD3D12Impl.hpp" -#include "DXGITypeConversions.h" +#include "DXGITypeConversions.hpp" namespace Diligent { diff --git a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp index ad68183d..bed9a84b 100644 --- a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp +++ b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp @@ -37,7 +37,7 @@ #include "RenderDeviceD3D12Impl.hpp" #include "DeviceContextD3D12Impl.hpp" #include "SwapChainD3D12Impl.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" #include "EngineFactoryD3DBase.hpp" #include "StringTools.hpp" #include "EngineMemory.h" diff --git a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp index 3534c891..6cfe1b1e 100644 --- a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp @@ -29,9 +29,9 @@ #include #include "PipelineStateD3D12Impl.hpp" #include "ShaderD3D12Impl.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" #include "RenderDeviceD3D12Impl.hpp" -#include "DXGITypeConversions.h" +#include "DXGITypeConversions.hpp" #include "ShaderResourceBindingD3D12Impl.hpp" #include "CommandContext.hpp" #include "EngineMemory.h" diff --git a/Graphics/GraphicsEngineD3D12/src/QueryManagerD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/QueryManagerD3D12.cpp index bf99bdcc..e27d6be6 100644 --- a/Graphics/GraphicsEngineD3D12/src/QueryManagerD3D12.cpp +++ b/Graphics/GraphicsEngineD3D12/src/QueryManagerD3D12.cpp @@ -29,7 +29,7 @@ #include #include "QueryManagerD3D12.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" #include "GraphicsAccessories.hpp" #include "CommandContext.hpp" #include "Align.hpp" diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp index 73be3632..781a711d 100644 --- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp @@ -31,7 +31,7 @@ #include "PipelineStateD3D12Impl.hpp" #include "ShaderD3D12Impl.hpp" #include "TextureD3D12Impl.hpp" -#include "DXGITypeConversions.h" +#include "DXGITypeConversions.hpp" #include "SamplerD3D12Impl.hpp" #include "BufferD3D12Impl.hpp" #include "ShaderResourceBindingD3D12Impl.hpp" diff --git a/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp b/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp index 26c02d7d..33978eaf 100644 --- a/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp +++ b/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp @@ -33,7 +33,7 @@ #include "CommandContext.hpp" #include "RenderDeviceD3D12Impl.hpp" #include "TextureD3D12Impl.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" #include "HashUtils.hpp" namespace Diligent diff --git a/Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp index e53fa1b5..1002dc37 100644 --- a/Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp @@ -28,7 +28,7 @@ #include "pch.h" #include "SamplerD3D12Impl.hpp" #include "RenderDeviceD3D12Impl.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" namespace Diligent { diff --git a/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp index ac24533c..ef133c48 100644 --- a/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp @@ -29,7 +29,7 @@ #include "SwapChainD3D12Impl.hpp" #include "RenderDeviceD3D12Impl.hpp" #include "DeviceContextD3D12Impl.hpp" -#include "DXGITypeConversions.h" +#include "DXGITypeConversions.hpp" #include "TextureD3D12Impl.hpp" #include "EngineMemory.h" diff --git a/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp index 7155863d..a4033f51 100644 --- a/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp @@ -29,9 +29,9 @@ #include "TextureD3D12Impl.hpp" #include "RenderDeviceD3D12Impl.hpp" #include "DeviceContextD3D12Impl.hpp" -#include "D3D12TypeConversions.h" +#include "D3D12TypeConversions.hpp" #include "TextureViewD3D12Impl.hpp" -#include "DXGITypeConversions.h" +#include "DXGITypeConversions.hpp" #include "d3dx12_win.h" #include "EngineMemory.h" #include "StringTools.hpp" -- cgit v1.2.3