PeriDyno 1.0.0
Loading...
Searching...
No Matches
VulkanTools.h File Reference
#include "vulkan/vulkan.h"
#include "VulkanInitializers.hpp"
#include <math.h>
#include <stdlib.h>
#include <string>
#include <cstring>
#include <fstream>
#include <assert.h>
#include <stdio.h>
#include <vector>
#include <map>
#include <iostream>
#include <stdexcept>
Include dependency graph for VulkanTools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  vks
 
namespace  vks::tools
 

Macros

#define VK_FLAGS_NONE   0
 
#define DEFAULT_FENCE_TIMEOUT   100000000000
 
#define VK_CHECK_RESULT(f)
 

Functions

template<typename T>
std::string getDynamicSpvFile (const std::string &fileName)
 
std::string vks::tools::errorString (VkResult errorCode)
 Returns an error code as a string.
 
std::string vks::tools::physicalDeviceTypeString (VkPhysicalDeviceType type)
 Returns the device type as a string.
 
VkBool32 vks::tools::getSupportedDepthFormat (VkPhysicalDevice physicalDevice, VkFormat *depthFormat)
 
VkBool32 vks::tools::formatIsFilterable (VkPhysicalDevice physicalDevice, VkFormat format, VkImageTiling tiling)
 
void vks::tools::setImageLayout (VkCommandBuffer cmdbuffer, VkImage image, VkImageLayout oldImageLayout, VkImageLayout newImageLayout, VkImageSubresourceRange subresourceRange, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask)
 
void vks::tools::setImageLayout (VkCommandBuffer cmdbuffer, VkImage image, VkImageAspectFlags aspectMask, VkImageLayout oldImageLayout, VkImageLayout newImageLayout, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask)
 
void vks::tools::insertImageMemoryBarrier (VkCommandBuffer cmdbuffer, VkImage image, VkAccessFlags srcAccessMask, VkAccessFlags dstAccessMask, VkImageLayout oldImageLayout, VkImageLayout newImageLayout, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkImageSubresourceRange subresourceRange)
 Insert an image memory barrier into the command buffer.
 
void vks::tools::exitFatal (const std::string &message, int32_t exitCode)
 
void vks::tools::exitFatal (const std::string &message, VkResult resultCode)
 
VkShaderModule vks::tools::loadShaderModule (const std::string fileName, VkDevice device)
 
VkShaderModule vks::tools::loadShaderModule (const std::string &fileName, const std::map< std::string, std::string > &macros, const std::string &MD5Encode, VkDevice device)
 
VkShaderModule vks::tools::loadShader (const char *fileName, VkDevice device)
 
VkShaderModule vks::tools::loadShader (const std::string &fileName, const std::map< std::string, std::string > &macros, const std::string &MD5Encode, VkDevice device)
 
bool vks::tools::fileExists (const std::string &filename)
 Checks if a file exists.
 
uint32_t vks::tools::alignedSize (uint32_t value, uint32_t alignment)
 

Macro Definition Documentation

◆ DEFAULT_FENCE_TIMEOUT

#define DEFAULT_FENCE_TIMEOUT   100000000000

Definition at line 41 of file VulkanTools.h.

◆ VK_CHECK_RESULT

#define VK_CHECK_RESULT ( f)
Value:
{ \
VkResult res = (f); \
if (res != VK_SUCCESS) \
{ \
std::cout << "Fatal : VkResult is \"" << vks::tools::errorString(res) << "\" in " << __FILE__ << " at line " << __LINE__ << "\n"; \
assert(res == VK_SUCCESS); \
} \
}
std::string errorString(VkResult errorCode)
Returns an error code as a string.

Definition at line 55 of file VulkanTools.h.

◆ VK_FLAGS_NONE

#define VK_FLAGS_NONE   0

Definition at line 39 of file VulkanTools.h.

Function Documentation

◆ getDynamicSpvFile()

template<typename T>
std::string getDynamicSpvFile ( const std::string & fileName)

Definition at line 67 of file VulkanTools.h.

Here is the caller graph for this function: