summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-05-20 21:00:37 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-05-20 21:00:37 +0000
commit109a75aac22463802f03dfc6588951ed0b04892a (patch)
tree51e121c71b7e8d30bab1eb400e21497677797a03 /Graphics/GraphicsEngineD3D11
parentResolved conflicts (diff)
downloadDiligentCore-109a75aac22463802f03dfc6588951ed0b04892a.tar.gz
DiligentCore-109a75aac22463802f03dfc6588951ed0b04892a.zip
Merge from dev branch
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rw-r--r--Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/D3D11DebugUtilities.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/D3D11TypeConversions.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/D3D11TypeDefinitions.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/EngineD3D11Defines.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.h3
-rw-r--r--Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.h4
-rw-r--r--Graphics/GraphicsEngineD3D11/include/ShaderResourcesD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/Texture1D_D3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/Texture2D_D3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/Texture3D_D3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/TextureBaseD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/pch.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/include/targetver.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/EngineD3D11Attribs.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/D3D11DebugUtilities.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/DLLMain.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp3
-rw-r--r--Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp7
-rw-r--r--Graphics/GraphicsEngineD3D11/src/ShaderResourceCacheD3D11.cpp3
-rw-r--r--Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp49
-rw-r--r--Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/Texture1D_D3D11.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/Texture2D_D3D11.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/Texture3D_D3D11.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D11/src/pch.cpp2
60 files changed, 102 insertions, 75 deletions
diff --git a/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h
index 290b633f..ae9e5297 100644
--- a/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/BufferD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h
index 07321a16..ffc65719 100644
--- a/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h
index cf84c431..631db936 100644
--- a/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/CommandListD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/D3D11DebugUtilities.h b/Graphics/GraphicsEngineD3D11/include/D3D11DebugUtilities.h
index cddc4249..384e37b4 100644
--- a/Graphics/GraphicsEngineD3D11/include/D3D11DebugUtilities.h
+++ b/Graphics/GraphicsEngineD3D11/include/D3D11DebugUtilities.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/D3D11TypeConversions.h b/Graphics/GraphicsEngineD3D11/include/D3D11TypeConversions.h
index 21031ea8..ca494999 100644
--- a/Graphics/GraphicsEngineD3D11/include/D3D11TypeConversions.h
+++ b/Graphics/GraphicsEngineD3D11/include/D3D11TypeConversions.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/D3D11TypeDefinitions.h b/Graphics/GraphicsEngineD3D11/include/D3D11TypeDefinitions.h
index bd35a89e..e04f0acc 100644
--- a/Graphics/GraphicsEngineD3D11/include/D3D11TypeDefinitions.h
+++ b/Graphics/GraphicsEngineD3D11/include/D3D11TypeDefinitions.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
index e3b2c498..9eab566e 100644
--- a/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/DeviceContextD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/EngineD3D11Defines.h b/Graphics/GraphicsEngineD3D11/include/EngineD3D11Defines.h
index 9a5cee9b..f4fe12a9 100644
--- a/Graphics/GraphicsEngineD3D11/include/EngineD3D11Defines.h
+++ b/Graphics/GraphicsEngineD3D11/include/EngineD3D11Defines.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h
index cb89e92a..e5a89d21 100644
--- a/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/PipelineStateD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h
index 0d4547e5..4b1dc1e8 100644
--- a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h
index 3fd8b138..6474f939 100644
--- a/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/SamplerD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h
index 44ecad0f..59d30da7 100644
--- a/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/ShaderD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h
index 8afcab2c..3028b158 100644
--- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceBindingD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.h b/Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.h
index f0d4c982..e38f08f0 100644
--- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,6 +42,7 @@ namespace Diligent
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//
//
+// http://diligentgraphics.com/diligent-engine/architecture/d3d11/shader-resource-cache/
class ShaderResourceCacheD3D11
{
public:
diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.h b/Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.h
index f55b4dce..e662706e 100644
--- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,12 +45,14 @@ namespace Diligent
class IMemoryAllocator;
/// Diligent::ShaderResourceLayoutD3D11 class
+/// http://diligentgraphics.com/diligent-engine/architecture/d3d11/shader-resource-layout/
class ShaderResourceLayoutD3D11
{
public:
ShaderResourceLayoutD3D11(IObject &Owner, IMemoryAllocator& ResLayoutDataAllocator);
~ShaderResourceLayoutD3D11();
+ // No copies or moves
ShaderResourceLayoutD3D11(const ShaderResourceLayoutD3D11&) = delete;
ShaderResourceLayoutD3D11& operator = (const ShaderResourceLayoutD3D11&) = delete;
ShaderResourceLayoutD3D11(ShaderResourceLayoutD3D11&&) = default;
diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourcesD3D11.h b/Graphics/GraphicsEngineD3D11/include/ShaderResourcesD3D11.h
index 772de5b9..599c8ef2 100644
--- a/Graphics/GraphicsEngineD3D11/include/ShaderResourcesD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourcesD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h
index d7a15c7d..e0a08683 100644
--- a/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/Texture1D_D3D11.h b/Graphics/GraphicsEngineD3D11/include/Texture1D_D3D11.h
index 3e53aad5..614badb1 100644
--- a/Graphics/GraphicsEngineD3D11/include/Texture1D_D3D11.h
+++ b/Graphics/GraphicsEngineD3D11/include/Texture1D_D3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/Texture2D_D3D11.h b/Graphics/GraphicsEngineD3D11/include/Texture2D_D3D11.h
index ed958499..0e94198c 100644
--- a/Graphics/GraphicsEngineD3D11/include/Texture2D_D3D11.h
+++ b/Graphics/GraphicsEngineD3D11/include/Texture2D_D3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/Texture3D_D3D11.h b/Graphics/GraphicsEngineD3D11/include/Texture3D_D3D11.h
index 44e4ced9..223aed13 100644
--- a/Graphics/GraphicsEngineD3D11/include/Texture3D_D3D11.h
+++ b/Graphics/GraphicsEngineD3D11/include/Texture3D_D3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/TextureBaseD3D11.h b/Graphics/GraphicsEngineD3D11/include/TextureBaseD3D11.h
index 66da6f6e..4312ad14 100644
--- a/Graphics/GraphicsEngineD3D11/include/TextureBaseD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/include/TextureBaseD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h
index 7a35d7e3..caef1190 100644
--- a/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h
+++ b/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/pch.h b/Graphics/GraphicsEngineD3D11/include/pch.h
index e55827a0..7a5c39ec 100644
--- a/Graphics/GraphicsEngineD3D11/include/pch.h
+++ b/Graphics/GraphicsEngineD3D11/include/pch.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/include/targetver.h b/Graphics/GraphicsEngineD3D11/include/targetver.h
index 5a309b33..0f732684 100644
--- a/Graphics/GraphicsEngineD3D11/include/targetver.h
+++ b/Graphics/GraphicsEngineD3D11/include/targetver.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h b/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
index cdd1c72b..818f56ac 100644
--- a/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h b/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
index 3b9d3d5c..95089492 100644
--- a/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h b/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
index e5d1cb54..3e90af8a 100644
--- a/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/EngineD3D11Attribs.h b/Graphics/GraphicsEngineD3D11/interface/EngineD3D11Attribs.h
index 88fcaf66..d5c466b6 100644
--- a/Graphics/GraphicsEngineD3D11/interface/EngineD3D11Attribs.h
+++ b/Graphics/GraphicsEngineD3D11/interface/EngineD3D11Attribs.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h b/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
index 8eab72e4..a909d72d 100644
--- a/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
index cd003a85..82d15c16 100644
--- a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h
index c651a1e6..aadef684 100644
--- a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceFactoryD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h b/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
index b5266bf1..ca8551f2 100644
--- a/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h b/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
index e6c43492..6008adc8 100644
--- a/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h b/Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h
index fd0be846..0c1665bd 100644
--- a/Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h b/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
index 54a4d0ae..616da4a7 100644
--- a/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h b/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
index 59ffd8ad..c52b005e 100644
--- a/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h b/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
index 93bd2492..9aa71d9e 100644
--- a/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp
index 7c4282d4..6c3f9cbd 100644
--- a/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/BufferD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp
index 3aa8ca1b..dd8f53d4 100644
--- a/Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/BufferViewD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp
index 2c74c3ec..3ed841e9 100644
--- a/Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/CommandListD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/D3D11DebugUtilities.cpp b/Graphics/GraphicsEngineD3D11/src/D3D11DebugUtilities.cpp
index 440a616e..4734ea6a 100644
--- a/Graphics/GraphicsEngineD3D11/src/D3D11DebugUtilities.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/D3D11DebugUtilities.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp b/Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp
index 5c340a30..409be5cc 100644
--- a/Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/D3D11TypeConversions.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/DLLMain.cpp b/Graphics/GraphicsEngineD3D11/src/DLLMain.cpp
index fff890c0..94065164 100644
--- a/Graphics/GraphicsEngineD3D11/src/DLLMain.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/DLLMain.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
index 69514bf0..a270e3d2 100644
--- a/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/DeviceContextD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -142,6 +142,7 @@ namespace Diligent
&ID3D11DeviceContext::CSSetUnorderedAccessViews
};
+ // http://diligentgraphics.com/diligent-engine/architecture/d3d11/committing-shader-resources-to-the-gpu-pipeline/
template<bool TransitionResources,
bool CommitResources>
void DeviceContextD3D11Impl::TransitionAndCommitShaderResources(IPipelineState *pPSO, IShaderResourceBinding *pShaderResourceBinding)
diff --git a/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp
index d6d75f41..2084efe2 100644
--- a/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/PipelineStateD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
index 867d71d7..2e533a89 100644
--- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp
index a6f990c2..fdd9d551 100644
--- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceFactoryD3D11.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp
index 29c316a6..fbb48400 100644
--- a/Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/SamplerD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp
index 83a8c33b..2cf70547 100644
--- a/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp
index 37dd96f8..01caac80 100644
--- a/Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourceBindingD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,8 +54,6 @@ ShaderResourceBindingD3D11Impl::ShaderResourceBindingD3D11Impl( FixedBlockMemory
auto ShaderInd = pShaderD3D11->GetShaderTypeIndex();
VERIFY_EXPR(static_cast<Int32>(ShaderInd) == GetShaderTypeIndex(pShaderD3D11->GetDesc().ShaderType));
- SHADER_VARIABLE_TYPE VarTypes[] = {SHADER_VARIABLE_TYPE_MUTABLE, SHADER_VARIABLE_TYPE_DYNAMIC};
-
auto &ResCacheDataAllocator = pPSO->GetResourceCacheDataAllocator(s);
auto &ResLayoutDataAllocator = pPSO->GetShaderResLayoutDataAllocators(s);
@@ -69,6 +67,9 @@ ShaderResourceBindingD3D11Impl::ShaderResourceBindingD3D11Impl( FixedBlockMemory
new (m_pBoundResourceCaches+s) ShaderResourceCacheD3D11;
m_pBoundResourceCaches[s].Initialize(CBCount, SRVCount, SamplerCount, UAVCount, ResCacheDataAllocator);
+ // Shader resource layout will only contain dynamic and mutable variables
+ // http://diligentgraphics.com/diligent-engine/architecture/d3d11/shader-resource-cache#Shader-Resource-Cache-Initialization
+ SHADER_VARIABLE_TYPE VarTypes[] = {SHADER_VARIABLE_TYPE_MUTABLE, SHADER_VARIABLE_TYPE_DYNAMIC};
new (m_pResourceLayouts + s) ShaderResourceLayoutD3D11(*this, ResLayoutDataAllocator);
m_pResourceLayouts[s].Initialize(pShaderD3D11->GetResources(), VarTypes, _countof(VarTypes), m_pBoundResourceCaches[s], ResCacheDataAllocator, ResLayoutDataAllocator);
diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourceCacheD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourceCacheD3D11.cpp
index 8054bb57..0567eb8d 100644
--- a/Graphics/GraphicsEngineD3D11/src/ShaderResourceCacheD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourceCacheD3D11.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@ namespace Diligent
{
void ShaderResourceCacheD3D11::Initialize(Int32 CBCount, Int32 SRVCount, Int32 SamplerCount, Int32 UAVCount, IMemoryAllocator &MemAllocator)
{
+ // http://diligentgraphics.com/diligent-engine/architecture/d3d11/shader-resource-cache/
if (IsInitialized())
{
LOG_ERROR_MESSAGE("Resource cache is already intialized")
diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp
index d7c8eb1a..f4c51ced 100644
--- a/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -86,16 +86,26 @@ void ShaderResourceLayoutD3D11::Initialize(const std::shared_ptr<const ShaderRes
IMemoryAllocator& ResCacheDataAllocator,
IMemoryAllocator& ResLayoutDataAllocator)
{
+ // http://diligentgraphics.com/diligent-engine/architecture/d3d11/shader-resource-layout#Shader-Resource-Layout-Initialization
+
VERIFY(&m_ResourceBuffer.get_deleter().m_Allocator == &ResLayoutDataAllocator, "Incosistent memory alloctor");
m_pResources = pSrcResources;
m_pResourceCache = &ResourceCache;
+ // In release mode, MS compiler generates this false warning:
+ // Warning C4189 'AllowedTypeBits': local variable is initialized but not referenced
+ // Most likely it somehow gets confused by the variable being eliminated during function inlining
+#pragma warning(push)
+#pragma warning(disable : 4189)
Uint32 AllowedTypeBits = GetAllowedTypeBits(VarTypes, NumVarTypes);
+#pragma warning(pop)
+ // Count total number of resources of allowed types
Uint32 NumCBs, NumTexSRVs, NumTexUAVs, NumBufSRVs, NumBufUAVs, NumSamplers;
pSrcResources->CountResources(VarTypes, NumVarTypes, NumCBs, NumTexSRVs, NumTexUAVs, NumBufSRVs, NumBufUAVs, NumSamplers);
+ // Initialize offsets
m_TexAndSamplersOffset = 0 + static_cast<Uint16>( NumCBs * sizeof(ConstBuffBindInfo) );
m_TexUAVsOffset = m_TexAndSamplersOffset + static_cast<Uint16>( NumTexSRVs * sizeof(TexAndSamplerBindInfo) );
m_BuffUAVsOffset = m_TexUAVsOffset + static_cast<Uint16>( NumTexUAVs * sizeof(TexUAVBindInfo) );
@@ -119,67 +129,78 @@ void ShaderResourceLayoutD3D11::Initialize(const std::shared_ptr<const ShaderRes
m_NumBufSRVs = static_cast<Uint8>(NumBufSRVs);
m_NumBufUAVs = static_cast<Uint8>(NumBufUAVs);
+ // Current resource index for every resource type
Uint32 cb = 0;
Uint32 texSrv = 0;
Uint32 texUav = 0;
Uint32 bufSrv = 0;
Uint32 bufUav = 0;
- Int32 MaxCBBindPoint = -1;
- Int32 MaxSRVBindPoint = -1;
- Int32 MaxSamplerBindPoint = -1;
- Int32 MaxUAVBindPoint = -1;
+ Uint32 NumCBSlots = 0;
+ Uint32 NumSRVSlots = 0;
+ Uint32 NumSamplerSlots = 0;
+ Uint32 NumUAVSlots = 0;
pSrcResources->ProcessResources(
VarTypes, NumVarTypes,
[&](const D3DShaderResourceAttribs &CB)
{
VERIFY_EXPR( IsAllowedType(CB.GetVariableType(), AllowedTypeBits) );
+ // Initialize current CB in place, increment CB counter
new (&GetCB(cb++)) ConstBuffBindInfo( CB, *this );
- MaxCBBindPoint = std::max(MaxCBBindPoint, static_cast<Int32>(CB.BindPoint + CB.BindCount-1));
+ NumCBSlots = std::max(NumCBSlots, static_cast<Uint32>(CB.BindPoint + CB.BindCount));
},
[&](const D3DShaderResourceAttribs& TexSRV)
{
VERIFY_EXPR( IsAllowedType(TexSRV.GetVariableType(), AllowedTypeBits) );
-
+ // Set reference to a special static instance representing invalid sampler
+ // if no sampler is assigned to texture SRV
const D3DShaderResourceAttribs& SamplerAttribs = TexSRV.IsValidSampler() ?
pSrcResources->GetSampler(TexSRV.GetSamplerId()) : TexAndSamplerBindInfo::InvalidSamplerAttribs;
+ // Initialize tex SRV in place, increment counter of tex SRVs
new (&GetTexSRV(texSrv++)) TexAndSamplerBindInfo( TexSRV, SamplerAttribs, *this );
- MaxSRVBindPoint = std::max(MaxSRVBindPoint, static_cast<Int32>(TexSRV.BindPoint + TexSRV.BindCount-1));
+ NumSRVSlots = std::max(NumSRVSlots, static_cast<Uint32>(TexSRV.BindPoint + TexSRV.BindCount));
if( SamplerAttribs.IsValidBindPoint() )
- MaxSamplerBindPoint = std::max(MaxSamplerBindPoint, static_cast<Int32>(SamplerAttribs.BindPoint + SamplerAttribs.BindCount-1));
+ NumSamplerSlots = std::max(NumSamplerSlots, static_cast<Uint32>(SamplerAttribs.BindPoint + SamplerAttribs.BindCount));
},
[&](const D3DShaderResourceAttribs &TexUAV)
{
VERIFY_EXPR( IsAllowedType(TexUAV.GetVariableType(), AllowedTypeBits) );
-
+
+ // Initialize tex UAV in place, increment counter of tex UAVs
new (&GetTexUAV(texUav++)) TexUAVBindInfo( TexUAV, *this );
- MaxUAVBindPoint = std::max(MaxUAVBindPoint, static_cast<Int32>(TexUAV.BindPoint + TexUAV.BindCount-1));
+ NumUAVSlots = std::max(NumUAVSlots, static_cast<Uint32>(TexUAV.BindPoint + TexUAV.BindCount));
},
[&](const D3DShaderResourceAttribs &BuffSRV)
{
VERIFY_EXPR(IsAllowedType(BuffSRV.GetVariableType(), AllowedTypeBits));
+ // Initialize buff SRV in place, increment counter of buff SRVs
new (&GetBufSRV(bufSrv++)) BuffSRVBindInfo( BuffSRV, *this );
- MaxSRVBindPoint = std::max(MaxSRVBindPoint, static_cast<Int32>(BuffSRV.BindPoint + BuffSRV.BindCount-1));
+ NumSRVSlots = std::max(NumSRVSlots, static_cast<Uint32>(BuffSRV.BindPoint + BuffSRV.BindCount));
},
[&](const D3DShaderResourceAttribs &BuffUAV)
{
VERIFY_EXPR(IsAllowedType(BuffUAV.GetVariableType(), AllowedTypeBits));
+ // Initialize buff UAV in place, increment counter of buff UAVs
new (&GetBufUAV(bufUav++)) BuffUAVBindInfo( BuffUAV, *this );
- MaxUAVBindPoint = std::max(MaxUAVBindPoint, static_cast<Int32>(BuffUAV.BindPoint + BuffUAV.BindCount-1));
+ NumUAVSlots = std::max(NumUAVSlots, static_cast<Uint32>(BuffUAV.BindPoint + BuffUAV.BindCount));
}
);
+ // Shader resource cache in the SRB is initialized by the constructor of ShaderResourceBindingD3D11Impl to
+ // hold all variable types. The corresponding layout in the SRB is initialized to keep mutable and dynamic
+ // variables only
+ // http://diligentgraphics.com/diligent-engine/architecture/d3d11/shader-resource-cache#Shader-Resource-Cache-Initialization
if (!m_pResourceCache->IsInitialized())
{
// NOTE that here we are using max bind points required to cache only the shader variables of allowed types!
- m_pResourceCache->Initialize(MaxCBBindPoint+1, MaxSRVBindPoint+1, MaxSamplerBindPoint+1, MaxUAVBindPoint+1, ResCacheDataAllocator);
+ m_pResourceCache->Initialize(NumCBSlots, NumSRVSlots, NumSamplerSlots, NumUAVSlots, ResCacheDataAllocator);
}
VERIFY(cb == m_NumCBs, "Not all CBs are initialized, which will result in a crash when dtor is called");
diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp
index d3b4f82d..e759e78a 100644
--- a/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourcesD3D11.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp
index 85b908f6..f729bef6 100644
--- a/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/SwapChainD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/Texture1D_D3D11.cpp b/Graphics/GraphicsEngineD3D11/src/Texture1D_D3D11.cpp
index 7a6cba6e..8c54fb69 100644
--- a/Graphics/GraphicsEngineD3D11/src/Texture1D_D3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/Texture1D_D3D11.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/Texture2D_D3D11.cpp b/Graphics/GraphicsEngineD3D11/src/Texture2D_D3D11.cpp
index f2fef036..1e749926 100644
--- a/Graphics/GraphicsEngineD3D11/src/Texture2D_D3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/Texture2D_D3D11.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/Texture3D_D3D11.cpp b/Graphics/GraphicsEngineD3D11/src/Texture3D_D3D11.cpp
index bb7bd484..0cbe3b7f 100644
--- a/Graphics/GraphicsEngineD3D11/src/Texture3D_D3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/Texture3D_D3D11.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp
index 7401a714..12726e4b 100644
--- a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp
index 9cc8b41d..af0ca4ef 100644
--- a/Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/TextureViewD3D11Impl.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/Graphics/GraphicsEngineD3D11/src/pch.cpp b/Graphics/GraphicsEngineD3D11/src/pch.cpp
index 860c4217..802d627e 100644
--- a/Graphics/GraphicsEngineD3D11/src/pch.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/pch.cpp
@@ -1,4 +1,4 @@
-/* Copyright 2015-2016 Egor Yusov
+/* Copyright 2015-2017 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.