Added memory arena
Fixed frames in flight validation error in vulkan Added some utility macros Added function decorator macros Added some consolidation headers/code include files
This commit is contained in:
@@ -13,10 +13,16 @@
|
||||
#define VK_USE_PLATFORM_WAYLAND_KHR 1
|
||||
#endif
|
||||
|
||||
#if defined(function)
|
||||
#undef function
|
||||
#endif
|
||||
|
||||
#define VK_NO_PROTOTYPES 1
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#define VK_FRAMES_IN_FLIGHT 2
|
||||
#define function static
|
||||
|
||||
#define VK_MAX_FRAMES_IN_FLIGHT 8
|
||||
|
||||
typedef struct Vk_Frame Vk_Frame;
|
||||
struct Vk_Frame {
|
||||
@@ -49,8 +55,10 @@ struct Vk_Context {
|
||||
VkPhysicalDevice gpu;
|
||||
VkDevice device;
|
||||
|
||||
U32 n_frames; // monotonically increasing
|
||||
Vk_Frame frames[VK_FRAMES_IN_FLIGHT];
|
||||
U32 n_frames; // monotonically increasing
|
||||
U32 in_flight; // number of frames in flight, number of swapchain images + 1
|
||||
|
||||
Vk_Frame frames[VK_MAX_FRAMES_IN_FLIGHT];
|
||||
|
||||
struct {
|
||||
U32 family;
|
||||
@@ -73,8 +81,9 @@ struct Vk_Context {
|
||||
|
||||
extern Vk_Context vk;
|
||||
|
||||
static bool Vk_Setup(SDL_Window *window);
|
||||
static Vk_Frame *Vk_FrameBegin(SDL_Window *window);
|
||||
static void Vk_FrameEnd();
|
||||
function bool Vk_Setup(SDL_Window *window);
|
||||
|
||||
function Vk_Frame *Vk_FrameBegin(SDL_Window *window);
|
||||
function void Vk_FrameEnd();
|
||||
|
||||
#endif // LD_VULKAN_CORE_H_
|
||||
|
||||
Reference in New Issue
Block a user