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/GraphicsEngineVulkan/include/ShaderVariableVk.h | 10 ++++------ Graphics/GraphicsEngineVulkan/src/ShaderVariableVk.cpp | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderVariableVk.h b/Graphics/GraphicsEngineVulkan/include/ShaderVariableVk.h index 74dac81d..0b7e3aa0 100644 --- a/Graphics/GraphicsEngineVulkan/include/ShaderVariableVk.h +++ b/Graphics/GraphicsEngineVulkan/include/ShaderVariableVk.h @@ -64,7 +64,7 @@ namespace Diligent class ShaderVariableVkImpl; -// sizeof(ShaderVariableManagerVk) == 40 (x64, msvc, Release) +// sizeof(ShaderVariableManagerVk) == 32 (x64, msvc, Release) class ShaderVariableManagerVk { public: @@ -97,11 +97,9 @@ private: Uint32 GetVariableIndex(const ShaderVariableVkImpl& Variable); IObject& m_Owner; - // Variable mgr is owned by either Pipeline state 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 to be alive while SRB is alive - const ShaderResourceLayoutVk& 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. ShaderResourceCacheVk& m_ResourceCache; // Memory is allocated through the allocator provided by the pipeline state. If allocation granularity > 1, fixed block diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVariableVk.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVariableVk.cpp index d005dc26..9d6bbf96 100644 --- a/Graphics/GraphicsEngineVulkan/src/ShaderVariableVk.cpp +++ b/Graphics/GraphicsEngineVulkan/src/ShaderVariableVk.cpp @@ -68,7 +68,6 @@ ShaderVariableManagerVk::ShaderVariableManagerVk(IObject& Uint32 NumAllowedTypes, ShaderResourceCacheVk& ResourceCache) : m_Owner(Owner), - m_ResourceLayout(SrcLayout), m_ResourceCache(ResourceCache) #ifdef _DEBUG , m_DbgAllocator(Allocator) -- cgit v1.2.3