summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-05-05 21:29:22 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-05-05 21:29:22 +0000
commit37e6c044d7af7367ed18a126aa912f09f84cbd14 (patch)
treef67165e122baa96cbf43ca503bc24aaf5878e179 /Graphics/GraphicsEngineVulkan
parentMerge pull request #133 from markusgod/vulakn-validation-layer (diff)
downloadDiligentCore-37e6c044d7af7367ed18a126aa912f09f84cbd14.tar.gz
DiligentCore-37e6c044d7af7367ed18a126aa912f09f84cbd14.zip
VK backend: improved debug string for render pass objects
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp b/Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp
index 7c7c404d..c352c2a9 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderPassCache.cpp
@@ -59,10 +59,16 @@ VkRenderPass RenderPassCache::GetRenderPass(const RenderPassCacheKey& Key)
PipelineStateVkImpl::GetRenderPassCreateInfo(Key.NumRenderTargets, Key.RTVFormats, Key.DSVFormat,
Key.SampleCount, Attachments, AttachmentReferences, Subpass);
std::stringstream PassNameSS;
- PassNameSS << "Render pass: rt count: " << Key.NumRenderTargets << "; sample count: " << Key.SampleCount
- << "; DSV Format: " << GetTextureFormatAttribs(Key.DSVFormat).Name << "; RTV Formats: ";
- for (Uint32 rt = 0; rt < Key.NumRenderTargets; ++rt)
- PassNameSS << (rt > 0 ? ", " : "") << GetTextureFormatAttribs(Key.RTVFormats[rt]).Name;
+ PassNameSS << "Render pass: RT count: " << Uint32{Key.NumRenderTargets} << "; sample count: " << Uint32{Key.SampleCount}
+ << "; DSV Format: " << GetTextureFormatAttribs(Key.DSVFormat).Name;
+ if (Key.NumRenderTargets > 0)
+ {
+ PassNameSS << (Key.NumRenderTargets > 1 ? "; RTV Formats: " : "; RTV Format: ");
+ for (Uint32 rt = 0; rt < Key.NumRenderTargets; ++rt)
+ {
+ PassNameSS << (rt > 0 ? ", " : "") << GetTextureFormatAttribs(Key.RTVFormats[rt]).Name;
+ }
+ }
auto RenderPass = m_DeviceVkImpl.GetLogicalDevice().CreateRenderPass(RenderPassCI, PassNameSS.str().c_str());
VERIFY_EXPR(RenderPass != VK_NULL_HANDLE);
it = m_Cache.emplace(Key, std::move(RenderPass)).first;