From 76a1a90ee26e3f2e78fab018bbbfc43ddc85d849 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 6 Mar 2019 10:03:57 -0800 Subject: Removed unused m_ResourceLayout member from ShaderVariableManagerVk and ShaderVariableManagerD3D12 plus a bunch of minor updates to fix clang warnings --- Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h | 10 ++++------ Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h b/Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h index 85dc30c7..8b9f8fb8 100644 --- a/Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h +++ b/Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h @@ -66,7 +66,7 @@ namespace Diligent class ShaderVariableD3D12Impl; -// sizeof(ShaderVariableManagerD3D12) == 40 (x64, msvc, Release) +// sizeof(ShaderVariableManagerD3D12) == 32 (x64, msvc, Release) class ShaderVariableManagerD3D12 { public: @@ -99,11 +99,9 @@ private: IObject& m_Owner; - // Variable mgr is owned by either PSO object (in which case m_pResourceLayout points to - // static resource layout owned by the same PSO object), or by SRB object (in which case - // m_pResourceLayout points to corresponding layout in pipeline state). Since SRB keeps strong - // reference to PSO, the layout is guaranteed be alive while SRB is alive - const ShaderResourceLayoutD3D12& m_ResourceLayout; + // Variable mgr is owned by either Pipeline state object (in which case m_ResourceCache references + // static resource cache owned by the same PSO object), or by SRB object (in which case + // m_ResourceCache references the cache in the SRB). Thus the cache is guaranteed to be alive. ShaderResourceCacheD3D12& m_ResourceCache; // Memory is allocated through the allocator provided by the pipeline state. If allocation granularity > 1, fixed block diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp index 3c14c461..de8e9855 100644 --- a/Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp +++ b/Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp @@ -56,11 +56,10 @@ ShaderVariableManagerD3D12::ShaderVariableManagerD3D12(IObject& const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes, Uint32 NumAllowedTypes, ShaderResourceCacheD3D12& ResourceCache) : - m_Owner (Owner), - m_ResourceLayout (SrcLayout), - m_ResourceCache (ResourceCache) + m_Owner (Owner), + m_ResourceCache (ResourceCache) #ifdef _DEBUG - , m_DbgAllocator(Allocator) + , m_DbgAllocator (Allocator) #endif { -- cgit v1.2.3