|
TachyonUI 0.1.0
High-performance UI for building tools.
|
The Vulkan graphics backend, and sharing a host's device and images. More...
Macros | |
| #define | TACHYON_VK_CHECK(x) |
Functions | |
| void | tachyon::vulkan::transition_image (VkCommandBuffer cmd, VkImage image, VkImageLayout currentLayout, VkImageLayout newLayout, VkPipelineStageFlags2 afterStage=VK_PIPELINE_STAGE_2_NONE) |
| Records a layout transition of image into cmd. | |
| void | tachyon::vulkan::copy_image_to_image (VkCommandBuffer cmd, VkImage source, VkImage destination, VkExtent2D srcSize, VkExtent2D dstSize) |
| void | tachyon::vulkan::generate_mipmaps (VkCommandBuffer cmd, VkImage image, VkExtent2D imageSize) |
| VkCommandPoolCreateInfo | tachyon::vulkan::command_pool_create_info (uint32_t queueFamilyIndex, VkCommandPoolCreateFlags flags=0) |
| VkCommandBufferAllocateInfo | tachyon::vulkan::command_buffer_allocate_info (VkCommandPool pool, uint32_t count=1) |
| VkCommandBufferBeginInfo | tachyon::vulkan::command_buffer_begin_info (VkCommandBufferUsageFlags flags=0) |
| VkCommandBufferSubmitInfo | tachyon::vulkan::command_buffer_submit_info (VkCommandBuffer cmd) |
| VkFenceCreateInfo | tachyon::vulkan::fence_create_info (VkFenceCreateFlags flags=0) |
| VkSemaphoreCreateInfo | tachyon::vulkan::semaphore_create_info (VkSemaphoreCreateFlags flags=0) |
| VkSubmitInfo2 | tachyon::vulkan::submit_info (VkCommandBufferSubmitInfo *cmd, VkSemaphoreSubmitInfo *signalSemaphoreInfo, VkSemaphoreSubmitInfo *waitSemaphoreInfo) |
| VkPresentInfoKHR | tachyon::vulkan::present_info () |
| VkRenderingAttachmentInfo | tachyon::vulkan::attachment_info (VkImageView view, VkClearValue *clear, VkImageLayout layout) |
| VkRenderingAttachmentInfo | tachyon::vulkan::depth_attachment_info (VkImageView view, VkImageLayout layout) |
| VkRenderingInfo | tachyon::vulkan::rendering_info (VkExtent2D renderExtent, VkRenderingAttachmentInfo *colorAttachment, VkRenderingAttachmentInfo *depthAttachment) |
| VkImageSubresourceRange | tachyon::vulkan::image_subresource_range (VkImageAspectFlags aspectMask) |
| VkSemaphoreSubmitInfo | tachyon::vulkan::semaphore_submit_info (VkPipelineStageFlags2 stageMask, VkSemaphore semaphore) |
| VkDescriptorSetLayoutBinding | tachyon::vulkan::descriptorset_layout_binding (VkDescriptorType type, VkShaderStageFlags stageFlags, uint32_t binding) |
| VkDescriptorSetLayoutCreateInfo | tachyon::vulkan::descriptorset_layout_create_info (VkDescriptorSetLayoutBinding *bindings, uint32_t bindingCount) |
| VkWriteDescriptorSet | tachyon::vulkan::write_descriptor_image (VkDescriptorType type, VkDescriptorSet dstSet, VkDescriptorImageInfo *imageInfo, uint32_t binding) |
| VkWriteDescriptorSet | tachyon::vulkan::write_descriptor_buffer (VkDescriptorType type, VkDescriptorSet dstSet, VkDescriptorBufferInfo *bufferInfo, uint32_t binding) |
| VkDescriptorBufferInfo | tachyon::vulkan::buffer_info (VkBuffer buffer, VkDeviceSize offset, VkDeviceSize range) |
| VkImageCreateInfo | tachyon::vulkan::image_create_info (VkFormat format, VkImageUsageFlags usageFlags, VkExtent3D extent) |
| VkImageViewCreateInfo | tachyon::vulkan::imageview_create_info (VkFormat format, VkImage image, VkImageAspectFlags aspectFlags) |
| VkPipelineLayoutCreateInfo | tachyon::vulkan::pipeline_layout_create_info () |
| VkPipelineShaderStageCreateInfo | tachyon::vulkan::pipeline_shader_stage_create_info (VkShaderStageFlagBits stage, VkShaderModule shaderModule, const char *entry="main") |
| bool | tachyon::vulkan::load_shader_module (const char *filePath, VkDevice device, const VkAllocationCallbacks *callbacks, VkShaderModule *outShaderModule) |
| void | tachyon::vulkan::OnVulkanError (VkResult result, const char *call) |
| Logs a failed Vulkan call; the frame carries on. | |
| bool | tachyon::vulkan::IsDeviceLost () |
| void | tachyon::vulkan::SetDeviceLost (bool lost) |
| void | tachyon::vulkan::WaitForFence (VkDevice device, VkFence fence) |
| Waits for fence however long the GPU takes: VK_TIMEOUT only means the GPU is slow (a busy or stalled driver, a paused debugger). | |
Variables | |
| constexpr VkFormat | tachyon::vulkan::drawImageFormat = VK_FORMAT_B8G8R8A8_UNORM |
| format of the images the GUI draws into | |
| constexpr VkFormat | tachyon::vulkan::depthImageFormat = VK_FORMAT_D32_SFLOAT |
| constexpr unsigned int | tachyon::vulkan::FRAME_DELETION_SLOT_COUNT = 3 |
| Frame deletion queue slots: FRAME_OVERLAP + 1, so the slot pushed to is never the one flushed in the same frame (static-asserted against FRAME_OVERLAP). | |
| constexpr unsigned int | tachyon::vulkan::FRAME_OVERLAP = 2 |
The Vulkan graphics backend, and sharing a host's device and images.
| #define TACHYON_VK_CHECK | ( | x | ) |
#include <gui_core/graphics/vulkan/vk_types.h>
| void tachyon::vulkan::transition_image | ( | VkCommandBuffer | cmd, |
| VkImage | image, | ||
| VkImageLayout | currentLayout, | ||
| VkImageLayout | newLayout, | ||
| VkPipelineStageFlags2 | afterStage = VK_PIPELINE_STAGE_2_NONE ) |
#include <gui_core/graphics/vulkan/vk_images.h>
Records a layout transition of image into cmd.
afterStage: for an image coming from UNDEFINED, a stage the transition waits for. A swapchain image passes its acquire semaphore's wait stage, so the transition is ordered after the acquire instead of racing the presentation engine.
| void tachyon::vulkan::copy_image_to_image | ( | VkCommandBuffer | cmd, |
| VkImage | source, | ||
| VkImage | destination, | ||
| VkExtent2D | srcSize, | ||
| VkExtent2D | dstSize ) |
#include <gui_core/graphics/vulkan/vk_images.h>
| void tachyon::vulkan::generate_mipmaps | ( | VkCommandBuffer | cmd, |
| VkImage | image, | ||
| VkExtent2D | imageSize ) |
#include <gui_core/graphics/vulkan/vk_images.h>
| VkCommandPoolCreateInfo tachyon::vulkan::command_pool_create_info | ( | uint32_t | queueFamilyIndex, |
| VkCommandPoolCreateFlags | flags = 0 ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkCommandBufferAllocateInfo tachyon::vulkan::command_buffer_allocate_info | ( | VkCommandPool | pool, |
| uint32_t | count = 1 ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkCommandBufferBeginInfo tachyon::vulkan::command_buffer_begin_info | ( | VkCommandBufferUsageFlags | flags = 0 | ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkCommandBufferSubmitInfo tachyon::vulkan::command_buffer_submit_info | ( | VkCommandBuffer | cmd | ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkFenceCreateInfo tachyon::vulkan::fence_create_info | ( | VkFenceCreateFlags | flags = 0 | ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkSemaphoreCreateInfo tachyon::vulkan::semaphore_create_info | ( | VkSemaphoreCreateFlags | flags = 0 | ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkSubmitInfo2 tachyon::vulkan::submit_info | ( | VkCommandBufferSubmitInfo * | cmd, |
| VkSemaphoreSubmitInfo * | signalSemaphoreInfo, | ||
| VkSemaphoreSubmitInfo * | waitSemaphoreInfo ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkPresentInfoKHR tachyon::vulkan::present_info | ( | ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkRenderingAttachmentInfo tachyon::vulkan::attachment_info | ( | VkImageView | view, |
| VkClearValue * | clear, | ||
| VkImageLayout | layout ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkRenderingAttachmentInfo tachyon::vulkan::depth_attachment_info | ( | VkImageView | view, |
| VkImageLayout | layout ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkRenderingInfo tachyon::vulkan::rendering_info | ( | VkExtent2D | renderExtent, |
| VkRenderingAttachmentInfo * | colorAttachment, | ||
| VkRenderingAttachmentInfo * | depthAttachment ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkImageSubresourceRange tachyon::vulkan::image_subresource_range | ( | VkImageAspectFlags | aspectMask | ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkSemaphoreSubmitInfo tachyon::vulkan::semaphore_submit_info | ( | VkPipelineStageFlags2 | stageMask, |
| VkSemaphore | semaphore ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkDescriptorSetLayoutBinding tachyon::vulkan::descriptorset_layout_binding | ( | VkDescriptorType | type, |
| VkShaderStageFlags | stageFlags, | ||
| uint32_t | binding ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkDescriptorSetLayoutCreateInfo tachyon::vulkan::descriptorset_layout_create_info | ( | VkDescriptorSetLayoutBinding * | bindings, |
| uint32_t | bindingCount ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkWriteDescriptorSet tachyon::vulkan::write_descriptor_image | ( | VkDescriptorType | type, |
| VkDescriptorSet | dstSet, | ||
| VkDescriptorImageInfo * | imageInfo, | ||
| uint32_t | binding ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkWriteDescriptorSet tachyon::vulkan::write_descriptor_buffer | ( | VkDescriptorType | type, |
| VkDescriptorSet | dstSet, | ||
| VkDescriptorBufferInfo * | bufferInfo, | ||
| uint32_t | binding ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkDescriptorBufferInfo tachyon::vulkan::buffer_info | ( | VkBuffer | buffer, |
| VkDeviceSize | offset, | ||
| VkDeviceSize | range ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkImageCreateInfo tachyon::vulkan::image_create_info | ( | VkFormat | format, |
| VkImageUsageFlags | usageFlags, | ||
| VkExtent3D | extent ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkImageViewCreateInfo tachyon::vulkan::imageview_create_info | ( | VkFormat | format, |
| VkImage | image, | ||
| VkImageAspectFlags | aspectFlags ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkPipelineLayoutCreateInfo tachyon::vulkan::pipeline_layout_create_info | ( | ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| VkPipelineShaderStageCreateInfo tachyon::vulkan::pipeline_shader_stage_create_info | ( | VkShaderStageFlagBits | stage, |
| VkShaderModule | shaderModule, | ||
| const char * | entry = "main" ) |
#include <gui_core/graphics/vulkan/vk_initializers.h>
| bool tachyon::vulkan::load_shader_module | ( | const char * | filePath, |
| VkDevice | device, | ||
| const VkAllocationCallbacks * | callbacks, | ||
| VkShaderModule * | outShaderModule ) |
#include <gui_core/graphics/vulkan/vk_pipelines.h>
| void tachyon::vulkan::OnVulkanError | ( | VkResult | result, |
| const char * | call ) |
#include <gui_core/graphics/vulkan/vk_types.h>
Logs a failed Vulkan call; the frame carries on.
A lost device is remembered: the GUI recreates it before its next frame (DeviceLost / RecreateDevice).
| bool tachyon::vulkan::IsDeviceLost | ( | ) |
#include <gui_core/graphics/vulkan/vk_types.h>
| void tachyon::vulkan::SetDeviceLost | ( | bool | lost | ) |
#include <gui_core/graphics/vulkan/vk_types.h>
|
inline |
#include <gui_core/graphics/vulkan/vk_types.h>
Waits for fence however long the GPU takes: VK_TIMEOUT only means the GPU is slow (a busy or stalled driver, a paused debugger).
A real error such as device loss is reported and ends the wait.
|
constexpr |
#include <gui_core/graphics/vulkan/vk_defaults.h>
format of the images the GUI draws into
|
constexpr |
#include <gui_core/graphics/vulkan/vk_defaults.h>
|
constexpr |
#include <gui_core/graphics/vulkan/vk_device_context.h>
Frame deletion queue slots: FRAME_OVERLAP + 1, so the slot pushed to is never the one flushed in the same frame (static-asserted against FRAME_OVERLAP).
|
constexpr |
#include <gui_core/graphics/vulkan/vk_window_context.h>