Fix build

This commit is contained in:
Wojtek Figat
2023-07-19 09:08:17 +02:00
parent b26b9302e0
commit 32d9067710
5 changed files with 22 additions and 20 deletions

View File

@@ -460,10 +460,12 @@ GPUSwapChainVulkan::Status GPUSwapChainVulkan::Present(QueueVulkan* presentQueue
{ {
return Status::LostSurface; return Status::LostSurface;
} }
#if GPU_ENABLE_ASSERTION
if (presentResult != VK_SUCCESS && presentResult != VK_SUBOPTIMAL_KHR) if (presentResult != VK_SUCCESS && presentResult != VK_SUBOPTIMAL_KHR)
{ {
VALIDATE_VULKAN_RESULT(presentResult); VALIDATE_VULKAN_RESULT(presentResult);
} }
#endif
return Status::Ok; return Status::Ok;
} }

View File

@@ -205,6 +205,23 @@ void RenderToolsVulkan::SetObjectName(VkDevice device, uint64 objectHandle, VkOb
#endif #endif
} }
void RenderToolsVulkan::SetObjectName(VkDevice device, uint64 objectHandle, VkObjectType objectType, const char* name)
{
#if VK_EXT_debug_utils
// Check for valid function pointer (may not be present if not running in a debugging application)
if (vkSetDebugUtilsObjectNameEXT != nullptr && name != nullptr && *name != 0)
{
VkDebugUtilsObjectNameInfoEXT objectNameInfo;
ZeroStruct(objectNameInfo, VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT);
objectNameInfo.objectType = objectType;
objectNameInfo.objectHandle = objectHandle;
objectNameInfo.pObjectName = name;
const VkResult result = vkSetDebugUtilsObjectNameEXT(device, &objectNameInfo);
LOG_VULKAN_RESULT(result);
}
#endif
}
#endif #endif
String RenderToolsVulkan::GetVkErrorString(VkResult result) String RenderToolsVulkan::GetVkErrorString(VkResult result)

View File

@@ -43,26 +43,8 @@ private:
public: public:
#if GPU_ENABLE_RESOURCE_NAMING #if GPU_ENABLE_RESOURCE_NAMING
static void SetObjectName(VkDevice device, uint64 objectHandle, VkObjectType objectType, const String& name); static void SetObjectName(VkDevice device, uint64 objectHandle, VkObjectType objectType, const String& name);
static void SetObjectName(VkDevice device, uint64 objectHandle, VkObjectType objectType, const char* name);
static void SetObjectName(VkDevice device, uint64 objectHandle, VkObjectType objectType, const char* name)
{
#if VK_EXT_debug_utils
// Check for valid function pointer (may not be present if not running in a debugging application)
if (vkSetDebugUtilsObjectNameEXT != nullptr && name != nullptr && *name != 0)
{
VkDebugUtilsObjectNameInfoEXT objectNameInfo;
ZeroStruct(objectNameInfo, VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT);
objectNameInfo.objectType = objectType;
objectNameInfo.objectHandle = objectHandle;
objectNameInfo.pObjectName = name;
const VkResult result = vkSetDebugUtilsObjectNameEXT(device, &objectNameInfo);
LOG_VULKAN_RESULT(result);
}
#endif
}
#endif #endif
static String GetVkErrorString(VkResult result); static String GetVkErrorString(VkResult result);

View File

@@ -12,8 +12,8 @@
#include "Engine/Profiler/ProfilerCPU.h" #include "Engine/Profiler/ProfilerCPU.h"
#include "Engine/Serialization/Serialization.h" #include "Engine/Serialization/Serialization.h"
#include "Engine/Level/Actors/AnimatedModel.h" #include "Engine/Level/Actors/AnimatedModel.h"
#if USE_EDITOR
#include "Engine/Level/Scene/SceneRendering.h" #include "Engine/Level/Scene/SceneRendering.h"
#if USE_EDITOR
#include "Engine/Debug/DebugDraw.h" #include "Engine/Debug/DebugDraw.h"
#endif #endif

View File

@@ -44,6 +44,7 @@ public class NvCloth : DepsModule
libName = "NvCloth"; libName = "NvCloth";
options.PublicIncludePaths.Add(Path.Combine(Globals.EngineRoot, "Source/Platforms/Switch/Binaries/Data/PhysX/physx/include")); options.PublicIncludePaths.Add(Path.Combine(Globals.EngineRoot, "Source/Platforms/Switch/Binaries/Data/PhysX/physx/include"));
options.PublicIncludePaths.Add(Path.Combine(Globals.EngineRoot, "Source/Platforms/Switch/Binaries/Data/PhysX/physx/include/foundation")); options.PublicIncludePaths.Add(Path.Combine(Globals.EngineRoot, "Source/Platforms/Switch/Binaries/Data/PhysX/physx/include/foundation"));
options.PublicIncludePaths.Add(Path.Combine(Globals.EngineRoot, "Source/Platforms/Switch/Binaries/Data/NvCloth/NvCloth/include/NvCloth/ps"));
break; break;
} }
AddLib(options, options.DepsFolder, libName); AddLib(options, options.DepsFolder, libName);