Kohi Game Engine
vulkan_device.h File Reference

This file contains a unified Vulkan device, which holds state and pointers to both the Vulkan physical and logical devices, as well as other information such as the swapchain. More...

#include "vulkan_types.h"

Go to the source code of this file.

Functions

b8 vulkan_device_create (vulkan_context *context)
 Creates a new Vulkan device and assigns it to the given context. More...
 
void vulkan_device_destroy (vulkan_context *context)
 Destroys the device present in the given context. More...
 
void vulkan_device_query_swapchain_support (VkPhysicalDevice physical_device, VkSurfaceKHR surface, vulkan_swapchain_support_info *out_support_info)
 Queries for swapchain support data for the given physical device and surface. More...
 
b8 vulkan_device_detect_depth_format (vulkan_device *device)
 Detects and assigns the depth format for the given device. More...
 

Detailed Description

This file contains a unified Vulkan device, which holds state and pointers to both the Vulkan physical and logical devices, as well as other information such as the swapchain.

Author
Travis Vroman (travi.nosp@m.s@ko.nosp@m.hieng.nosp@m.ine..nosp@m.com)
Version
1.0
Date
2022-01-11

Function Documentation

◆ vulkan_device_create()

b8 vulkan_device_create ( vulkan_context context)

Creates a new Vulkan device and assigns it to the given context.

Parameters
contextA pointer to the Vulkan context.
Returns
True on success; otherwise false.

◆ vulkan_device_destroy()

void vulkan_device_destroy ( vulkan_context context)

Destroys the device present in the given context.

Parameters
contextA pointer to the Vulkan context.

◆ vulkan_device_detect_depth_format()

b8 vulkan_device_detect_depth_format ( vulkan_device device)

Detects and assigns the depth format for the given device.

Parameters
deviceA pointer to the device.
Returns
True if successful; otherwise false.

◆ vulkan_device_query_swapchain_support()

void vulkan_device_query_swapchain_support ( VkPhysicalDevice  physical_device,
VkSurfaceKHR  surface,
vulkan_swapchain_support_info out_support_info 
)

Queries for swapchain support data for the given physical device and surface.

Parameters
physical_deviceThe Vulkan physical device.
surfaceThe Vulkan surface.
out_support_infoA pointer to hold the support info.