Implement vulkan backend
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,8 @@ struct PrRhiDevice {
|
||||
void *handle; // VkDevice
|
||||
void *queue; // VkQueue
|
||||
u32 queue_family_index;
|
||||
u32 present_mode; // VkPresentModeKHR
|
||||
void *physical_device; // VkPhysicalDevice
|
||||
void *allocator; // VmaAllocator
|
||||
};
|
||||
|
||||
@@ -37,12 +39,14 @@ struct PrRhiSurface {
|
||||
struct PrRhiSwapchain {
|
||||
PrRhiDevice *device;
|
||||
void *handle; // VkSwapchainKHR
|
||||
void *surface; // PrRhiSurface *
|
||||
u32 image_count;
|
||||
PrRhiTexture **images;
|
||||
PrRhiTexture *depth;
|
||||
u32 format; // VkFormat
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 current_image_index;
|
||||
};
|
||||
|
||||
struct PrRhiBuffer {
|
||||
@@ -57,6 +61,9 @@ struct PrRhiTexture {
|
||||
void *image; // VkImage
|
||||
void *view; // VkImageView
|
||||
void *allocation; // VmaAllocation
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 format; // VkFormat
|
||||
};
|
||||
|
||||
struct PrRhiSampler {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#define prRhiGetPhysicalDeviceDriverInfo prRhiGetPhysicalDeviceDriverInfoVk
|
||||
#define prRhiCreateSurface prRhiCreateSurfaceVk
|
||||
#define prRhiDestroySurface prRhiDestroySurfaceVk
|
||||
#define prRhiGetSurfaceCapabilities prRhiGetSurfaceCapabilitiesVk
|
||||
#define prRhiCreateDevice prRhiCreateDeviceVk
|
||||
#define prRhiDestroyDevice prRhiDestroyDeviceVk
|
||||
#define prRhiDeviceWaitIdle prRhiDeviceWaitIdleVk
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#define VMA_IMPLEMENTATION
|
||||
#include <vk_mem_alloc.h>
|
||||
Reference in New Issue
Block a user