diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-10-19 22:06:43 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-10-19 22:06:43 +0000 |
| commit | 4a63243fcd1ea5bef513abf0fd26b73ef6e9c7dd (patch) | |
| tree | 6bf3630fd8eb9a4ae93fee66ed1691ed94ca2510 | |
| parent | Vulkan backend: added a bunch of __forceinline's to improve performance (diff) | |
| download | DiligentCore-4a63243fcd1ea5bef513abf0fd26b73ef6e9c7dd.tar.gz DiligentCore-4a63243fcd1ea5bef513abf0fd26b73ef6e9c7dd.zip | |
Renamed EngineD3D11DebugFlags to D3D11_DEBUG_FLAGS (Updated API version to 240034)
| -rw-r--r-- | Graphics/GraphicsEngine/interface/GraphicsTypes.h | 26 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineD3D11/readme.md | 3 | ||||
| -rwxr-xr-x | Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp | 28 | ||||
| -rw-r--r-- | ReleaseHistory.md | 1 |
4 files changed, 26 insertions, 32 deletions
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index d7af003b..b2e53a16 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1308,19 +1308,21 @@ namespace Diligent /// Debug flags that can be specified when creating Direct3D11-based engine implementation. /// /// \sa CreateDeviceAndContextsD3D11Type, CreateSwapChainD3D11Type, LoadGraphicsEngineD3D11 - enum class EngineD3D11DebugFlags : Uint32 + enum D3D11_DEBUG_FLAGS : Uint32 { + /// No debug flag + D3D11_DEBUG_FLAG_NONE = 0x00, + /// Before executing draw/dispatch command, verify that /// all required shader resources are bound to the device context - VerifyCommittedShaderResources = 0x01, + D3D11_DEBUG_FLAG_VERIFY_COMMITTED_SHADER_RESOURCES = 0x01, /// Verify that all committed cotext resources are relevant, /// i.e. they are consistent with the committed resource cache. - /// This is very expensive operation and should generally not be - /// necessary. - VerifyCommittedResourceRelevance = 0x02 + /// This is very expensive and should generally not be necessary. + D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE = 0x02 }; - + DEFINE_FLAG_ENUM_OPERATORS(D3D11_DEBUG_FLAGS) /// Direct3D11/12 feature level enum DIRECT3D_FEATURE_LEVEL : Uint8 @@ -1355,18 +1357,10 @@ namespace Diligent /// Minimum required Direct3D feature level. DIRECT3D_FEATURE_LEVEL MinimumFeatureLevel = DIRECT3D_FEATURE_LEVEL_11_0; - /// Debug flags. See Diligent::EngineD3D11DebugFlags for a list of allowed values. + /// Debug flags. See Diligent::D3D11_DEBUG_FLAGS for a list of allowed values. /// /// \sa CreateDeviceAndContextsD3D11Type, CreateSwapChainD3D11Type, LoadGraphicsEngineD3D11 - Uint32 DebugFlags; - - EngineD3D11CreateInfo() : - DebugFlags(0) - { -#ifdef _DEBUG - DebugFlags = static_cast<Uint32>(EngineD3D11DebugFlags::VerifyCommittedShaderResources); -#endif - } + D3D11_DEBUG_FLAGS DebugFlags = D3D11_DEBUG_FLAG_NONE; }; /// Attributes specific to D3D12 engine diff --git a/Graphics/GraphicsEngineD3D11/readme.md b/Graphics/GraphicsEngineD3D11/readme.md index f0af4126..9afc1f81 100644 --- a/Graphics/GraphicsEngineD3D11/readme.md +++ b/Graphics/GraphicsEngineD3D11/readme.md @@ -15,8 +15,7 @@ using namespace Diligent; EngineD3D11CreateInfo EngineCI; EngineCI.DebugFlags = - (Uint32)EngineD3D11DebugFlags::VerifyCommittedShaderResources | - (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance; + D3D11_DEBUG_FLAG_VERIFY_COMMITTED_SHADER_RESOURCES; // Get pointer to the function that returns the factory #if ENGINE_DLL diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp index dd77731b..40be5457 100755 --- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp @@ -326,7 +326,7 @@ namespace Diligent }
#ifdef DEVELOPMENT
- if ((m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance) != 0 && ShaderTypeInd == CSInd)
+ if ((m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE) != 0 && ShaderTypeInd == CSInd)
{
dbgVerifyCommittedUAVs(pShaderD3D11->GetDesc().ShaderType);
}
@@ -436,7 +436,7 @@ namespace Diligent m_NumCommittedCBs[ShaderTypeInd] = std::max(m_NumCommittedCBs[ShaderTypeInd], static_cast<Uint8>(NumCBs));
}
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
dbgVerifyCommittedCBs(pShaderD3D11->GetDesc().ShaderType);
}
@@ -543,7 +543,7 @@ namespace Diligent m_NumCommittedSRVs[ShaderTypeInd] = std::max(m_NumCommittedSRVs[ShaderTypeInd], static_cast<Uint8>(NumSRVs));
}
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
dbgVerifyCommittedSRVs(pShaderD3D11->GetDesc().ShaderType);
}
@@ -583,7 +583,7 @@ namespace Diligent m_NumCommittedSamplers[ShaderTypeInd] = std::max(m_NumCommittedSamplers[ShaderTypeInd], static_cast<Uint8>(NumSamplers));
}
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
dbgVerifyCommittedSamplers(pShaderD3D11->GetDesc().ShaderType);
}
@@ -594,7 +594,7 @@ namespace Diligent #ifdef DEVELOPMENT
- if (CommitResources && (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedShaderResources) != 0)
+ if (CommitResources && (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_SHADER_RESOURCES) != 0)
{
// Use full resource layout to verify that all required resources are committed
pShaderD3D11->GetD3D11Resources()->dvpVerifyCommittedResources(
@@ -768,7 +768,7 @@ namespace Diligent }
}
- if(m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if(m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
// Verify bindings after all resources are set
dbgVerifyCommittedSRVs();
@@ -863,7 +863,7 @@ namespace Diligent return;
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
// Verify bindings
dbgVerifyCommittedSRVs();
@@ -883,7 +883,7 @@ namespace Diligent return;
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
// Verify bindings
dbgVerifyCommittedSRVs();
@@ -1469,7 +1469,7 @@ namespace Diligent m_pd3d11DeviceContext->IASetIndexBuffer( nullptr, DXGI_FORMAT_R32_UINT, m_CommittedD3D11IndexDataStartOffset );
}
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
dbgVerifyCommittedIndexBuffer();
}
@@ -1497,7 +1497,7 @@ namespace Diligent }
}
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
dbgVerifyCommittedVertexBuffers();
}
@@ -1523,7 +1523,7 @@ namespace Diligent }
}
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
dbgVerifyCommittedCBs();
}
@@ -1703,7 +1703,7 @@ namespace Diligent }
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
dbgVerifyCommittedSRVs();
dbgVerifyCommittedUAVs(SHADER_TYPE_COMPUTE);
@@ -1737,7 +1737,7 @@ namespace Diligent InvalidateState();
#ifdef DEVELOPMENT
- if (m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if (m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
// Verify bindings
dbgVerifyCommittedSRVs();
@@ -1774,7 +1774,7 @@ namespace Diligent InvalidateState();
#ifdef DEVELOPMENT
- if(m_DebugFlags & (Uint32)EngineD3D11DebugFlags::VerifyCommittedResourceRelevance)
+ if(m_DebugFlags & D3D11_DEBUG_FLAG_VERIFY_COMMITTED_RESOURCE_RELEVANCE)
{
// Verify bindings
dbgVerifyCommittedSRVs();
diff --git a/ReleaseHistory.md b/ReleaseHistory.md index 311deac5..87c47ebe 100644 --- a/ReleaseHistory.md +++ b/ReleaseHistory.md @@ -2,6 +2,7 @@ ### API Changes +* Renamed `EngineD3D11DebugFlags` to `D3D11_DEBUG_FLAGS` (API Version 240034) * Split up `Draw` command into `Draw`, `DrawIndexed`, `DrawIndirect` and `DrawIndexedIndirect`. Split up `DispatchCompute` command into `DispatchCompute` and `DispatchComputeInidrect` (API Version 240033). * Enabled bindless resources |
