Fixing linux build kind of

This commit is contained in:
2021-10-13 15:20:30 +02:00
parent 99760724cd
commit 59b262777c
18 changed files with 111 additions and 100 deletions
@@ -1,10 +1,5 @@
target_sources(SeeleEngine
PRIVATE
NsightAftermathGpuCrashTracker.h
NsightAftermathGpuCrashTracker.cpp
NsightAftermathHelpers.h
NsightAftermathShaderDatabase.h
NsightAftermathShaderDatabase.cpp
VulkanAllocator.h
VulkanAllocator.cpp
VulkanBuffer.cpp
@@ -45,7 +45,7 @@ GpuCrashTracker::~GpuCrashTracker()
// If initialized, disable GPU crash dumps
if (m_initialized)
{
GFSDK_Aftermath_DisableGpuCrashDumps();
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_DisableGpuCrashDumps());
}
}
@@ -91,7 +91,7 @@ void GpuCrashTracker::OnShaderDebugInfo(const void* pShaderDebugInfo, const uint
// Get shader debug information identifier
GFSDK_Aftermath_ShaderDebugInfoIdentifier identifier = {};
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_GetShaderDebugInfoIdentifier(
AFTERMATH_CHECK_ERROR(PFN_GFSDK_Aftermath_GetShaderDebugInfoIdentifier(
GFSDK_Aftermath_Version_API,
pShaderDebugInfo,
shaderDebugInfoSize,
@@ -124,7 +124,7 @@ void GpuCrashTracker::WriteGpuCrashDumpToFile(const void* pGpuCrashDump, const u
{
// Create a GPU crash dump decoder object for the GPU crash dump.
GFSDK_Aftermath_GpuCrashDump_Decoder decoder = {};
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_GpuCrashDump_CreateDecoder(
AFTERMATH_CHECK_ERROR(PFN_GFSDK_Aftermath_GpuCrashDump_CreateDecoder(
GFSDK_Aftermath_Version_API,
pGpuCrashDump,
gpuCrashDumpSize,
@@ -133,19 +133,19 @@ void GpuCrashTracker::WriteGpuCrashDumpToFile(const void* pGpuCrashDump, const u
// Use the decoder object to read basic information, like application
// name, PID, etc. from the GPU crash dump.
GFSDK_Aftermath_GpuCrashDump_BaseInfo baseInfo = {};
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_GpuCrashDump_GetBaseInfo(decoder, &baseInfo));
AFTERMATH_CHECK_ERROR(PFN_GFSDK_Aftermath_GpuCrashDump_GetBaseInfo(decoder, &baseInfo));
// Use the decoder object to query the application name that was set
// in the GPU crash dump description.
uint32_t applicationNameLength = 0;
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_GpuCrashDump_GetDescriptionSize(
AFTERMATH_CHECK_ERROR(PFN_GFSDK_Aftermath_GpuCrashDump_GetDescriptionSize(
decoder,
GFSDK_Aftermath_GpuCrashDumpDescriptionKey_ApplicationName,
&applicationNameLength));
std::vector<char> applicationName(applicationNameLength, '\0');
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_GpuCrashDump_GetDescription(
AFTERMATH_CHECK_ERROR(PFN_GFSDK_Aftermath_GpuCrashDump_GetDescription(
decoder,
GFSDK_Aftermath_GpuCrashDumpDescriptionKey_ApplicationName,
uint32_t(applicationName.size()),
@@ -176,7 +176,7 @@ void GpuCrashTracker::WriteGpuCrashDumpToFile(const void* pGpuCrashDump, const u
// Decode the crash dump to a JSON string.
// Step 1: Generate the JSON and get the size.
uint32_t jsonSize = 0;
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_GpuCrashDump_GenerateJSON(
AFTERMATH_CHECK_ERROR(PFN_GFSDK_Aftermath_GpuCrashDump_GenerateJSON(
decoder,
GFSDK_Aftermath_GpuCrashDumpDecoderFlags_ALL_INFO,
GFSDK_Aftermath_GpuCrashDumpFormatterFlags_NONE,
@@ -188,7 +188,7 @@ void GpuCrashTracker::WriteGpuCrashDumpToFile(const void* pGpuCrashDump, const u
&jsonSize));
// Step 2: Allocate a buffer and fetch the generated JSON.
std::vector<char> json(jsonSize);
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_GpuCrashDump_GetJSON(
AFTERMATH_CHECK_ERROR(PFN_GFSDK_Aftermath_GpuCrashDump_GetJSON(
decoder,
uint32_t(json.size()),
json.data()));
@@ -203,7 +203,7 @@ void GpuCrashTracker::WriteGpuCrashDumpToFile(const void* pGpuCrashDump, const u
}
// Destroy the GPU crash dump decoder object.
AFTERMATH_CHECK_ERROR(GFSDK_Aftermath_GpuCrashDump_DestroyDecoder(decoder));
AFTERMATH_CHECK_ERROR(PFN_GFSDK_Aftermath_GpuCrashDump_DestroyDecoder(decoder));
}
// Helper for writing shader debug information to a file
@@ -414,7 +414,7 @@ void Graphics::setupDebugCallback()
VK_CHECK(CreateDebugReportCallbackEXT(instance, &createInfo, nullptr, &callback));
crashTracker.Initialize();
//crashTracker.Initialize();
}
void Graphics::pickPhysicalDevice()
+1 -2
View File
@@ -1,7 +1,6 @@
#pragma once
#include "VulkanGraphicsResources.h"
#include "Graphics/Graphics.h"
#include "NsightAftermathGpuCrashTracker.h"
namespace Seele
{
@@ -99,7 +98,7 @@ protected:
Map<uint32, PFramebuffer> allocatedFramebuffers;
PAllocator allocator;
PStagingManager stagingManager;
GpuCrashTracker crashTracker;
//GpuCrashTracker crashTracker;
friend class Window;
};