Add **GPU Memory profiler** to Editor

This commit is contained in:
Wojciech Figat
2022-12-08 16:30:37 +01:00
parent f2c594569d
commit df82a0f5d0
47 changed files with 548 additions and 195 deletions

View File

@@ -101,14 +101,9 @@ String GPUSampler::ToString() const
#endif
}
GPUResource::ResourceType GPUSampler::GetResourceType() const
GPUResourceType GPUSampler::GetResourceType() const
{
return ResourceType::Sampler;
}
GPUResource::ObjectType GPUSampler::GetObjectType() const
{
return ObjectType::Other;
return GPUResourceType::Sampler;
}
void GPUSampler::OnReleaseGPU()

View File

@@ -43,8 +43,7 @@ protected:
public:
// [GPUResource]
String ToString() const override;
ResourceType GetResourceType() const final override;
ObjectType GetObjectType() const final override;
GPUResourceType GetResourceType() const final override;
protected:
// [GPUResource]

View File

@@ -575,18 +575,13 @@ String GPUTexture::ToString() const
#endif
}
GPUResource::ResourceType GPUTexture::GetResourceType() const
GPUResourceType GPUTexture::GetResourceType() const
{
if (IsVolume())
return ResourceType::VolumeTexture;
return GPUResourceType::VolumeTexture;
if (IsCubeMap())
return ResourceType::CubeTexture;
return IsRegularTexture() ? ResourceType::Texture : ResourceType::RenderTarget;
}
GPUResource::ObjectType GPUTexture::GetObjectType() const
{
return ObjectType::Texture;
return GPUResourceType::CubeTexture;
return IsRegularTexture() ? GPUResourceType::Texture : GPUResourceType::RenderTarget;
}
void GPUTexture::OnReleaseGPU()

View File

@@ -573,8 +573,7 @@ protected:
public:
// [GPUResource]
String ToString() const override;
ResourceType GetResourceType() const final override;
ObjectType GetObjectType() const final override;
GPUResourceType GetResourceType() const final override;
protected:
// [GPUResource]

View File

@@ -1,6 +1,7 @@
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
#include "StreamingTexture.h"
#include "Engine/Core/Log.h"
#include "Engine/Threading/Threading.h"
#include "Engine/Streaming/StreamingGroup.h"
#include "Engine/Content/Loading/ContentLoadingManager.h"