Add logging PixelFormat as string instead of integer value for better readability

This commit is contained in:
Wojtek Figat
2023-04-13 10:31:40 +02:00
parent bedb056645
commit b0966c9114
9 changed files with 23 additions and 15 deletions

View File

@@ -9,6 +9,7 @@
#include "Engine/Core/Log.h"
#include "Engine/Graphics/PixelFormatExtensions.h"
#include "Engine/Graphics/Textures/TextureData.h"
#include "Engine/Scripting/Enums.h"
void GPUTextureViewVulkan::Init(GPUDeviceVulkan* device, ResourceOwnerVulkan* owner, VkImage image, int32 totalMipLevels, PixelFormat format, MSAALevel msaa, VkExtent3D extent, VkImageViewType viewType, int32 mipLevels, int32 firstMipIndex, int32 arraySize, int32 firstArraySlice, bool readOnlyDepth)
{
@@ -241,7 +242,7 @@ bool GPUTextureVulkan::OnInit()
_desc.Format = _device->GetClosestSupportedPixelFormat(format, _desc.Flags, optimalTiling);
if (_desc.Format == PixelFormat::Unknown)
{
LOG(Error, "Unsupported texture format {0}.", (int32)format);
LOG(Error, "Unsupported texture format {0}.", ScriptingEnum::ToString(format));
return true;
}