summaryrefslogtreecommitdiff
path: root/drivers/vulkan/vulkan_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vulkan/vulkan_context.h')
-rw-r--r--drivers/vulkan/vulkan_context.h34
1 files changed, 10 insertions, 24 deletions
diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h
index 51c3febb47..9ebea42ecb 100644
--- a/drivers/vulkan/vulkan_context.h
+++ b/drivers/vulkan/vulkan_context.h
@@ -40,7 +40,6 @@
#include <vulkan/vulkan.h>
class VulkanContext {
-
enum {
MAX_EXTENSIONS = 128,
MAX_LAYERS = 64,
@@ -54,6 +53,8 @@ class VulkanContext {
uint32_t queue_family_count;
VkQueueFamilyProperties *queue_props;
VkDevice device;
+ bool device_initialized = false;
+ bool inst_initialized = false;
//present
bool queues_initialized;
@@ -81,30 +82,15 @@ class VulkanContext {
} SwapchainImageResources;
struct Window {
-
- bool is_minimzed;
- VkSurfaceKHR surface;
- VkSwapchainKHR swapchain;
- SwapchainImageResources *swapchain_image_resources;
- VkPresentModeKHR presentMode;
- uint32_t current_buffer;
- int width;
- int height;
+ VkSurfaceKHR surface = VK_NULL_HANDLE;
+ VkSwapchainKHR swapchain = VK_NULL_HANDLE;
+ SwapchainImageResources *swapchain_image_resources = VK_NULL_HANDLE;
+ VkPresentModeKHR presentMode = VK_PRESENT_MODE_FIFO_KHR;
+ uint32_t current_buffer = 0;
+ int width = 0;
+ int height = 0;
VkCommandPool present_cmd_pool; //for separate present queue
-
- VkRenderPass render_pass;
-
- Window() {
- width = 0;
- height = 0;
- render_pass = VK_NULL_HANDLE;
- current_buffer = 0;
- surface = VK_NULL_HANDLE;
- swapchain_image_resources = VK_NULL_HANDLE;
- swapchain = VK_NULL_HANDLE;
- is_minimzed = false;
- presentMode = VK_PRESENT_MODE_FIFO_KHR;
- }
+ VkRenderPass render_pass = VK_NULL_HANDLE;
};
struct LocalDevice {