summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-04-13 16:49:29 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-04-13 16:49:29 +0000
commitde0549ae632c6ad7919ccbdb3fc9a1c7dcb983ee (patch)
treeaf1fe20a9b4ea186416c96382e53e42f431c0f50 /Graphics/GraphicsEngine
parentMerge pull request #84 from tombish/master (diff)
downloadDiligentCore-de0549ae632c6ad7919ccbdb3fc9a1c7dcb983ee.tar.gz
DiligentCore-de0549ae632c6ad7919ccbdb3fc9a1c7dcb983ee.zip
Improved names of default texture views
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/TextureBase.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngine/include/TextureBase.h b/Graphics/GraphicsEngine/include/TextureBase.h
index 939c0e3a..04922e1f 100644
--- a/Graphics/GraphicsEngine/include/TextureBase.h
+++ b/Graphics/GraphicsEngine/include/TextureBase.h
@@ -31,6 +31,7 @@
#include "DeviceObjectBase.h"
#include "GraphicsAccessories.h"
#include "STDAllocator.h"
+#include "FormatString.h"
#include <memory>
namespace Diligent
@@ -448,10 +449,13 @@ void TextureBase<BaseInterface, TRenderDeviceImpl, TTextureViewImpl, TTexViewObj
return;
}
- if(this->m_Desc.BindFlags & BIND_SHADER_RESOURCE )
+ if (this->m_Desc.BindFlags & BIND_SHADER_RESOURCE )
{
TextureViewDesc ViewDesc;
ViewDesc.ViewType = TEXTURE_VIEW_SHADER_RESOURCE;
+ auto ViewName = FormatString("Default SRV of texture '", this->m_Desc.Name, "'");
+ ViewDesc.Name = ViewName.c_str();
+
ITextureView *pSRV = nullptr;
if ((this->m_Desc.MiscFlags & MISC_TEXTURE_FLAG_GENERATE_MIPS) != 0)
ViewDesc.Flags |= TEXTURE_VIEW_FLAG_ALLOW_MIP_MAP_GENERATION;
@@ -464,6 +468,9 @@ void TextureBase<BaseInterface, TRenderDeviceImpl, TTextureViewImpl, TTexViewObj
{
TextureViewDesc ViewDesc;
ViewDesc.ViewType = TEXTURE_VIEW_RENDER_TARGET;
+ auto ViewName = FormatString("Default RTV of texture '", this->m_Desc.Name, "'");
+ ViewDesc.Name = ViewName.c_str();
+
ITextureView *pRTV = nullptr;
CreateViewInternal( ViewDesc, &pRTV, true );
m_pDefaultRTV.reset( static_cast<TTextureViewImpl*>(pRTV) );
@@ -474,6 +481,9 @@ void TextureBase<BaseInterface, TRenderDeviceImpl, TTextureViewImpl, TTexViewObj
{
TextureViewDesc ViewDesc;
ViewDesc.ViewType = TEXTURE_VIEW_DEPTH_STENCIL;
+ auto ViewName = FormatString("Default DSV of texture '", this->m_Desc.Name, "'");
+ ViewDesc.Name = ViewName.c_str();
+
ITextureView *pDSV = nullptr;
CreateViewInternal( ViewDesc, &pDSV, true );
m_pDefaultDSV.reset( static_cast<TTextureViewImpl*>(pDSV) );
@@ -484,6 +494,9 @@ void TextureBase<BaseInterface, TRenderDeviceImpl, TTextureViewImpl, TTexViewObj
{
TextureViewDesc ViewDesc;
ViewDesc.ViewType = TEXTURE_VIEW_UNORDERED_ACCESS;
+ auto ViewName = FormatString("Default UAV of texture '", this->m_Desc.Name, "'");
+ ViewDesc.Name = ViewName.c_str();
+
ViewDesc.AccessFlags = UAV_ACCESS_FLAG_READ_WRITE;
ITextureView *pUAV = nullptr;
CreateViewInternal( ViewDesc, &pUAV, true );