Kohi Game Engine
vulkan_utils.h File Reference

A collection of Vulkan-specific utility functions. More...

#include "vulkan_types.h"

Go to the source code of this file.

Macros

#define VK_SET_DEBUG_OBJECT_NAME(context, object_type, object_handle, object_name)
 
#define VK_SET_DEBUG_OBJECT_TAG(context, object_type, object_handle, tag_size, tag_data)
 
#define VK_BEGIN_DEBUG_LABEL(context, command_buffer, label_name, colour)
 
#define VK_END_DEBUG_LABEL(context, command_buffer)
 

Functions

const char * vulkan_result_string (VkResult result, b8 get_extended)
 Returns the string representation of result. More...
 
b8 vulkan_result_is_success (VkResult result)
 Inticates if the passed result is a success or an error as defined by the Vulkan spec. More...
 

Detailed Description

A collection of Vulkan-specific utility functions.

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

Macro Definition Documentation

◆ VK_BEGIN_DEBUG_LABEL

#define VK_BEGIN_DEBUG_LABEL (   context,
  command_buffer,
  label_name,
  colour 
)

◆ VK_END_DEBUG_LABEL

#define VK_END_DEBUG_LABEL (   context,
  command_buffer 
)

◆ VK_SET_DEBUG_OBJECT_NAME

#define VK_SET_DEBUG_OBJECT_NAME (   context,
  object_type,
  object_handle,
  object_name 
)

◆ VK_SET_DEBUG_OBJECT_TAG

#define VK_SET_DEBUG_OBJECT_TAG (   context,
  object_type,
  object_handle,
  tag_size,
  tag_data 
)

Function Documentation

◆ vulkan_result_is_success()

b8 vulkan_result_is_success ( VkResult  result)

Inticates if the passed result is a success or an error as defined by the Vulkan spec.

Returns
True if success; otherwise false. Defaults to true for unknown result types.

◆ vulkan_result_string()

const char* vulkan_result_string ( VkResult  result,
b8  get_extended 
)

Returns the string representation of result.

Parameters
resultThe result to get the string for.
get_extendedIndicates whether to also return an extended result.
Returns
The error code and/or extended error message in string form. Defaults to success for unknown result types.