Pyrogenesis  trunk
Namespaces | Classes | Functions | Variables
Renderer::Backend::Vulkan Namespace Reference

Namespaces

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

Classes

class  CBuffer
 
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  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...
 

Functions

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
 

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)

◆ ReportAvailablePhysicalDevice()

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

Report all desired information about the available physical device.

Variable Documentation

◆ NUMBER_OF_FRAMES_IN_FLIGHT

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