ladybird/Libraries/LibGfx/VulkanContext.h
Erik Kurzinger 06c916d91c LibGfx: Allocate command buffer for VulkanContext
A later change will add the ability to allocate images. We need a
command buffer in order to initialize the layout of those images.
2025-08-19 00:30:22 +02:00

30 lines
686 B
C++

/*
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#ifdef USE_VULKAN
# include <vulkan/vulkan.h>
namespace Gfx {
struct VulkanContext {
uint32_t api_version { VK_API_VERSION_1_0 };
VkInstance instance { VK_NULL_HANDLE };
VkPhysicalDevice physical_device { VK_NULL_HANDLE };
VkDevice logical_device { VK_NULL_HANDLE };
VkQueue graphics_queue { VK_NULL_HANDLE };
uint32_t graphics_queue_family { 0 };
VkCommandPool command_pool { VK_NULL_HANDLE };
VkCommandBuffer command_buffer { VK_NULL_HANDLE };
};
ErrorOr<VulkanContext> create_vulkan_context();
}
#endif