File tree Expand file tree Collapse file tree 5 files changed +19605
-5
lines changed Expand file tree Collapse file tree 5 files changed +19605
-5
lines changed Original file line number Diff line number Diff line change 3
3
# ::: :::::::: #
4
4
# Makefile :+: :+: :+: #
5
5
# +:+ +:+ +:+ #
6
- # By: vvaas <vvaas@student.42.fr> +#+ +:+ +#+ #
6
+ # By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ #
7
7
# +#+#+#+#+#+ +#+ #
8
8
# Created: 2022/10/04 16:43:41 by maldavid #+# #+# #
9
- # Updated: 2023/10/19 23:47:59 by maldavid ### ########.fr #
9
+ # Updated: 2023/10/20 00:03:33 by maldavid ### ########.fr #
10
10
# #
11
11
# **************************************************************************** #
12
12
Original file line number Diff line number Diff line change 6
6
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
7
7
/* +#+#+#+#+#+ +#+ */
8
8
/* Created: 2022/10/08 18:55:57 by maldavid #+# #+# */
9
- /* Updated: 2023/04/23 12:37:32 by maldavid ### ########.fr */
9
+ /* Updated: 2023/10/20 02:02:24 by maldavid ### ########.fr */
10
10
/* */
11
11
/* ************************************************************************** */
12
12
13
13
#include " vk_buffer.h"
14
14
#include < renderer/command/vk_cmd_pool.h>
15
15
#include < renderer/core/render_core.h>
16
+ #include < vma.h>
16
17
#include < cstring>
17
18
18
19
namespace mlx
Original file line number Diff line number Diff line change
1
+ /* ************************************************************************** */
2
+ /* */
3
+ /* ::: :::::::: */
4
+ /* memory.h :+: :+: :+: */
5
+ /* +:+ +:+ +:+ */
6
+ /* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
7
+ /* +#+#+#+#+#+ +#+ */
8
+ /* Created: 2023/10/20 02:13:03 by maldavid #+# #+# */
9
+ /* Updated: 2023/10/20 03:33:28 by maldavid ### ########.fr */
10
+ /* */
11
+ /* ************************************************************************** */
12
+
13
+ #ifndef __MLX_VK_MEMORY__
14
+ #define __MLX_VK_MEMORY__
15
+
16
+ #include < volk.h>
17
+ #include < vma.h>
18
+
19
+ namespace mlx
20
+ {
21
+ enum class gpu_allocation_type
22
+ {
23
+ buffer,
24
+ image,
25
+ };
26
+
27
+ class GPUallocator
28
+ {
29
+ public:
30
+ GPUallocator () = default ;
31
+ void init () noexcept ;
32
+ VkDeviceMemory alloc (gpu_allocation_type type, VkDeviceSize size);
33
+ void destroy () noexcept ;
34
+ ~GPUallocator () = default ;
35
+
36
+ private:
37
+ VmaAllocator _allocator;
38
+ };
39
+ }
40
+
41
+ #endif
Original file line number Diff line number Diff line change 6
6
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
7
7
/* +#+#+#+#+#+ +#+ */
8
8
/* Created: 2022/10/08 19:04:21 by maldavid #+# #+# */
9
- /* Updated: 2023/01/25 15:28:18 by maldavid ### ########.fr */
9
+ /* Updated: 2023/10/20 03:12:07 by maldavid ### ########.fr */
10
10
/* */
11
11
/* ************************************************************************** */
12
12
@@ -24,7 +24,7 @@ namespace mlx
24
24
appInfo.pApplicationName = " MacroLibX" ;
25
25
appInfo.applicationVersion = VK_MAKE_VERSION (1 , 0 , 0 );
26
26
appInfo.pEngineName = " MacroLibX" ;
27
- appInfo.engineVersion = VK_MAKE_VERSION (0 , 0 , 1 );
27
+ appInfo.engineVersion = VK_MAKE_VERSION (1 , 0 , 0 );
28
28
appInfo.apiVersion = VK_API_VERSION_1_2;
29
29
30
30
VkInstanceCreateInfo createInfo{};
You can’t perform that action at this time.
0 commit comments