improved docs
This commit is contained in:
parent
c8f1c90f9c
commit
dfe9b1abe9
16 changed files with 314 additions and 39 deletions
|
|
@ -46,7 +46,27 @@ export namespace Crafter {
|
|||
* @brief Creates the vulkan device, this must be called before any use of vulkan.
|
||||
*/
|
||||
static void CreateDevice();
|
||||
/**
|
||||
* @brief Checks if result is VK_SUCCESS.
|
||||
* @param result The VkResult to check.
|
||||
* @throws std::runtime_error If result != VK_SUCCESS.
|
||||
*/
|
||||
static void CHECK_VK_RESULT(VkResult result);
|
||||
/**
|
||||
* @brief Finds a suitable memory type index for the device based on required properties.
|
||||
*
|
||||
* This function searches through the memory types supported by the physical device to find
|
||||
* a memory type index that matches the specified bitmask and has the requested property flags.
|
||||
*
|
||||
* @param typeBits A bitmask representing the memory types that are suitable. Each bit corresponds
|
||||
* to a memory type index; if the bit is set, that memory type is considered.
|
||||
* @param properties A bitmask of VkMemoryPropertyFlags specifying the desired memory properties,
|
||||
* such as device local, host visible, etc.
|
||||
*
|
||||
* @return The index of a suitable memory type that fulfills the requirements.
|
||||
*
|
||||
* @throws std::runtime_error If no suitable memory type is found matching the criteria.
|
||||
*/
|
||||
static std::uint32_t GetMemoryType(std::uint32_t typeBits, VkMemoryPropertyFlags properties);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue