ADD: Texture load multithreaded
This commit is contained in:
@@ -25,8 +25,20 @@ void RenderGraph::init(EngineContext *ctx)
|
||||
|
||||
void RenderGraph::clear()
|
||||
{
|
||||
_passes.clear();
|
||||
_resources.reset();
|
||||
_passes.clear();
|
||||
_resources.reset();
|
||||
}
|
||||
|
||||
void RenderGraph::shutdown()
|
||||
{
|
||||
// If a timestamp pool exists, ensure the GPU is not using it and destroy it.
|
||||
if (_timestampPool != VK_NULL_HANDLE && _context && _context->getDevice())
|
||||
{
|
||||
// Be conservative here: make sure the graphics queue is idle before destroying.
|
||||
vkQueueWaitIdle(_context->getDevice()->graphicsQueue());
|
||||
vkDestroyQueryPool(_context->getDevice()->device(), _timestampPool, nullptr);
|
||||
_timestampPool = VK_NULL_HANDLE;
|
||||
}
|
||||
}
|
||||
|
||||
RGImageHandle RenderGraph::import_image(const RGImportedImageDesc &desc)
|
||||
|
||||
@@ -15,8 +15,11 @@ class EngineContext;
|
||||
class RenderGraph
|
||||
{
|
||||
public:
|
||||
void init(EngineContext* ctx);
|
||||
void clear();
|
||||
void init(EngineContext* ctx);
|
||||
void clear();
|
||||
// Destroy any GPU-side state owned by the graph (e.g. query pools).
|
||||
// Call during engine shutdown before destroying the VkDevice.
|
||||
void shutdown();
|
||||
|
||||
// Import externally owned images (swapchain, drawImage, g-buffers)
|
||||
RGImageHandle import_image(const RGImportedImageDesc& desc);
|
||||
|
||||
Reference in New Issue
Block a user