Add logging PixelFormat as string instead of integer value for better readability
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "Engine/Utilities/StringConverter.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#include "Engine/Scripting/Enums.h"
|
||||
|
||||
#if !USE_EDITOR && (PLATFORM_WINDOWS || PLATFORM_LINUX)
|
||||
#include "Engine/Core/Config/PlatformSettings.h"
|
||||
@@ -1380,7 +1381,7 @@ PixelFormat GPUDeviceVulkan::GetClosestSupportedPixelFormat(PixelFormat format,
|
||||
#if !BUILD_RELEASE
|
||||
if (format != remap)
|
||||
{
|
||||
LOG(Warning, "Unsupported Vulkan format {0}. Remapping to {1}", (int32)format, (int32)remap);
|
||||
LOG(Warning, "Unsupported Vulkan format {0}. Remapping to {1}", ScriptingEnum::ToString(format), ScriptingEnum::ToString(remap));
|
||||
format = GetClosestSupportedPixelFormat(remap, flags, optimalTiling);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "CmdBufferVulkan.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Graphics/GPULimits.h"
|
||||
#include "Engine/Scripting/Enums.h"
|
||||
|
||||
void BackBufferVulkan::Setup(GPUSwapChainVulkan* window, VkImage backbuffer, PixelFormat format, VkExtent3D extent)
|
||||
{
|
||||
@@ -231,13 +232,13 @@ bool GPUSwapChainVulkan::CreateSwapChain(int32 width, int32 height)
|
||||
|
||||
if (!found)
|
||||
{
|
||||
LOG(Warning, "Requested pixel format {0} not supported by this swapchain. Falling back to supported swapchain formats...", (uint32)resultFormat);
|
||||
LOG(Warning, "Requested pixel format {0} not supported by this swapchain. Falling back to supported swapchain formats...", ScriptingEnum::ToString(resultFormat));
|
||||
resultFormat = PixelFormat::Unknown;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(Warning, "Requested pixel format {0} is not supported by this Vulkan implementation", (uint32)resultFormat);
|
||||
LOG(Warning, "Requested pixel format {0} is not supported by this Vulkan implementation", ScriptingEnum::ToString(resultFormat));
|
||||
resultFormat = PixelFormat::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user