summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-28 05:45:08 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-28 05:45:08 +0000
commit5cf012cfbc7017b46912b9f59a9f76a2d4b870b3 (patch)
tree911054514a37c26a82cb4152bf04fcf148d9556b /Graphics/GraphicsEngine
parentRemoved legacy visual studio project and solution files (diff)
downloadDiligentCore-5cf012cfbc7017b46912b9f59a9f76a2d4b870b3.tar.gz
DiligentCore-5cf012cfbc7017b46912b9f59a9f76a2d4b870b3.zip
Reworked Common and Platform modules to break interdependenices;
Replaced static const->static constexpr where appropriate
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/BufferBase.h2
-rw-r--r--Graphics/GraphicsEngine/include/DeviceContextBase.h12
-rw-r--r--Graphics/GraphicsEngine/include/RenderDeviceBase.h4
-rw-r--r--Graphics/GraphicsEngine/include/ShaderBase.h8
-rw-r--r--Graphics/GraphicsEngine/include/StateObjectsRegistry.h2
-rw-r--r--Graphics/GraphicsEngine/include/TextureBase.h6
-rw-r--r--Graphics/GraphicsEngine/interface/BlendState.h2
-rw-r--r--Graphics/GraphicsEngine/interface/Buffer.h2
-rw-r--r--Graphics/GraphicsEngine/interface/BufferView.h2
-rw-r--r--Graphics/GraphicsEngine/interface/CommandList.h2
-rw-r--r--Graphics/GraphicsEngine/interface/Constants.h4
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceContext.h2
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceObject.h4
-rw-r--r--Graphics/GraphicsEngine/interface/InputLayout.h2
-rw-r--r--Graphics/GraphicsEngine/interface/MapHelper.h2
-rw-r--r--Graphics/GraphicsEngine/interface/PipelineState.h5
-rw-r--r--Graphics/GraphicsEngine/interface/RenderDevice.h4
-rw-r--r--Graphics/GraphicsEngine/interface/ResourceMapping.h2
-rw-r--r--Graphics/GraphicsEngine/interface/Sampler.h2
-rw-r--r--Graphics/GraphicsEngine/interface/Shader.h4
-rw-r--r--Graphics/GraphicsEngine/interface/ShaderResourceBinding.h4
-rw-r--r--Graphics/GraphicsEngine/interface/SwapChain.h2
-rw-r--r--Graphics/GraphicsEngine/interface/Texture.h2
-rw-r--r--Graphics/GraphicsEngine/interface/TextureView.h2
-rw-r--r--Graphics/GraphicsEngine/src/EngineMemory.cpp2
-rw-r--r--Graphics/GraphicsEngine/src/ResourceMapping.cpp2
-rw-r--r--Graphics/GraphicsEngine/src/Texture.cpp4
27 files changed, 46 insertions, 45 deletions
diff --git a/Graphics/GraphicsEngine/include/BufferBase.h b/Graphics/GraphicsEngine/include/BufferBase.h
index fa9a3f50..692918cf 100644
--- a/Graphics/GraphicsEngine/include/BufferBase.h
+++ b/Graphics/GraphicsEngine/include/BufferBase.h
@@ -194,7 +194,7 @@ void BufferBase<BaseInterface, BufferViewImplType, TBuffViewObjAllocator> :: Map
if (this->m_Desc.Usage == USAGE_DYNAMIC)
{
- VERIFY((MapFlags & MAP_FLAG_DISCARD) != 0 && MapType == MAP_WRITE, "Dynamic buffers can only be mapped for writing with discard flag")
+ VERIFY((MapFlags & MAP_FLAG_DISCARD) != 0 && MapType == MAP_WRITE, "Dynamic buffers can only be mapped for writing with discard flag");
}
if ( (MapFlags & MAP_FLAG_DISCARD) != 0 )
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h
index 736cd265..3d84ecd1 100644
--- a/Graphics/GraphicsEngine/include/DeviceContextBase.h
+++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h
@@ -202,13 +202,13 @@ inline void DeviceContextBase<BaseInterface> :: SetVertexBuffers( Uint32 StartSl
{
if( StartSlot >= MaxBufferSlots )
{
- LOG_ERROR_MESSAGE( "Start vertex buffer slot ", StartSlot, " is out of allowed range [0, ", MaxBufferSlots-1, "]." )
+ LOG_ERROR_MESSAGE( "Start vertex buffer slot ", StartSlot, " is out of allowed range [0, ", MaxBufferSlots-1, "]." );
return;
}
if( StartSlot + NumBuffersSet > MaxBufferSlots )
{
- LOG_ERROR_MESSAGE( "The range of vertex buffer slots being set [", StartSlot, ", ", StartSlot + NumBuffersSet - 1, "] is out of allowed range [0, ", MaxBufferSlots - 1, "]." )
+ LOG_ERROR_MESSAGE( "The range of vertex buffer slots being set [", StartSlot, ", ", StartSlot + NumBuffersSet - 1, "] is out of allowed range [0, ", MaxBufferSlots - 1, "]." );
NumBuffersSet = MaxBufferSlots - StartSlot;
}
@@ -383,7 +383,7 @@ inline void DeviceContextBase<BaseInterface> :: GetRenderTargetSize( Uint32 &RTW
}
else
{
- LOG_ERROR("Failed to determine default render target size: swap chain is not initialized in the device context")
+ LOG_ERROR("Failed to determine default render target size: swap chain is not initialized in the device context");
}
}
}
@@ -396,7 +396,7 @@ inline void DeviceContextBase<BaseInterface> :: SetViewports( Uint32 NumViewport
GetRenderTargetSize( RTWidth, RTHeight );
}
- VERIFY(NumViewports < MaxRenderTargets, "Num viewports (", NumViewports,") exceeds the limit (", MaxRenderTargets, ")")
+ VERIFY(NumViewports < MaxRenderTargets, "Num viewports (", NumViewports, ") exceeds the limit (", MaxRenderTargets, ")");
m_NumViewports = std::min(MaxRenderTargets, NumViewports);
Viewport DefaultVP( 0, 0, static_cast<float>(RTWidth), static_cast<float>(RTHeight) );
@@ -434,7 +434,7 @@ inline void DeviceContextBase<BaseInterface> :: SetScissorRects( Uint32 NumRects
GetRenderTargetSize( RTWidth, RTHeight );
}
- VERIFY(NumRects < MaxRenderTargets, "Num scissor rects (", NumRects,") exceeds the limit (", MaxRenderTargets, ")")
+ VERIFY(NumRects < MaxRenderTargets, "Num scissor rects (", NumRects, ") exceeds the limit (", MaxRenderTargets, ")");
m_NumScissorRects = std::min(MaxRenderTargets, NumRects);
for( Uint32 sr = 0; sr < m_NumScissorRects; ++sr )
@@ -578,7 +578,7 @@ inline void DeviceContextBase<BaseInterface> :: ClearStateCache()
#ifdef _DEBUG
for (Uint32 rt = m_NumBoundRenderTargets; rt < _countof(m_pBoundRenderTargets); ++rt)
{
- VERIFY(m_pBoundRenderTargets[rt] == nullptr, "Non-null render target found")
+ VERIFY(m_pBoundRenderTargets[rt] == nullptr, "Non-null render target found");
}
#endif
m_NumBoundRenderTargets = 0;
diff --git a/Graphics/GraphicsEngine/include/RenderDeviceBase.h b/Graphics/GraphicsEngine/include/RenderDeviceBase.h
index 56ae5288..a6a84c4a 100644
--- a/Graphics/GraphicsEngine/include/RenderDeviceBase.h
+++ b/Graphics/GraphicsEngine/include/RenderDeviceBase.h
@@ -442,11 +442,11 @@ void RenderDeviceBase<BaseInterface> :: CreateDeviceObject( const Char *ObjectTy
auto ObjectDescString = GetObjectDescString( Desc );
if( ObjectDescString.length() )
{
- LOG_ERROR( "Failed to create ", ObjectTypeName, " object \"", Desc.Name ? Desc.Name : "", "\"\n", ObjectDescString )
+ LOG_ERROR( "Failed to create ", ObjectTypeName, " object \"", Desc.Name ? Desc.Name : "", "\"\n", ObjectDescString );
}
else
{
- LOG_ERROR( "Failed to create ", ObjectTypeName, " object \"", Desc.Name ? Desc.Name : "", "\"" )
+ LOG_ERROR( "Failed to create ", ObjectTypeName, " object \"", Desc.Name ? Desc.Name : "", "\"" );
}
}
}
diff --git a/Graphics/GraphicsEngine/include/ShaderBase.h b/Graphics/GraphicsEngine/include/ShaderBase.h
index 17b8a453..d8b857ce 100644
--- a/Graphics/GraphicsEngine/include/ShaderBase.h
+++ b/Graphics/GraphicsEngine/include/ShaderBase.h
@@ -192,7 +192,7 @@ public:
for (Uint32 v = 0; v < this->m_Desc.NumVariables; ++v, ++Str)
{
m_VariablesDesc[v] = this->m_Desc.VariableDesc[v];
- VERIFY( m_VariablesDesc[v].Name != nullptr, "Variable name not provided" )
+ VERIFY(m_VariablesDesc[v].Name != nullptr, "Variable name not provided");
*Str = m_VariablesDesc[v].Name;
m_VariablesDesc[v].Name = Str->c_str();
}
@@ -203,7 +203,7 @@ public:
for (Uint32 s = 0; s < this->m_Desc.NumStaticSamplers; ++s, ++Str)
{
m_StaticSamplers[s] = this->m_Desc.StaticSamplers[s];
- VERIFY( m_StaticSamplers[s].TextureName != nullptr, "Static sampler texture name not provided" )
+ VERIFY(m_StaticSamplers[s].TextureName != nullptr, "Static sampler texture name not provided");
*Str = m_StaticSamplers[s].TextureName;
m_StaticSamplers[s].TextureName = Str->c_str();
#ifdef _DEBUG
@@ -212,14 +212,14 @@ public:
(BorderColor[0] == 0 && BorderColor[1] == 0 && BorderColor[2] == 0 && BorderColor[3] == 1) ||
(BorderColor[0] == 1 && BorderColor[1] == 1 && BorderColor[2] == 1 && BorderColor[3] == 0) ) )
{
- LOG_WARNING_MESSAGE("Static sampler for variable \"", *Str , "\" specifies border color (", BorderColor[0], ", ", BorderColor[1], ", ", BorderColor[2], ", ", BorderColor[3], "). D3D12 static samplers only allow transparent black (0,0,0,1), opaque black (0,0,0,0) or opaque white (1,1,1,0) as border colors")
+ LOG_WARNING_MESSAGE("Static sampler for variable \"", *Str , "\" specifies border color (", BorderColor[0], ", ", BorderColor[1], ", ", BorderColor[2], ", ", BorderColor[3], "). D3D12 static samplers only allow transparent black (0,0,0,1), opaque black (0,0,0,0) or opaque white (1,1,1,0) as border colors");
}
#endif
}
this->m_Desc.StaticSamplers = m_StaticSamplers.data();
}
- VERIFY_EXPR(Str == m_StringPool.end())
+ VERIFY_EXPR(Str == m_StringPool.end());
}
IMPLEMENT_QUERY_INTERFACE_IN_PLACE( IID_Shader, TDeviceObjectBase )
diff --git a/Graphics/GraphicsEngine/include/StateObjectsRegistry.h b/Graphics/GraphicsEngine/include/StateObjectsRegistry.h
index febad5c6..97451698 100644
--- a/Graphics/GraphicsEngine/include/StateObjectsRegistry.h
+++ b/Graphics/GraphicsEngine/include/StateObjectsRegistry.h
@@ -59,7 +59,7 @@ namespace Diligent
{
public:
/// Number of outstanding deleted objects to purge the registry.
- static const int DeletedObjectsToPurge = 32;
+ static constexpr int DeletedObjectsToPurge = 32;
StateObjectsRegistry(IMemoryAllocator &RawAllocator, const Char* RegistryName) :
m_RegistryName( RegistryName ),
diff --git a/Graphics/GraphicsEngine/include/TextureBase.h b/Graphics/GraphicsEngine/include/TextureBase.h
index cbf1bff1..aecb0d69 100644
--- a/Graphics/GraphicsEngine/include/TextureBase.h
+++ b/Graphics/GraphicsEngine/include/TextureBase.h
@@ -183,7 +183,7 @@ protected:
template<class BaseInterface, class TTextureViewImpl, class TTexViewObjAllocator>
void TextureBase<BaseInterface, TTextureViewImpl, TTexViewObjAllocator> :: CorrectTextureViewDesc(struct TextureViewDesc &ViewDesc)
{
-#define TEX_VIEW_VALIDATION_ERROR(...) LOG_ERROR_AND_THROW( "Texture view \"", ViewDesc.Name ? ViewDesc.Name : "", "\": ", ##__VA_ARGS__ );
+#define TEX_VIEW_VALIDATION_ERROR(...) LOG_ERROR_AND_THROW( "Texture view \"", ViewDesc.Name ? ViewDesc.Name : "", "\": ", ##__VA_ARGS__ )
if( !(ViewDesc.ViewType > TEXTURE_VIEW_UNDEFINED && ViewDesc.ViewType < TEXTURE_VIEW_NUM_VIEWS) )
TEX_VIEW_VALIDATION_ERROR( "Texture view type is not specified" );
@@ -210,7 +210,7 @@ void TextureBase<BaseInterface, TTextureViewImpl, TTexViewObjAllocator> :: Corre
ViewDesc.TextureDim = RESOURCE_DIM_TEX_2D_ARRAY;
break;
- default: UNEXPECTED("Unexpected view type")
+ default: UNEXPECTED("Unexpected view type");
}
}
else
@@ -344,7 +344,7 @@ void TextureBase<BaseInterface, TTextureViewImpl, TTexViewObjAllocator> :: Corre
}
else
{
- UNEXPECTED("Unexpected texture dimension")
+ UNEXPECTED("Unexpected texture dimension");
}
#undef TEX_VIEW_VALIDATION_ERROR
diff --git a/Graphics/GraphicsEngine/interface/BlendState.h b/Graphics/GraphicsEngine/interface/BlendState.h
index 11c8ee41..4c1a0858 100644
--- a/Graphics/GraphicsEngine/interface/BlendState.h
+++ b/Graphics/GraphicsEngine/interface/BlendState.h
@@ -359,7 +359,7 @@ struct BlendStateDesc
Bool IndependentBlendEnable;
/// Constant member defining the maximum number of render targets
- static const int MaxRenderTargets = 8;
+ static constexpr int MaxRenderTargets = 8;
/// An array of RenderTargetBlendDesc structures that describe the blend
/// states for render targets
diff --git a/Graphics/GraphicsEngine/interface/Buffer.h b/Graphics/GraphicsEngine/interface/Buffer.h
index 2e6b407e..572473a6 100644
--- a/Graphics/GraphicsEngine/interface/Buffer.h
+++ b/Graphics/GraphicsEngine/interface/Buffer.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {EC47EAD3-A2C4-44F2-81C5-5248D14F10E4}
-static const Diligent::INTERFACE_ID IID_Buffer =
+static constexpr INTERFACE_ID IID_Buffer =
{ 0xec47ead3, 0xa2c4, 0x44f2, { 0x81, 0xc5, 0x52, 0x48, 0xd1, 0x4f, 0x10, 0xe4 } };
/// Describes the buffer access mode.
diff --git a/Graphics/GraphicsEngine/interface/BufferView.h b/Graphics/GraphicsEngine/interface/BufferView.h
index d5224a8a..1110d802 100644
--- a/Graphics/GraphicsEngine/interface/BufferView.h
+++ b/Graphics/GraphicsEngine/interface/BufferView.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {E2E83490-E9D2-495B-9A83-ABB413A38B07}
-static const Diligent::INTERFACE_ID IID_BufferView =
+static constexpr INTERFACE_ID IID_BufferView =
{ 0xe2e83490, 0xe9d2, 0x495b, { 0x9a, 0x83, 0xab, 0xb4, 0x13, 0xa3, 0x8b, 0x7 } };
/// Buffer view description
diff --git a/Graphics/GraphicsEngine/interface/CommandList.h b/Graphics/GraphicsEngine/interface/CommandList.h
index b8f3ecd4..41532c12 100644
--- a/Graphics/GraphicsEngine/interface/CommandList.h
+++ b/Graphics/GraphicsEngine/interface/CommandList.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {C38C68F2-8A8C-4ED5-B7EE-69126E75DCD8}
-static const Diligent::INTERFACE_ID IID_CommandList =
+static constexpr INTERFACE_ID IID_CommandList =
{ 0xc38c68f2, 0x8a8c, 0x4ed5, { 0xb7, 0xee, 0x69, 0x12, 0x6e, 0x75, 0xdc, 0xd8 } };
/// Command list interface
diff --git a/Graphics/GraphicsEngine/interface/Constants.h b/Graphics/GraphicsEngine/interface/Constants.h
index e5ac8c45..0ac3ca05 100644
--- a/Graphics/GraphicsEngine/interface/Constants.h
+++ b/Graphics/GraphicsEngine/interface/Constants.h
@@ -30,8 +30,8 @@ namespace Diligent
{
/// Maximum number of input buffer slots.
/// D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT == 32
- static const Uint32 MaxBufferSlots = 32;
+ static constexpr Uint32 MaxBufferSlots = 32;
/// Maximum number of simultaneous render targets.
- static const Uint32 MaxRenderTargets = 8;
+ static constexpr Uint32 MaxRenderTargets = 8;
}
diff --git a/Graphics/GraphicsEngine/interface/DeviceContext.h b/Graphics/GraphicsEngine/interface/DeviceContext.h
index 67e346f5..7dca48db 100644
--- a/Graphics/GraphicsEngine/interface/DeviceContext.h
+++ b/Graphics/GraphicsEngine/interface/DeviceContext.h
@@ -47,7 +47,7 @@ namespace Diligent
{
// {DC92711B-A1BE-4319-B2BD-C662D1CC19E4}
-static const Diligent::INTERFACE_ID IID_DeviceContext =
+static constexpr INTERFACE_ID IID_DeviceContext =
{ 0xdc92711b, 0xa1be, 0x4319, { 0xb2, 0xbd, 0xc6, 0x62, 0xd1, 0xcc, 0x19, 0xe4 } };
/// Input primitive topology.
diff --git a/Graphics/GraphicsEngine/interface/DeviceObject.h b/Graphics/GraphicsEngine/interface/DeviceObject.h
index 73b1e04b..d1201d98 100644
--- a/Graphics/GraphicsEngine/interface/DeviceObject.h
+++ b/Graphics/GraphicsEngine/interface/DeviceObject.h
@@ -33,7 +33,7 @@ namespace Diligent
{
// {5B4CCA0B-5075-4230-9759-F48769EE5502}
-static const Diligent::INTERFACE_ID IID_DeviceObject =
+static constexpr INTERFACE_ID IID_DeviceObject =
{ 0x5b4cca0b, 0x5075, 0x4230, { 0x97, 0x59, 0xf4, 0x87, 0x69, 0xee, 0x55, 0x2 } };
/// Base interface for all objects created by the render device Diligent::IRenderDevice
@@ -41,7 +41,7 @@ class IDeviceObject : public IObject
{
public:
/// Queries the specific interface, see IObject::QueryInterface() for details
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface ) = 0;
+ virtual void QueryInterface( const INTERFACE_ID &IID, IObject **ppInterface ) = 0;
/// Returns the buffer object description
virtual const DeviceObjectAttribs& GetDesc()const = 0;
diff --git a/Graphics/GraphicsEngine/interface/InputLayout.h b/Graphics/GraphicsEngine/interface/InputLayout.h
index fd09fe6d..188fe0b2 100644
--- a/Graphics/GraphicsEngine/interface/InputLayout.h
+++ b/Graphics/GraphicsEngine/interface/InputLayout.h
@@ -31,7 +31,7 @@
namespace Diligent
{
-static const Uint32 iMaxLayoutElements = 16;
+static constexpr Uint32 iMaxLayoutElements = 16;
/// Description of a single element of the input layout
struct LayoutElement
diff --git a/Graphics/GraphicsEngine/interface/MapHelper.h b/Graphics/GraphicsEngine/interface/MapHelper.h
index 05c6d879..6b094e81 100644
--- a/Graphics/GraphicsEngine/interface/MapHelper.h
+++ b/Graphics/GraphicsEngine/interface/MapHelper.h
@@ -109,7 +109,7 @@ public:
Unmap();
#ifdef _DEBUG
auto &BuffDesc = pBuffer->GetDesc();
- VERIFY(sizeof(DataType) <= BuffDesc.uiSizeInBytes, "Data type size exceeds buffer size")
+ VERIFY(sizeof(DataType) <= BuffDesc.uiSizeInBytes, "Data type size exceeds buffer size");
#endif
m_pContext = pContext;
m_pBuffer = pBuffer;
diff --git a/Graphics/GraphicsEngine/interface/PipelineState.h b/Graphics/GraphicsEngine/interface/PipelineState.h
index 21805e7a..4aa9bb6f 100644
--- a/Graphics/GraphicsEngine/interface/PipelineState.h
+++ b/Graphics/GraphicsEngine/interface/PipelineState.h
@@ -33,6 +33,7 @@
#include "DepthStencilState.h"
#include "InputLayout.h"
#include "ShaderResourceBinding.h"
+#include "PlatformDefinitions.h"
namespace Diligent
{
@@ -199,7 +200,7 @@ struct PipelineStateDesc : DeviceObjectAttribs
};
// {06084AE5-6A71-4FE8-84B9-395DD489A28C}
-static const Diligent::INTERFACE_ID IID_PipelineState =
+static constexpr INTERFACE_ID IID_PipelineState =
{ 0x6084ae5, 0x6a71, 0x4fe8, { 0x84, 0xb9, 0x39, 0x5d, 0xd4, 0x89, 0xa2, 0x8c } };
/**
@@ -209,7 +210,7 @@ class IPipelineState : public IDeviceObject
{
public:
/// Queries the specific interface, see IObject::QueryInterface() for details
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface ) = 0;
+ virtual void QueryInterface( const INTERFACE_ID &IID, IObject **ppInterface ) = 0;
/// Returns the blend state description used to create the object
virtual const PipelineStateDesc& GetDesc()const = 0;
diff --git a/Graphics/GraphicsEngine/interface/RenderDevice.h b/Graphics/GraphicsEngine/interface/RenderDevice.h
index 826b81bb..09cf22c3 100644
--- a/Graphics/GraphicsEngine/interface/RenderDevice.h
+++ b/Graphics/GraphicsEngine/interface/RenderDevice.h
@@ -48,7 +48,7 @@ namespace Diligent
{
// {F0E9B607-AE33-4B2B-B1AF-A8B2C3104022}
-static const Diligent::INTERFACE_ID IID_RenderDevice =
+static constexpr INTERFACE_ID IID_RenderDevice =
{ 0xf0e9b607, 0xae33, 0x4b2b, { 0xb1, 0xaf, 0xa8, 0xb2, 0xc3, 0x10, 0x40, 0x22 } };
/// Render device interface
@@ -56,7 +56,7 @@ class IRenderDevice : public IObject
{
public:
/// Queries the specific interface, see IObject::QueryInterface() for details
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface ) = 0;
+ virtual void QueryInterface( const INTERFACE_ID &IID, IObject **ppInterface ) = 0;
/// Creates a new buffer object
diff --git a/Graphics/GraphicsEngine/interface/ResourceMapping.h b/Graphics/GraphicsEngine/interface/ResourceMapping.h
index e422f808..76384fd2 100644
--- a/Graphics/GraphicsEngine/interface/ResourceMapping.h
+++ b/Graphics/GraphicsEngine/interface/ResourceMapping.h
@@ -31,7 +31,7 @@
namespace Diligent
{
// {6C1AC7A6-B429-4139-9433-9E54E93E384A}
- static const Diligent::INTERFACE_ID IID_ResourceMapping =
+ static constexpr INTERFACE_ID IID_ResourceMapping =
{ 0x6c1ac7a6, 0xb429, 0x4139, { 0x94, 0x33, 0x9e, 0x54, 0xe9, 0x3e, 0x38, 0x4a } };
/// Describes the resourse mapping object entry
diff --git a/Graphics/GraphicsEngine/interface/Sampler.h b/Graphics/GraphicsEngine/interface/Sampler.h
index bc8a649d..8eb288c2 100644
--- a/Graphics/GraphicsEngine/interface/Sampler.h
+++ b/Graphics/GraphicsEngine/interface/Sampler.h
@@ -33,7 +33,7 @@ namespace Diligent
{
// {595A59BF-FA81-4855-BC5E-C0E048745A95}
-static const Diligent::INTERFACE_ID IID_Sampler =
+static constexpr INTERFACE_ID IID_Sampler =
{ 0x595a59bf, 0xfa81, 0x4855, { 0xbc, 0x5e, 0xc0, 0xe0, 0x48, 0x74, 0x5a, 0x95 } };
/// Sampler description
diff --git a/Graphics/GraphicsEngine/interface/Shader.h b/Graphics/GraphicsEngine/interface/Shader.h
index ecee3825..ff172c0c 100644
--- a/Graphics/GraphicsEngine/interface/Shader.h
+++ b/Graphics/GraphicsEngine/interface/Shader.h
@@ -35,11 +35,11 @@ namespace Diligent
{
// {2989B45C-143D-4886-B89C-C3271C2DCC5D}
-static const Diligent::INTERFACE_ID IID_Shader =
+static constexpr INTERFACE_ID IID_Shader =
{ 0x2989b45c, 0x143d, 0x4886, { 0xb8, 0x9c, 0xc3, 0x27, 0x1c, 0x2d, 0xcc, 0x5d } };
// {0D57DF3F-977D-4C8F-B64C-6675814BC80C}
-static const Diligent::INTERFACE_ID IID_ShaderVariable =
+static constexpr INTERFACE_ID IID_ShaderVariable =
{ 0xd57df3f, 0x977d, 0x4c8f, { 0xb6, 0x4c, 0x66, 0x75, 0x81, 0x4b, 0xc8, 0xc } };
/// Describes the shader type
diff --git a/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h b/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h
index d40dff52..be21e6c0 100644
--- a/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h
+++ b/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {061F8774-9A09-48E8-8411-B5BD20560104}
-static const Diligent::INTERFACE_ID IID_ShaderResourceBinding =
+static constexpr INTERFACE_ID IID_ShaderResourceBinding =
{ 0x61f8774, 0x9a09, 0x48e8, { 0x84, 0x11, 0xb5, 0xbd, 0x20, 0x56, 0x1, 0x4 } };
@@ -41,7 +41,7 @@ class IShaderResourceBinding : public IObject
{
public:
/// Queries the specific interface, see IObject::QueryInterface() for details
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface ) = 0;
+ virtual void QueryInterface( const INTERFACE_ID &IID, IObject **ppInterface ) = 0;
/// Returns pointer to the referenced buffer object.
diff --git a/Graphics/GraphicsEngine/interface/SwapChain.h b/Graphics/GraphicsEngine/interface/SwapChain.h
index 3f1b992a..5a8fb7ae 100644
--- a/Graphics/GraphicsEngine/interface/SwapChain.h
+++ b/Graphics/GraphicsEngine/interface/SwapChain.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {1C703B77-6607-4EEC-B1FE-15C82D3B4130}
-static const Diligent::INTERFACE_ID IID_SwapChain =
+static constexpr INTERFACE_ID IID_SwapChain =
{ 0x1c703b77, 0x6607, 0x4eec, { 0xb1, 0xfe, 0x15, 0xc8, 0x2d, 0x3b, 0x41, 0x30 } };
/// Swap chain interface
diff --git a/Graphics/GraphicsEngine/interface/Texture.h b/Graphics/GraphicsEngine/interface/Texture.h
index 1f751550..f80e652f 100644
--- a/Graphics/GraphicsEngine/interface/Texture.h
+++ b/Graphics/GraphicsEngine/interface/Texture.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {A64B0E60-1B5E-4CFD-B880-663A1ADCBE98}
-static const Diligent::INTERFACE_ID IID_Texture =
+static constexpr INTERFACE_ID IID_Texture =
{ 0xa64b0e60, 0x1b5e, 0x4cfd, { 0xb8, 0x80, 0x66, 0x3a, 0x1a, 0xdc, 0xbe, 0x98 } };
/// Defines optimized depth-stencil clear value.
diff --git a/Graphics/GraphicsEngine/interface/TextureView.h b/Graphics/GraphicsEngine/interface/TextureView.h
index ff11beaf..d20af409 100644
--- a/Graphics/GraphicsEngine/interface/TextureView.h
+++ b/Graphics/GraphicsEngine/interface/TextureView.h
@@ -32,7 +32,7 @@ namespace Diligent
{
// {5B2EA04E-8128-45E4-AA4D-6DC7E70DC424}
-static const Diligent::INTERFACE_ID IID_TextureView =
+static constexpr INTERFACE_ID IID_TextureView =
{ 0x5b2ea04e, 0x8128, 0x45e4, { 0xaa, 0x4d, 0x6d, 0xc7, 0xe7, 0xd, 0xc4, 0x24 } };
/// Describes allowed unordered access view mode
diff --git a/Graphics/GraphicsEngine/src/EngineMemory.cpp b/Graphics/GraphicsEngine/src/EngineMemory.cpp
index 0f8b3eb4..0287e17f 100644
--- a/Graphics/GraphicsEngine/src/EngineMemory.cpp
+++ b/Graphics/GraphicsEngine/src/EngineMemory.cpp
@@ -37,7 +37,7 @@ void SetRawAllocator(IMemoryAllocator *pRawAllocator)
{
if (pRawAllocator == nullptr)
{
- LOG_INFO_MESSAGE("User-defined allocator is not provided. Using default allocator.")
+ LOG_INFO_MESSAGE("User-defined allocator is not provided. Using default allocator.");
pRawAllocator = &DefaultRawMemoryAllocator::GetAllocator();
}
g_pRawAllocator = pRawAllocator;
diff --git a/Graphics/GraphicsEngine/src/ResourceMapping.cpp b/Graphics/GraphicsEngine/src/ResourceMapping.cpp
index d6a4f40b..a4643da6 100644
--- a/Graphics/GraphicsEngine/src/ResourceMapping.cpp
+++ b/Graphics/GraphicsEngine/src/ResourceMapping.cpp
@@ -90,7 +90,7 @@ namespace Diligent
void ResourceMappingImpl::GetResource( const Char *Name, IDeviceObject **ppResource, Uint32 ArrayIndex )
{
- VERIFY(Name, "Name is null")
+ VERIFY(Name, "Name is null");
if( *Name == 0 )
return;
diff --git a/Graphics/GraphicsEngine/src/Texture.cpp b/Graphics/GraphicsEngine/src/Texture.cpp
index 3057aea0..76aa0480 100644
--- a/Graphics/GraphicsEngine/src/Texture.cpp
+++ b/Graphics/GraphicsEngine/src/Texture.cpp
@@ -60,7 +60,7 @@ void ValidateTextureDesc( const TextureDesc& Desc )
MaxDim = std::max(Desc.Width, Desc.Height);
else if( Desc.Type == RESOURCE_DIM_TEX_3D )
MaxDim = std::max( std::max(Desc.Width, Desc.Height), Desc.Depth );
- VERIFY( MaxDim >= (1U << (Desc.MipLevels-1)), "Texture \"", Desc.Name ? Desc.Name : "", "\": Incorrect number of Mip levels (", Desc.MipLevels, ")" )
+ VERIFY( MaxDim >= (1U << (Desc.MipLevels-1)), "Texture \"", Desc.Name ? Desc.Name : "", "\": Incorrect number of Mip levels (", Desc.MipLevels, ")" );
if( Desc.SampleCount > 1 )
{
@@ -127,7 +127,7 @@ void ValidateTextureRegion(const TextureDesc &TexDesc, Uint32 MipLevel, Uint32 S
void ValidateUpdateDataParams( const TextureDesc &TexDesc, Uint32 MipLevel, Uint32 Slice, const Box &DstBox, const TextureSubResData &SubresData )
{
- VERIFY((SubresData.pData != nullptr) ^ (SubresData.pSrcBuffer != nullptr), "Either CPU memory pointer or GPU buffer must be provided, exclusively")
+ VERIFY((SubresData.pData != nullptr) ^ (SubresData.pSrcBuffer != nullptr), "Either CPU memory pointer or GPU buffer must be provided, exclusively");
ValidateTextureRegion(TexDesc, MipLevel, Slice, DstBox);
VERIFY_TEX_PARAMS( (SubresData.Stride & 0x03) == 0, "Texture data stride (", SubresData.Stride, ") must be at least 32-bit aligned" );