Fixing linux build kind of
This commit is contained in:
@@ -28,14 +28,14 @@ private:
|
||||
void setupFrustums();
|
||||
static constexpr uint32 BLOCK_SIZE = 8;
|
||||
static constexpr uint32 INDEX_LIGHT_ENV = 1;
|
||||
_declspec(align(16)) struct DispatchParams
|
||||
struct DispatchParams
|
||||
{
|
||||
glm::uvec3 numThreadGroups;
|
||||
uint32_t pad0;
|
||||
glm::uvec3 numThreads;
|
||||
uint32_t pad1;
|
||||
} dispatchParams;
|
||||
__declspec(align(16)) struct Plane
|
||||
struct Plane
|
||||
{
|
||||
Vector n;
|
||||
float d;
|
||||
@@ -43,7 +43,7 @@ private:
|
||||
Vector p1;
|
||||
Vector p2;
|
||||
};
|
||||
__declspec(align(16)) struct Frustum
|
||||
struct Frustum
|
||||
{
|
||||
Plane planes[4];
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
virtual void createRenderPass() = 0;
|
||||
void setResources(PRenderGraphResources resources) { this->resources = resources; }
|
||||
protected:
|
||||
_declspec(align(16)) struct ViewParameter
|
||||
struct ViewParameter
|
||||
{
|
||||
Matrix4 viewMatrix;
|
||||
Matrix4 projectionMatrix;
|
||||
|
||||
@@ -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,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;
|
||||
};
|
||||
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
}
|
||||
private:
|
||||
Array<std::thread> workers;
|
||||
Map<JobStage, List<Job>> jobs;
|
||||
void threadLoop();
|
||||
};
|
||||
static ThreadPool& getGlobalThreadPool();
|
||||
|
||||
@@ -60,7 +60,7 @@ void RenderHierarchy::moveElement(PElement elementToMove, PElement newParent)
|
||||
|
||||
void RenderHierarchy::updateHierarchy()
|
||||
{
|
||||
Array<RenderHierarchyUpdate*> localUpdates;
|
||||
List<RenderHierarchyUpdate*> localUpdates;
|
||||
{ // make a local copy of the updates so we dont hold the lock for too long
|
||||
std::lock_guard lock(updateLock);
|
||||
localUpdates = updates;
|
||||
|
||||
@@ -26,12 +26,19 @@ struct AddElementRenderHierarchyUpdate : public RenderHierarchyUpdate
|
||||
{
|
||||
Element* addedElement;
|
||||
Element* parent;
|
||||
AddElementRenderHierarchyUpdate(Element* addedElement, Element* parent)
|
||||
: addedElement(addedElement)
|
||||
, parent(parent)
|
||||
{}
|
||||
virtual void apply(Array<RenderElement>& elements) override;
|
||||
};
|
||||
|
||||
struct RemoveElementRenderHierarchyUpdate : public RenderHierarchyUpdate
|
||||
{
|
||||
Element* element;
|
||||
RemoveElementRenderHierarchyUpdate(Element* elementToRemove)
|
||||
: element(elementToRemove)
|
||||
{}
|
||||
virtual void apply(Array<RenderElement>& elements) override;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user