Removing hard sync, breaking stuff again

This commit is contained in:
Dynamitos
2024-03-03 10:29:09 +01:00
parent 66b3ba59b6
commit a74def0ab0
6 changed files with 9 additions and 7 deletions
+1
View File
@@ -54,6 +54,7 @@ public:
virtual ORenderPass createRenderPass(RenderTargetLayout layout, Array<SubPassDependency> dependencies, PViewport renderArea) = 0;
virtual void beginRenderPass(PRenderPass renderPass) = 0;
virtual void endRenderPass() = 0;
virtual void waitDeviceIdle() = 0;
virtual void executeCommands(const Array<PRenderCommand>& commands) = 0;
virtual void executeCommands(const Array<PComputeCommand>& commands) = 0;
+1 -1
View File
@@ -24,7 +24,7 @@ struct GraphicsInitializer
: applicationName("SeeleEngine")
, engineName("SeeleEngine")
, windowLayoutFile(nullptr)
, layers{"VK_LAYER_LUNARG_monitor"}
, layers{}
, instanceExtensions{}
, deviceExtensions{"VK_KHR_swapchain"}
, windowHandle(nullptr)
@@ -12,8 +12,6 @@
#include "Material/MaterialInstance.h"
#include "Graphics/Descriptor.h"
#include "Graphics/Command.h"
#include <vulkan/vulkan.h>
#include "Graphics/Vulkan/Graphics.h"
using namespace Seele;
@@ -9,8 +9,6 @@
#include "Math/Vector.h"
#include "RenderGraph.h"
#include "Graphics/Command.h"
#include <vulkan/vulkan.h>
#include "Graphics/Vulkan/Graphics.h"
using namespace Seele;
@@ -131,9 +129,8 @@ void DepthPrepass::render()
commands.add(command);
}
}
graphics->executeCommands(commands);
//graphics->executeCommands(commands);
graphics->endRenderPass();
//vkDeviceWaitIdle(((Vulkan::Graphics*)graphics.getHandle())->getDevice());
}
void DepthPrepass::endFrame()
+5
View File
@@ -111,6 +111,11 @@ void Graphics::endRenderPass()
getGraphicsCommands()->submitCommands();
}
void Graphics::waitDeviceIdle()
{
vkDeviceWaitIdle(handle);
}
void Graphics::executeCommands(const Array<Gfx::PRenderCommand>& commands)
{
getGraphicsCommands()->getCommands()->executeCommands(commands);
+1
View File
@@ -37,6 +37,7 @@ public:
virtual Gfx::ORenderPass createRenderPass(Gfx::RenderTargetLayout layout, Array<Gfx::SubPassDependency> dependencies, Gfx::PViewport renderArea) override;
virtual void beginRenderPass(Gfx::PRenderPass renderPass) override;
virtual void endRenderPass() override;
virtual void waitDeviceIdle() override;
virtual void executeCommands(const Array<Gfx::PRenderCommand>& commands) override;
virtual void executeCommands(const Array<Gfx::PComputeCommand>& commands) override;