Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Renderer::Backend::Vulkan Namespace Reference

Namespaces

namespace  anonymous_namespace{Device.cpp}
 
namespace  anonymous_namespace{DeviceCommandContext.cpp}
 
namespace  anonymous_namespace{DeviceSelection.cpp}
 
namespace  anonymous_namespace{PipelineState.cpp}
 
namespace  anonymous_namespace{RingCommandContext.cpp}
 
namespace  anonymous_namespace{ShaderProgram.cpp}
 
namespace  Mapping
 
namespace  Utilities
 

Classes

class  CBuffer
 
class  CComputePipelineState
 
class  CDescriptorManager
 
class  CDevice
 
class  CDeviceCommandContext
 
class  CFramebuffer
 
class  CGraphicsPipelineState
 
class  CRenderPassManager
 A helper class to store unique render passes. More...
 
class  CRingCommandContext
 A simple helper class to decouple command buffers rotation from frames presenting. More...
 
class  CSamplerManager
 A helper class to store unique samplers. More...
 
class  CShaderProgram
 
class  CSingleTypeDescriptorSetBinding
 
class  CSubmitScheduler
 A helper class to batch VkQueueSubmit calls and track VkCommandBuffer usages properly. More...
 
class  CSwapChain
 
class  CTexture
 
class  CVertexInputLayout
 
struct  SAvailablePhysicalDevice
 Structure to store all information that might be useful on device selection. More...
 

Typedefs

using DeviceObjectUID = uint32_t
 Unique identifier for a device object. More...
 

Functions

VkBufferUsageFlags ToVkBufferUsageFlags (const uint32_t usage)
 
std::tuple< VkBufferUsageFlags, VkMemoryPropertyFlags, VmaMemoryUsage > MakeCreationFlags (const IBuffer::Type type, const uint32_t usage)
 
std::unique_ptr< IDeviceCreateDevice (SDL_Window *window)
 
std::vector< SAvailablePhysicalDeviceGetAvailablePhysicalDevices (VkInstance instance, VkSurfaceKHR surface, const std::vector< const char * > &requiredDeviceExtensions)
 
bool IsPhysicalDeviceUnsupported (const SAvailablePhysicalDevice &device)
 
bool ComparePhysicalDevices (const SAvailablePhysicalDevice &device1, const SAvailablePhysicalDevice &device2)
 
bool IsSurfaceFormatSupported (const VkSurfaceFormatKHR &surfaceFormat)
 
void ReportAvailablePhysicalDevice (const SAvailablePhysicalDevice &device, const ScriptRequest &rq, JS::HandleValue settings)
 Report all desired information about the available physical device. More...
 

Variables

static constexpr size_t NUMBER_OF_FRAMES_IN_FLIGHT = 3
 
static constexpr DeviceObjectUID INVALID_DEVICE_OBJECT_UID = 0
 

Typedef Documentation

◆ DeviceObjectUID

Unique identifier for a device object.

It must be unique along all objects during a whole application run. We assume that 32bits should be enough, else we'd have a too big object flow. TODO: maybe it makes sense to add it for all backends. Also it might make sense to add categories/types. Several high bits might be for describing an object type, low bits for indexing.

Function Documentation

◆ ComparePhysicalDevices()

bool Renderer::Backend::Vulkan::ComparePhysicalDevices ( const SAvailablePhysicalDevice device1,
const SAvailablePhysicalDevice device2 
)
Returns
true if the first device is better for our needs than the second one. Useful in functions like std::sort. The first and the second devices should be supported (in other words IsPhysicalDeviceSupported should return true for both of them).

◆ CreateDevice()

std::unique_ptr< IDevice > Renderer::Backend::Vulkan::CreateDevice ( SDL_Window window)

◆ GetAvailablePhysicalDevices()

std::vector< SAvailablePhysicalDevice > Renderer::Backend::Vulkan::GetAvailablePhysicalDevices ( VkInstance  instance,
VkSurfaceKHR  surface,
const std::vector< const char * > &  requiredDeviceExtensions 
)
Returns
all available physical devices for the Vulkan instance with additional flags of surface and required extensions support. We could have a single function that returns a selected device. But we use multiple functions to be able to save some information about available devices before filtering and give a choice to a user.

◆ IsPhysicalDeviceUnsupported()

bool Renderer::Backend::Vulkan::IsPhysicalDeviceUnsupported ( const SAvailablePhysicalDevice device)
Returns
true if we can't use the device for our needs. For example, it doesn't graphics or present queues. Because we can't render the game without them.

◆ IsSurfaceFormatSupported()

bool Renderer::Backend::Vulkan::IsSurfaceFormatSupported ( const VkSurfaceFormatKHR &  surfaceFormat)

◆ MakeCreationFlags()

std::tuple< VkBufferUsageFlags, VkMemoryPropertyFlags, VmaMemoryUsage > Renderer::Backend::Vulkan::MakeCreationFlags ( const IBuffer::Type  type,
const uint32_t  usage 
)

◆ ReportAvailablePhysicalDevice()

void Renderer::Backend::Vulkan::ReportAvailablePhysicalDevice ( const SAvailablePhysicalDevice device,
const ScriptRequest rq,
JS::HandleValue  settings 
)

Report all desired information about the available physical device.

◆ ToVkBufferUsageFlags()

VkBufferUsageFlags Renderer::Backend::Vulkan::ToVkBufferUsageFlags ( const uint32_t  usage)

Variable Documentation

◆ INVALID_DEVICE_OBJECT_UID

constexpr DeviceObjectUID Renderer::Backend::Vulkan::INVALID_DEVICE_OBJECT_UID = 0
staticconstexpr

◆ NUMBER_OF_FRAMES_IN_FLIGHT

constexpr size_t Renderer::Backend::Vulkan::NUMBER_OF_FRAMES_IN_FLIGHT = 3
staticconstexpr