Add pooled render targets naming for easier GPU memory usage debugging

This commit is contained in:
Wojciech Figat
2022-12-09 11:26:35 +01:00
parent d544c43744
commit b33ce8d264
25 changed files with 69 additions and 4 deletions

View File

@@ -222,8 +222,10 @@ void ShadowsOfMordor::Builder::onJobRender(GPUContext* context)
auto tempDesc = GPUTextureDescription::New2D(atlasSize, atlasSize, HemispheresFormatToPixelFormat[CACHE_POSITIONS_FORMAT]);
auto resultPositions = RenderTargetPool::Get(tempDesc);
RENDER_TARGET_POOL_SET_NAME(_cachePositions, "ShadowsOfMordor.Positions");
tempDesc.Format = HemispheresFormatToPixelFormat[CACHE_NORMALS_FORMAT];
auto resultNormals = RenderTargetPool::Get(tempDesc);
RENDER_TARGET_POOL_SET_NAME(_cachePositions, "ShadowsOfMordor.Normals");
if (resultPositions == nullptr || resultNormals == nullptr)
{
RenderTargetPool::Release(resultPositions);