summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-03-06 18:03:57 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-03-06 18:03:57 +0000
commit76a1a90ee26e3f2e78fab018bbbfc43ddc85d849 (patch)
treead4f6db4cee83516a5f1e1867b4113fa64f32dec /Graphics/GraphicsEngineD3D12
parentFixed few more clang warnings (diff)
downloadDiligentCore-76a1a90ee26e3f2e78fab018bbbfc43ddc85d849.tar.gz
DiligentCore-76a1a90ee26e3f2e78fab018bbbfc43ddc85d849.zip
Removed unused m_ResourceLayout member from ShaderVariableManagerVk and ShaderVariableManagerD3D12 plus a bunch of minor updates to fix clang warnings
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h10
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp7
2 files changed, 7 insertions, 10 deletions
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
{