diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2017-05-20 21:00:37 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2017-05-20 21:00:37 +0000 |
| commit | 109a75aac22463802f03dfc6588951ed0b04892a (patch) | |
| tree | 51e121c71b7e8d30bab1eb400e21497677797a03 /Graphics/GraphicsEngineD3DBase | |
| parent | Resolved conflicts (diff) | |
| download | DiligentCore-109a75aac22463802f03dfc6588951ed0b04892a.tar.gz DiligentCore-109a75aac22463802f03dfc6588951ed0b04892a.zip | |
Merge from dev branch
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
12 files changed, 28 insertions, 12 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/D3DErrors.h b/Graphics/GraphicsEngineD3DBase/include/D3DErrors.h index 5280820f..e70e4f87 100644 --- a/Graphics/GraphicsEngineD3DBase/include/D3DErrors.h +++ b/Graphics/GraphicsEngineD3DBase/include/D3DErrors.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/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.h b/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.h index 7e58c910..b21d4692 100644 --- a/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.h +++ b/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.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/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h b/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h index ebb8825b..b855019a 100644 --- a/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h +++ b/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.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/GraphicsEngineD3DBase/include/D3DViewDescConversionImpl.h b/Graphics/GraphicsEngineD3DBase/include/D3DViewDescConversionImpl.h index baa0a3ab..ef7a2b3a 100644 --- a/Graphics/GraphicsEngineD3DBase/include/D3DViewDescConversionImpl.h +++ b/Graphics/GraphicsEngineD3DBase/include/D3DViewDescConversionImpl.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/GraphicsEngineD3DBase/include/DXGITypeConversions.h b/Graphics/GraphicsEngineD3DBase/include/DXGITypeConversions.h index 1f0889d8..c705ca13 100644 --- a/Graphics/GraphicsEngineD3DBase/include/DXGITypeConversions.h +++ b/Graphics/GraphicsEngineD3DBase/include/DXGITypeConversions.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/GraphicsEngineD3DBase/include/RenderDeviceD3DBase.h b/Graphics/GraphicsEngineD3DBase/include/RenderDeviceD3DBase.h index be7e940d..25028925 100644 --- a/Graphics/GraphicsEngineD3DBase/include/RenderDeviceD3DBase.h +++ b/Graphics/GraphicsEngineD3DBase/include/RenderDeviceD3DBase.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/GraphicsEngineD3DBase/include/ShaderD3DBase.h b/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.h index 0fd007fa..d529db6a 100644 --- a/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.h +++ b/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.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/GraphicsEngineD3DBase/include/ShaderResources.h b/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h index ad63d64b..7f03563f 100644 --- a/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h +++ b/Graphics/GraphicsEngineD3DBase/include/ShaderResources.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. @@ -25,6 +25,7 @@ /// \file /// Declaration of Diligent::ShaderResources class +/// See http://diligentgraphics.com/diligent-engine/architecture/d3d12/shader-resources/ // ShaderResources class uses continuous chunk of memory to store all resources, as follows: // @@ -259,6 +260,7 @@ private: const Uint32 PackedAttribs; }; + /// Diligent::ShaderResources class class ShaderResources { @@ -266,6 +268,7 @@ public: ShaderResources(IMemoryAllocator &Allocator, SHADER_TYPE ShaderType); // Copies specified types of resources from another ShaderResources objects + // Only resources listed in AllowedVarTypes are copied ShaderResources(IMemoryAllocator &Allocator, const ShaderResources& SrcResources, const SHADER_VARIABLE_TYPE *AllowedVarTypes, @@ -299,6 +302,7 @@ public: SHADER_TYPE GetShaderType()const noexcept{return m_ShaderType;} + // Process only resources listed in AllowedVarTypes template<typename THandleCB, typename THandleTexSRV, typename THandleTexUAV, diff --git a/Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.h b/Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.h index 6a8372bb..befdde09 100644 --- a/Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.h +++ b/Graphics/GraphicsEngineD3DBase/include/ShaderVariableD3DBase.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/GraphicsEngineD3DBase/src/DXGITypeConversions.cpp b/Graphics/GraphicsEngineD3DBase/src/DXGITypeConversions.cpp index 39c92997..29087ed6 100644 --- a/Graphics/GraphicsEngineD3DBase/src/DXGITypeConversions.cpp +++ b/Graphics/GraphicsEngineD3DBase/src/DXGITypeConversions.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/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp index 9650fba3..bf975a22 100644 --- a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp +++ b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.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/GraphicsEngineD3DBase/src/ShaderResources.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderResources.cpp index dd3b691c..e5a62f98 100644 --- a/Graphics/GraphicsEngineD3DBase/src/ShaderResources.cpp +++ b/Graphics/GraphicsEngineD3DBase/src/ShaderResources.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. @@ -98,7 +98,13 @@ void ShaderResources::CountResources(const SHADER_VARIABLE_TYPE *AllowedVarTypes Uint32& NumCBs, Uint32& NumTexSRVs, Uint32& NumTexUAVs, Uint32& NumBufSRVs, Uint32& NumBufUAVs, Uint32& NumSamplers)const noexcept { + // 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(AllowedVarTypes, NumAllowedTypes); +#pragma warning (pop) NumCBs = 0; NumTexSRVs = 0; @@ -150,7 +156,13 @@ ShaderResources::ShaderResources(IMemoryAllocator &Allocator, Initialize(Allocator, NumCBs, NumTexSRVs, NumTexUAVs, NumBufSRVs, NumBufUAVs, NumSamplers); + // 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(AllowedVarTypes, NumAllowedTypes); +#pragma warning(pop) Uint32 CurrCB = 0, CurrTexSRV = 0, CurrTexUAV = 0, CurrBufSRV = 0, CurrBufUAV = 0, CurrSampler = 0; ProcessResources( |
