-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
108 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/04/02 14:49:49 by maldavid #+# #+# */ | ||
/* Updated: 2023/11/25 09:59:39 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:04:59 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -26,10 +26,11 @@ | |
#include <renderer/text_pipeline.h> | ||
#include <utils/non_copyable.h> | ||
#include <renderer/images/texture.h> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class GraphicsSupport : public non_copyable | ||
class MLX_API GraphicsSupport : public non_copyable | ||
{ | ||
public: | ||
GraphicsSupport(std::size_t w, std::size_t h, const std::string& title, int id); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,19 +6,20 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/12/07 16:31:51 by kbz_8 #+# #+# */ | ||
/* Updated: 2023/12/08 12:56:21 by kbz_8 ### ########.fr */ | ||
/* Updated: 2023/12/08 19:05:15 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#ifndef __MLX_MEMORY__ | ||
#define __MLX_MEMORY__ | ||
|
||
#include <utils/singleton.h> | ||
#include <core/profile.h> | ||
#include <list> | ||
|
||
namespace mlx | ||
{ | ||
class MemManager : public Singleton<MemManager> | ||
class MLX_API MemManager : public Singleton<MemManager> | ||
{ | ||
friend class Singleton<MemManager>; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/04 21:53:12 by maldavid #+# #+# */ | ||
/* Updated: 2023/11/25 11:33:32 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:05:31 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,10 +15,11 @@ | |
|
||
#include <SDL2/SDL.h> | ||
#include <string> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class MLX_Window | ||
class MLX_API MLX_Window | ||
{ | ||
public: | ||
MLX_Window(std::size_t w, std::size_t h, const std::string& title); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/06 23:18:52 by maldavid #+# #+# */ | ||
/* Updated: 2023/11/16 13:56:19 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:05:50 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,10 +15,11 @@ | |
|
||
#include <volk.h> | ||
#include <renderer/core/render_core.h> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class Buffer | ||
class MLX_API Buffer | ||
{ | ||
public: | ||
enum class kind { dynamic, uniform, constant }; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/01/25 15:05:05 by maldavid #+# #+# */ | ||
/* Updated: 2023/11/14 03:25:59 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:06:07 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -16,10 +16,11 @@ | |
#include <volk.h> | ||
#include "vk_buffer.h" | ||
#include <renderer/renderer.h> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class C_IBO : public Buffer | ||
class MLX_API C_IBO : public Buffer | ||
{ | ||
public: | ||
inline void create(uint32_t size, const uint16_t* data, const char* name) { Buffer::create(Buffer::kind::constant, size, VK_BUFFER_USAGE_INDEX_BUFFER_BIT, name, data); } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/06 18:45:29 by maldavid #+# #+# */ | ||
/* Updated: 2023/11/14 03:26:10 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:06:28 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -16,10 +16,11 @@ | |
#include "vk_buffer.h" | ||
#include <array> | ||
#include <cstddef> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class UBO | ||
class MLX_API UBO | ||
{ | ||
public: | ||
void create(class Renderer* renderer, uint32_t size, const char* name); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/06 18:27:38 by maldavid #+# #+# */ | ||
/* Updated: 2023/11/14 04:53:36 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:06:45 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,18 +15,19 @@ | |
|
||
#include "vk_buffer.h" | ||
#include <renderer/renderer.h> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class VBO : public Buffer | ||
class MLX_API VBO : public Buffer | ||
{ | ||
public: | ||
inline void create(uint32_t size, const char* name) { Buffer::create(Buffer::kind::dynamic, size, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, name); } | ||
void setData(uint32_t size, const void* data); | ||
inline void bind(Renderer& renderer) noexcept { vkCmdBindVertexBuffers(renderer.getActiveCmdBuffer().get(), 0, 1, &_buffer, &_offset); } | ||
}; | ||
|
||
class C_VBO : public Buffer | ||
class MLX_API C_VBO : public Buffer | ||
{ | ||
public: | ||
inline void create(uint32_t size, const void* data, const char* name) { Buffer::create(Buffer::kind::constant, size, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, name, data); } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/04/02 17:48:52 by maldavid #+# #+# */ | ||
/* Updated: 2023/04/02 17:50:48 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:07:00 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -16,13 +16,14 @@ | |
#include <array> | ||
|
||
#include <volk.h> | ||
#include <core/profile.h> | ||
#include <renderer/core/render_core.h> | ||
#include <renderer/command/vk_cmd_pool.h> | ||
#include <renderer/command/vk_cmd_buffer.h> | ||
|
||
namespace mlx | ||
{ | ||
class CmdManager | ||
class MLX_API CmdManager | ||
{ | ||
public: | ||
CmdManager() = default; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/06 18:25:42 by maldavid #+# #+# */ | ||
/* Updated: 2023/04/21 13:20:49 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:07:11 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,10 +15,11 @@ | |
|
||
#include <volk.h> | ||
#include <renderer/core/vk_fence.h> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class CmdBuffer | ||
class MLX_API CmdBuffer | ||
{ | ||
public: | ||
void init(class CmdManager* manager); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,18 +6,19 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/06 18:24:12 by maldavid #+# #+# */ | ||
/* Updated: 2022/12/18 01:08:31 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:07:22 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#ifndef __MLX_VK_CMD_POOL__ | ||
#define __MLX_VK_CMD_POOL__ | ||
|
||
#include <volk.h> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class CmdPool | ||
class MLX_API CmdPool | ||
{ | ||
public: | ||
void init(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/10/20 02:13:03 by maldavid #+# #+# */ | ||
/* Updated: 2023/11/14 09:46:32 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:07:34 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,10 +15,11 @@ | |
|
||
#include <volk.h> | ||
#include <vma.h> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class GPUallocator | ||
class MLX_API GPUallocator | ||
{ | ||
public: | ||
GPUallocator() = default; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 19:13:42 by maldavid #+# #+# */ | ||
/* Updated: 2023/11/11 01:51:26 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:07:49 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,10 +15,11 @@ | |
|
||
#include <volk.h> | ||
#include "vk_queues.h" | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class Device | ||
class MLX_API Device | ||
{ | ||
public: | ||
void init(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,19 +6,20 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2023/04/02 17:52:09 by maldavid #+# #+# */ | ||
/* Updated: 2023/04/02 17:52:59 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:08:01 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#ifndef __MLX_VK_FENCE__ | ||
#define __MLX_VK_FENCE__ | ||
|
||
#include <volk.h> | ||
#include <core/profile.h> | ||
#include <renderer/core/render_core.h> | ||
|
||
namespace mlx | ||
{ | ||
class Fence | ||
class MLX_API Fence | ||
{ | ||
public: | ||
Fence() = default; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 19:03:04 by maldavid #+# #+# */ | ||
/* Updated: 2022/12/18 17:42:08 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:08:14 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,10 +15,11 @@ | |
|
||
#include <volk.h> | ||
#include <vector> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class Instance | ||
class MLX_API Instance | ||
{ | ||
public: | ||
void init(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 19:01:49 by maldavid #+# #+# */ | ||
/* Updated: 2022/12/18 22:44:37 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:08:25 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -16,10 +16,11 @@ | |
#include <volk.h> | ||
#include <optional> | ||
#include <cstdint> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class Queues | ||
class MLX_API Queues | ||
{ | ||
public: | ||
struct QueueFamilyIndices | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 18:59:38 by maldavid #+# #+# */ | ||
/* Updated: 2023/04/02 17:55:10 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:08:36 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,10 +15,11 @@ | |
|
||
#include <volk.h> | ||
#include <vector> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class Semaphore | ||
class MLX_API Semaphore | ||
{ | ||
public: | ||
void init(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: maldavid <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/10/08 18:57:55 by maldavid #+# #+# */ | ||
/* Updated: 2022/12/18 19:34:04 by maldavid ### ########.fr */ | ||
/* Updated: 2023/12/08 19:08:49 by kbz_8 ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,10 +15,11 @@ | |
|
||
#include <volk.h> | ||
#include <vector> | ||
#include <core/profile.h> | ||
|
||
namespace mlx | ||
{ | ||
class Surface | ||
class MLX_API Surface | ||
{ | ||
public: | ||
void create(class Renderer& renderer); | ||
|
Oops, something went wrong.