diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-10-07 16:30:24 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-10-07 16:30:24 +0000 |
| commit | f36e4d9aaf8bc6f3ae6a210cd0f3c4131172eced (patch) | |
| tree | 580d7a19bfbff3a32fd824cbb5419a7f69af8551 /Graphics/GraphicsEngineD3D11 | |
| parent | Added debug names for D3D11 command lists, shaders, samplers, depth-stencil, ... (diff) | |
| download | DiligentCore-f36e4d9aaf8bc6f3ae6a210cd0f3c4131172eced.tar.gz DiligentCore-f36e4d9aaf8bc6f3ae6a210cd0f3c4131172eced.zip | |
Removed D3D11 debug names for Depth-stencil, Rasterizer, Blend states and samplers. D3D11 runtime caches these objects and setting different names generates warnings. Also not setting debug name for D3D11 cmd list.
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
3 files changed, 1 insertions, 39 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp index bff165fa..06e476c1 100644 --- a/Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp @@ -36,11 +36,6 @@ CommandListD3D11Impl :: CommandListD3D11Impl(IReferenceCounters* pRefCounters TCommandListBase(pRefCounters, pDevice), m_pd3d11CommandList(pd3d11CommandList) { - if (*m_Desc.Name != 0) - { - auto hr = m_pd3d11CommandList->SetPrivateData(WKPDID_D3DDebugObjectName, static_cast<UINT>(strlen(m_Desc.Name)), m_Desc.Name); - DEV_CHECK_ERR(SUCCEEDED(hr), "Failed to set command list name"); - } } CommandListD3D11Impl :: ~CommandListD3D11Impl() diff --git a/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp index ec672ca8..d61c85e1 100644 --- a/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp @@ -96,7 +96,7 @@ PipelineStateD3D11Impl::PipelineStateD3D11Impl(IReferenceCounters* pRefCoun CHECK_D3D_RESULT_THROW( pDeviceD3D11->CreateDepthStencilState( &D3D11DSSDesc, &m_pd3d11DepthStencilState ), "Failed to create D3D11 depth stencil state" ); - // Create input layout + // Create input layout if( m_LayoutElements.size() > 0 ) { std::vector<D3D11_INPUT_ELEMENT_DESC, STDAllocatorRawMem<D3D11_INPUT_ELEMENT_DESC> > d311InputElements(STD_ALLOCATOR_RAW_MEM(D3D11_INPUT_ELEMENT_DESC, GetRawAllocator(), "Allocator for vector<D3D11_INPUT_ELEMENT_DESC>") ); @@ -109,34 +109,6 @@ PipelineStateD3D11Impl::PipelineStateD3D11Impl(IReferenceCounters* pRefCoun CHECK_D3D_RESULT_THROW( pDeviceD3D11->CreateInputLayout(d311InputElements.data(), static_cast<UINT>(d311InputElements.size()), pVSByteCode->GetBufferPointer(), pVSByteCode->GetBufferSize(), &m_pd3d11InputLayout ), "Failed to create the Direct3D11 input layout"); } - - if (*m_Desc.Name != 0) - { - { - String BSName = String(m_Desc.Name) + " - Blend State"; - auto hr = m_pd3d11BlendState->SetPrivateData(WKPDID_D3DDebugObjectName, static_cast<UINT>(BSName.length()), BSName.c_str()); - DEV_CHECK_ERR(SUCCEEDED(hr), "Failed to set blend state name"); - } - - { - String DSSName = String(m_Desc.Name) + " - Depth-Stencil State"; - auto hr = m_pd3d11DepthStencilState->SetPrivateData(WKPDID_D3DDebugObjectName, static_cast<UINT>(DSSName.length()), DSSName.c_str()); - DEV_CHECK_ERR(SUCCEEDED(hr), "Failed to set depth-stencil state name"); - } - - { - String RSName = String(m_Desc.Name) + " - Raterizer State"; - auto hr = m_pd3d11RasterizerState->SetPrivateData(WKPDID_D3DDebugObjectName, static_cast<UINT>(RSName.length()), RSName.c_str()); - DEV_CHECK_ERR(SUCCEEDED(hr), "Failed to set rasterizer state name"); - } - - if (m_pd3d11InputLayout) - { - String LayoutName = String(m_Desc.Name) + " - Input Layout"; - auto hr = m_pd3d11InputLayout->SetPrivateData(WKPDID_D3DDebugObjectName, static_cast<UINT>(LayoutName.length()), LayoutName.c_str()); - DEV_CHECK_ERR(SUCCEEDED(hr), "Failed to set input layout state name"); - } - } } if(PipelineDesc.SRBAllocationGranularity > 1) diff --git a/Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp index 73a6785e..a2777163 100644 --- a/Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp @@ -50,11 +50,6 @@ SamplerD3D11Impl::SamplerD3D11Impl(IReferenceCounters* pRefCounters, }; CHECK_D3D_RESULT_THROW( pd3d11Device->CreateSamplerState(&D3D11SamplerDesc, &m_pd3dSampler), "Failed to create the Direct3D11 sampler"); - if (*m_Desc.Name != 0) - { - auto hr = m_pd3dSampler->SetPrivateData(WKPDID_D3DDebugObjectName, static_cast<UINT>(strlen(m_Desc.Name)), m_Desc.Name); - DEV_CHECK_ERR(SUCCEEDED(hr), "Failed to set sampler name"); - } } SamplerD3D11Impl::~SamplerD3D11Impl() |
