From 411520b240446f878a27c5d89812000774cc3c15 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Sun, 28 Apr 2024 09:14:22 +1000 Subject: getting vulkan working on windows --- src/renderer/backends/backend_vulkan.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/renderer/backends/backend_vulkan.h (limited to 'src/renderer/backends/backend_vulkan.h') diff --git a/src/renderer/backends/backend_vulkan.h b/src/renderer/backends/backend_vulkan.h new file mode 100644 index 0000000..05f043e --- /dev/null +++ b/src/renderer/backends/backend_vulkan.h @@ -0,0 +1,27 @@ +#pragma once +#include "defines.h" + +#define GPU_SWAPCHAIN_IMG_COUNT 2 + +typedef struct gpu_swapchain { +} gpu_swapchain; +typedef struct gpu_device { + // In Vulkan we store both physical and logical device here + VkPhysicalDevice physical_device; + VkDevice logical_device; + VkPhysicalDeviceProperties properties; + VkPhysicalDeviceFeatures features; + VkPhysicalDeviceMemoryProperties memory; + VkCommandPool pool; +} gpu_device; +typedef struct gpu_pipeline { +} gpu_pipeline; + +typedef struct gpu_renderpass { + VkRenderPass vk_handle; + VkFramebuffer framebuffers[GPU_SWAPCHAIN_IMG_COUNT]; +} gpu_renderpass; + +typedef struct gpu_cmd_encoder { + VkCommandBuffer cmd_buffer; +} gpu_cmd_encoder; \ No newline at end of file -- cgit v1.2.3-70-g09d2