5#include "vulkan/vulkan.h"
11VK_DEFINE_HANDLE(VmaAllocator)
12VK_DEFINE_HANDLE(VmaPool)
22 VkResult
createLogicalDevice(VkPhysicalDeviceFeatures
enabledFeatures, std::vector<const char *> enabledExtensions,
void *pNextChain,
bool useSwapChain =
true, VkQueueFlags requestedQueueTypes = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT);
38 uint32_t
getMemoryType(uint32_t typeBits, VkMemoryPropertyFlags
properties, VkBool32 *memTypeFound =
nullptr)
const;
40 VkResult
createBuffer(VkBufferUsageFlags usageFlags, VkMemoryPropertyFlags memoryPropertyFlags, VkDeviceSize size, VkBuffer *buffer, VkDeviceMemory *memory,
void *data =
nullptr);
41 VkResult
createBuffer(VkBufferUsageFlags usageFlags, VkMemoryPropertyFlags memoryPropertyFlags, std::shared_ptr<vks::Buffer> &buffer, VkDeviceSize size,
const void *data =
nullptr);
42 VkResult
createBuffer(uint32_t poolType, std::shared_ptr<vks::Buffer> &buffer,
const void *data =
nullptr);
45 VkCommandPool
createCommandPool(uint32_t queueFamilyIndex, VkCommandPoolCreateFlags createFlags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT);
46 VkCommandBuffer
createCommandBuffer(VkCommandBufferLevel level, VkCommandPool pool,
bool begin =
false);
48 void flushCommandBuffer(VkCommandBuffer commandBuffer, VkQueue queue, VkCommandPool pool,
bool free =
true);
49 void flushCommandBuffer(VkCommandBuffer commandBuffer, VkQueue queue,
bool free =
true);
89 operator VkDevice()
const
VkResult createBuffer(VkBufferUsageFlags usageFlags, VkMemoryPropertyFlags memoryPropertyFlags, VkDeviceSize size, VkBuffer *buffer, VkDeviceMemory *memory, void *data=nullptr)
VkCommandPool commandPool
Default command pool for the graphics queue family index.
bool extensionSupported(std::string extension)
std::vector< std::string > supportedExtensions
List of extensions supported by the device.
VkPipelineCache pipelineCacheHandle()
uint32_t getQueueFamilyIndex(VkQueueFlagBits queueFlags) const
void flushCommandBuffer(VkCommandBuffer commandBuffer, VkQueue queue, VkCommandPool pool, bool free=true)
VkCommandBuffer createCommandBuffer(VkCommandBufferLevel level, VkCommandPool pool, bool begin=false)
VkPhysicalDeviceFeatures features
Features of the physical device that an application can use to check if a feature is supported.
VkContext(VkPhysicalDevice physicalDevice)
VkPhysicalDevice physicalDeviceHandle()
struct dyno::VkContext::@247250360024255345354242335264053265034214002126 queueFamilyIndices
VkResult createLogicalDevice(VkPhysicalDeviceFeatures enabledFeatures, std::vector< const char * > enabledExtensions, void *pNextChain, bool useSwapChain=true, VkQueueFlags requestedQueueTypes=VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_COMPUTE_BIT)
bool enableDebugMarkers
Set to true when the debug marker extension is detected.
VkCommandPool createCommandPool(uint32_t queueFamilyIndex, VkCommandPoolCreateFlags createFlags=VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT)
uint32_t getMemoryType(uint32_t typeBits, VkMemoryPropertyFlags properties, VkBool32 *memTypeFound=nullptr) const
VkQueue transferQueueHandle()
void copyBuffer(vks::Buffer *src, vks::Buffer *dst, VkQueue queue, VkBufferCopy *copyRegion=nullptr)
VkPhysicalDevice physicalDevice
Physical device representation.
VkResult createMemoryPool(VkInstance instance, uint32_t apiVerion)
VkPipelineCache pipelineCache
Contains queue family indices.
VkPhysicalDeviceMemoryProperties memoryProperties
Memory types and heaps of the physical device.
bool isComputeQueueSpecial()
VkPhysicalDeviceProperties properties
Properties of the physical device including limits that the application can check against.
VkPhysicalDeviceFeatures enabledFeatures
Features that have been enabled for use on the physical device.
VkQueue graphicsQueueHandle()
void createPipelineCache()
std::vector< VkQueueFamilyProperties > queueFamilyProperties
Queue family properties of the physical device.
std::map< VkFlags, MemoryPoolInfo > poolMap
VkFormat getSupportedDepthFormat(bool checkSamplingSupport)
VkQueue computeQueueHandle()
VkDevice logicalDevice
Logical device representation (application's view of the device)
Encapsulates access to a Vulkan buffer backed up by device memory.
This is an implementation of AdditiveCCD based on peridyno.