mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
working on cmd resources management
This commit is contained in:
@@ -6,16 +6,18 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/06 18:25:42 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/03 15:27:20 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/05 23:10:01 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __MLX_VK_CMD_BUFFER__
|
||||
#define __MLX_VK_CMD_BUFFER__
|
||||
|
||||
#include <renderer/core/cmd_resource.h>
|
||||
#include <mlx_profile.h>
|
||||
#include <volk.h>
|
||||
#include <renderer/core/vk_fence.h>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
@@ -57,6 +59,7 @@ namespace mlx
|
||||
void copyBuffer(Buffer& dst, Buffer& src) const noexcept;
|
||||
void copyBufferToImage(Buffer& buffer, Image& image) const noexcept;
|
||||
void copyImagetoBuffer(Image& image, Buffer& buffer) const noexcept;
|
||||
void transitionImageLayout(Image& image, VkImageLayout new_layout) const noexcept;
|
||||
|
||||
inline bool isInit() const noexcept { return _state != state::uninit; }
|
||||
inline bool isReadyToBeUsed() const noexcept { return _state == state::ready; }
|
||||
@@ -69,6 +72,7 @@ namespace mlx
|
||||
inline Fence& getFence() noexcept { return _fence; }
|
||||
|
||||
private:
|
||||
std::unordered_set<CmdResource> _resources;
|
||||
Fence _fence;
|
||||
VkCommandBuffer _cmd_buffer = VK_NULL_HANDLE;
|
||||
class CmdPool* _pool = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user