Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::Renderer Class Reference

The renderer is the main class for rendering. It owns all data which is used any time in any frame. For per frame data take a look at. More...

#include <Renderer.h>

Collaboration diagram for EngineCore::Renderer:

Classes

struct  MeshConstants
 A texture index push constant. More...
struct  TaskConstants
 Used to tell the pipeline which objects are shaded with which shader. More...

Public Member Functions

 Renderer (ApplicationContext *context=nullptr, Headset *headset=nullptr, const Engine *engine=nullptr)
 Constructor.
 ~Renderer ()
 cleans up the object
void allocateDescriptors ()
 allocates the first batch of mesh data to the shaders
void initializeGpuBuffers () const
void prepareTransferSubmission (uint32_t frameIndex) const
void updateViewMatrix ()
 Requests an update of the current render processes view matrix. The matrix is pulled from the headset.
void recordRenderPass (size_t swapChainImageIndex)
void createPrimitiveCullingResources ()
void createBinningAllocatorResources ()
void createMeshletUnpackingResources ()
void createMeshletCullingResources ()
void createPrepareDrawResources ()
void createHiZGenerationResources ()
void createVertexShaderPathResources ()
void createMeshletUnpackingDispatcherResources ()
 Creates the complete pipeline for the meshlet unpacker. This should only be called after the buffer has been created which it will be dispatching to. So in this case EngineCore::Renderer::createMeshletUnpackingResources()
void createMeshletCullingDispatcherResources ()
 Creates the compute pipeline for the meshlet culling stage. This should only be called after the meshlet culling shader has been created.
void updateCpuRenderResources (float time)
 Updates all data for gpu frame buffers.
void restartRenderCommandBuffers () const
 Resets the command buffers of the active frame and begins a new write.
void recordXrSwapchainImageWritableBarrier (uint32_t swapChainImageIndex) const
void recordXrSwapchainImageFinishedWritingBarrier (uint32_t swapChainImageIndex) const
void recordHiZGeneration ()
 Records the Hi-Z pyramid generation compute pass Should be called after the render pass completes.
void recordPass2Culling (size_t swapChainImageIndex)
 Records Pass 2 of two-pass occlusion culling Re-tests objects that failed Pass 1 Hi-Z against the newly generated Hi-Z, then re-runs the pipeline and renders any additional survivors.
void recordPass2RenderPass (size_t swapChainImageIndex)
 Records the Pass 2 render pass using dynamic rendering Uses VK_ATTACHMENT_LOAD_OP_LOAD to preserve Pass 1 results.
const std::unique_ptr< RenderingDataManager > & getRenderingDataManager () const
 Getter for the rendering data manager.
const VulkanBuffergetObjectCullingDataBuffer () const
const VulkanBuffergetObjectMeshletDataBuffer () const
const VulkanBuffergetObjectIDsBuffer () const
const VulkanBuffergetCounterBuffer () const
const VulkanBuffergetDispatchBuffer () const
const VulkanBuffergetMeshUnpackingDataBuffer () const
const VulkanBuffergetPlaceholderBuffer () const
const VulkanBuffergetPlaceholderUniformBuffer () const
bool ensureOutputBufferSizes (uint32_t primitiveCount)
 Ensures output buffers are sized to handle the given primitive count. Called by RenderingDataManager when structural data changes.
VkDependencyInfo getObjectCullingToMeshletUnpackingDispatchBarriers (Vulkan::BarrierBundle &bundle) const
VkDependencyInfo getMeshletUnpackingDispatchToMeshletUnpackingBarriers (Vulkan::BarrierBundle &bundle) const
VkDependencyInfo getMeshletUnpackingToMeshletCullingDispatchBarriers (Vulkan::BarrierBundle &bundle)
VkDependencyInfo getMeshletCullingDispatchToMeshletCullingBarriers ()
VkDependencyInfo getMeshletCullingToPrepareDrawBarriers ()
void resetMeshletUnpackingDispatchBuffers ()
void resetMeshletCullingDispatchBuffers ()
void renderToXr (size_t swapChainImageIndex, float time)
void recordTransfer (float time)
void submitInitialTransfers ()
void uploadFrameData (float time)
void submitTransfer ()
void submitGraphics (uint32_t swapChainImageIndex, VkSemaphore mirrorAcquireSemaphore=VK_NULL_HANDLE)
uint64_t getTimelineSemaphoreValue () const
VkCommandBuffer getCurrentTransferCommandBuffer () const
 Gets the current frame in flight and retrieves the transfer command buffer.
VkCommandBuffer getCurrentRenderingCommandBuffer () const
VkSemaphore getCurrentMirrorViewSemaphore () const
VkSemaphore getCurrentPresentableSemaphore (uint32_t swapchainImageIndex) const
std::vector< VkCommandBuffer > getGraphicsCommandBuffers () const
 Gets all graphics command buffers from all owned EngineCore::RenderProcess.
const std::vector< RenderProcess * > & getRenderProcesses () const
 Gets all render processes for cleanup/synchronization.
VkCommandPool getGraphicsCommandPool () const
 gets the graphics command pool
VkCommandPool getTransferCommandPool () const
 gets the command pool used for recording data transfer at the beginning of a frame
void cleanup ()
 Cleans up all resources of the renderer.
RenderProcessgetCurrentRenderProcess () const
 Gets the render process of the current frame.
void advanceFrameIndices ()
 advances the frame indices for the next frame in flight
void syncTimelineAfterPause ()
 Synchronizes the frame counter with the timeline semaphore after pausing.
bool shouldSkipMirrorView ()
 Checks if mirror view should be skipped this frame.
void markFrameStart ()
 Marks the start of a new frame for stall detection. Call this at the beginning of each render frame.
int64_t getFrameElapsedMs () const
 Gets the elapsed time since markFrameStart() was called. Used to check if the current frame has taken too long.
bool isInStallRecovery () const
 Checks if we're currently in stall recovery mode. During stall recovery, extra GPU synchronization should be performed.
VkSemaphore getTimelineSemaphore () const
 Getter for the main timeline renderer semaphore.
const std::vector< GraphicsPipeline * > & getGraphicsPipelines () const
 Gets the list of all graphics pipelines.
HeadsetgetHeadset () const
 Gets the headset pointer.
void setFreezeCulling (bool freeze)
 Freezes culling data (frustum planes, Hi-Z view-projection)
bool isFreezeCulling () const
 Checks if culling data is currently frozen.
const TimelineSynchronizergetTimelineSynchronizer () const
 Gets the timeline synchronizer for managing frame synchronization.
bool getPipelineIndex (GraphicsPipeline *pipeline, uint32_t &pipelineIndex) const
 Gets the index of a pipeline.
bool getPipelineIndex (PipelineNames pipelineName, uint32_t &pipelineIndex) const
 Gets the pipeline index for a given PipelineNames enum.
ComputePassgetObjectCullingComputePass ()
ComputePassgetBinningAllocatorComputePass ()
DispatcherComputePassgetMeshletUnpackingDispatchComputePass ()
ComputePassgetMeshletUnpackingComputePass ()
DispatcherComputePassgetMeshletCullingDispatchComputePass ()
ComputePassgetMeshletCullingComputePass ()
ComputePassgetDrawPreparationComputePass ()
ComputePassgetVSBinningAllocatorComputePass ()
ComputePassgetVSInstanceUnpackingComputePass ()
ComputePassgetVSPrepareDrawComputePass ()

Static Public Member Functions

static PipelineConfig getPipelineConfig (PipelineNames pipelineName)
 Gets the static configuration for a given pipeline type Returns shader paths and pipeline data for the given PipelineNames enum.

Private Member Functions

void createDispatchBuffer ()
void createPlaceholderBuffer ()
 Creates a buffer which can be used anywhere and holds one single 32 bit integer.
void createPlaceholderUniformBuffer ()
void createCounterBuffer ()
void createObjectIDsBuffer ()
void createObjectCullingDataBuffer ()
void createObjectMeshletDataBuffer ()
void createMeshUnpackingDataBuffer ()
void getCurrentTracyVkContext () const
void initializeFrameIndices ()
void initializeXrSwapchainFormats ()
int findExistingPipeline (const std::string &meshShader, const std::string &fragShader, const PipelineMaterialPayload &pipelineData) const
 Searches for the first existing pipeline which has the same vertex and fragment shader.
void createHiZSPDResources ()
void createHiZSPDDescriptorSets ()
void updateHiZSPDDescriptorSets (uint32_t frameIndex)
void recordHiZGenerationSPD ()
void createVertexShaderPipelineResources ()
void recordVertexShaderDraws (size_t swapChainImageIndex) const
void recordVertexShaderDrawsDepthOnly (size_t swapChainImageIndex) const
void createVSInstancedDrawingResources ()
void recordVSInstancedDrawingPipeline ()
void createHiZMipDescriptorSets ()
void updateHiZMipDescriptorSets (uint32_t frameIndex)

Private Attributes

std::unique_ptr< RenderingDataManagerrenderingDataManager
std::optional< VulkanBufferobjectCullingDataBuffer
std::optional< VulkanBufferobjectMeshletDataBuffer
std::optional< VulkanBufferobjectIDsBuffer
std::optional< VulkanBuffermeshUnpackingDataBuffer
std::optional< VulkanBuffercounterBuffer
std::optional< VulkanBufferdispatchBuffer
std::optional< VulkanBufferplaceholderBuffer
std::optional< VulkanBufferplaceholderUniformBuffer
std::unique_ptr< TimelineSynchronizertimelineSynchronizer_
uint64_t renderedFrameCounter = 0u
int skipMirrorFramesRemaining_ = 0
std::chrono::steady_clock::time_point lastFrameStartTime_ = std::chrono::steady_clock::now()
 Time when the last frame started, for stall detection.
std::vector< VulkanStagedBufferSyncObjectssyncCopyObjects {}
BS_tracy::tracy_thread_pool< BS_tracy::tp::none > updateThreadPool
std::unordered_map< GraphicsPipeline *, uint32_t > pipelineIndices
std::unordered_map< PipelineNames, GraphicsPipeline * > pipelinesByName
const Engineengine = nullptr
VkCommandPool vkGraphicsCommandPool = VK_NULL_HANDLE
 The graphics and present command pool.
VkCommandPool vkTransferCommandPool = VK_NULL_HANDLE
 The transfer command pool for all commands submitted to the transfer queue.
VkDescriptorPool descriptorPool = VK_NULL_HANDLE
 The descriptor pool for all descriptors of the renderer.
std::optional< ComputePassobjectCullingComputePass
 The descriptor set layout.
std::optional< ComputePassbinningAllocatorComputePass
 Stage 1: Binning allocator.
std::optional< DispatcherComputePassmeshletUnpackingDispatchComputePass
std::optional< ComputePassmeshletUnpackingComputePass
std::optional< DispatcherComputePassmeshletCullingDispatchComputePass
std::optional< ComputePassmeshletCullingComputePass
std::optional< ComputePassdrawPreparationComputePass
std::optional< ComputePassprimitiveCulling
std::optional< ComputePassprimitiveBinning
std::optional< ComputePassmeshletUnpacking
std::optional< ComputePassdrawPreparation
std::optional< ComputePasshiZGenerationComputePass
std::array< std::array< VkDescriptorSet, MAX_HIZ_MIP_LEVELS >, MAX_FRAMES_IN_FLIGHThiZMipDescriptorSets {}
VkDescriptorPool hiZDescriptorPool = VK_NULL_HANDLE
std::optional< ComputePasshiZSPDComputePass
std::optional< VulkanBufferhiZSPDAtomicBuffer
std::array< VkDescriptorSet, MAX_FRAMES_IN_FLIGHThiZSPDDescriptorSets {}
bool useSPDHiZ_ = false
VkPipeline vsGraphicsPipeline_ = VK_NULL_HANDLE
VkPipelineLayout vsPipelineLayout_ = VK_NULL_HANDLE
bool useVertexShaderPath_ = true
std::optional< ComputePassvsBinningAllocatorComputePass_
std::optional< ComputePassvsInstanceUnpackingComputePass_
std::optional< ComputePassvsPrepareDrawComputePass_
bool useVSInstancedDrawing_ = true
bool freezeCulling_ = false
 When true, culling data (frustum planes, Hi-Z VP) is frozen for debugging.
VkDescriptorSetLayout graphicsDescriptorSetLayout = VK_NULL_HANDLE
std::vector< VkPushConstantRange > pushConstants
VkPipelineLayout computeObjectCullingPipelineLayout = VK_NULL_HANDLE
 The pipeline layout.
VkPipelineLayout computeMeshletCullingPipelineLayout = VK_NULL_HANDLE
VkPipelineLayout prepareDrawsComputePipelineLayout = VK_NULL_HANDLE
VkPipelineLayout graphicsPipelineLayout = VK_NULL_HANDLE
std::vector< RenderProcess * > renderProcesses
 The render processes.
std::vector< GraphicsPipeline * > graphicsPipelines
 The pipelines.
std::vector< GraphicsPipeline * > depthOnlyGraphicsPipelines
VkPipeline vsDepthOnlyPipeline_ = VK_NULL_HANDLE
uint32_t currentFrame = 0u
ApplicationContextcontext = nullptr
Headsetheadset = nullptr
uint64_t frameCounter = 0u
std::vector< VkSemaphore > renderFinishedSemaphores

Static Private Attributes

static constexpr int SKIP_FRAMES_AFTER_STALL = 4
 Number of frames to skip after detecting a stall (covers all swapchain images)
static constexpr std::chrono::milliseconds STALL_THRESHOLD_MS {1000}
 Threshold for considering a frame as "stalled" (1 second)
static constexpr uint32_t MAX_HIZ_MIP_LEVELS = 16

Detailed Description

The renderer is the main class for rendering. It owns all data which is used any time in any frame. For per frame data take a look at.

Data stored in this class:

Definition at line 71 of file Renderer.h.

Constructor & Destructor Documentation

◆ Renderer()

EngineCore::Renderer::Renderer ( ApplicationContext * context = nullptr,
Headset * headset = nullptr,
const Engine * engine = nullptr )
explicit

Constructor.

Parameters
contextThe application context.
headsetThe headset.
enginepointer to the engine
Date
2025-02-15
Author
Konstantin Passig

create command pool

create transfer command pool

create descriptor pool

Create the timeline synchronizer for the renderer

Semaphore for the end of a frame

Definition at line 67 of file Renderer.cpp.

References context, engine, headset, and updateThreadPool.

◆ ~Renderer()

EngineCore::Renderer::~Renderer ( )

cleans up the object

Definition at line 202 of file Renderer.cpp.

References cleanup().

Here is the call graph for this function:

Member Function Documentation

◆ advanceFrameIndices()

void EngineCore::Renderer::advanceFrameIndices ( )

advances the frame indices for the next frame in flight

Date
2025-09-18
Author
Konstantin Passig

Definition at line 1838 of file Renderer.cpp.

References currentFrame, MAX_FRAMES_IN_FLIGHT, and renderedFrameCounter.

◆ allocateDescriptors()

void EngineCore::Renderer::allocateDescriptors ( )

allocates the first batch of mesh data to the shaders

Date
2025-03-14
Author
Konstantin Passig
Exceptions
std::runtime_error()Thrown when functions dont resolve

create descriptor set layout bindings

create push constant range (mesh shaders only - skip in HEADLESS and COMPUTE_DEBUG)

create the pipeline layout

create the render processes

create pipelines

Definition at line 209 of file Renderer.cpp.

References EngineCore::ShaderStage::Graphics::BINNED_VISIBLE_MESHLET_INDEX_BUFFER, context, VulkanHelper::createDescriptorSetLayout(), createHiZMipDescriptorSets(), createHiZSPDDescriptorSets(), VulkanHelper::createPipelineLayout(), createVertexShaderPathResources(), createVSInstancedDrawingResources(), depthOnlyGraphicsPipelines, descriptorPool, EngineCore::DIFFUSE_FLAT_COLOR, EngineCore::DIFFUSE_SHADER, EngineCore::DYNAMIC_TEXTURES, engine, EngineCore::Path::engineShaders(), EngineCore::PipelineConfig::fragmentShaderPath, getPipelineConfig(), graphicsDescriptorSetLayout, graphicsPipelineLayout, graphicsPipelines, headset, EngineCore::L0_SHADER, EngineCore::L1_SHADER, EngineCore::L2_SHADER, EngineCore::ShaderStage::Graphics::MATERIAL_DIFFUSE_FLAT_COLOR, EngineCore::ShaderStage::Graphics::MATERIAL_DIFFUSE_SHADER, EngineCore::ShaderStage::Graphics::MATERIAL_DYNAMIC_TEXTURES, EngineCore::ShaderStage::Graphics::MATERIAL_L0, EngineCore::ShaderStage::Graphics::MATERIAL_L1, EngineCore::ShaderStage::Graphics::MATERIAL_L2, EngineCore::ShaderStage::Graphics::MATERIAL_MOVABLE_DIFFUSE, EngineCore::ShaderStage::Graphics::MATERIAL_NORMALS, EngineCore::ShaderStage::Graphics::MATERIAL_STATIC_LIGHTMAP, MAX_FRAMES_IN_FLIGHT, EngineCore::ShaderStage::Graphics::MESH_BUFFER, EngineCore::ShaderStage::Graphics::MESH_PRIMITIVE_BUFFER, MESH_STAGE, EngineCore::ShaderStage::Graphics::MESHLET_BUFFER, EngineCore::ShaderStage::Graphics::MESHLET_TO_OBJECT_MAP_BUFFER, EngineCore::ShaderStage::Graphics::MESHLET_TRIANGLES_BUFFER, EngineCore::PipelineConfig::meshShaderPath, EngineCore::MOVABLE_DIFFUSE_SHADER, EngineCore::NORMALS_SHADER, EngineCore::ShaderStage::Graphics::PER_OBJECT_SSBO, EngineCore::PipelineConfig::pipelineData, pipelineIndices, pipelinesByName, pushConstants, renderingDataManager, renderProcesses, EngineCore::STATIC_LIGHTMAP, VulkanHelper::strIsValid(), EngineCore::ShaderStage::Graphics::TEXTURE_ARRAY, TRACY_ZONE_SCOPED_NAMED, TRACY_ZONE_SCOPED_NAMED_D, EngineCore::ShaderStage::Graphics::VERTEX_BUFFER, EngineCore::ShaderStage::Graphics::VIEW_PROJECTION_UBO, vkGraphicsCommandPool, vkTransferCommandPool, and EngineCore::ShaderStage::Graphics::VS_INSTANCE_IDS.

Here is the call graph for this function:

◆ cleanup()

void EngineCore::Renderer::cleanup ( )

◆ createBinningAllocatorResources()

◆ createCounterBuffer()

void EngineCore::Renderer::createCounterBuffer ( )
private

Definition at line 4612 of file Renderer.cpp.

References context, and counterBuffer.

◆ createDispatchBuffer()

void EngineCore::Renderer::createDispatchBuffer ( )
private

Definition at line 4589 of file Renderer.cpp.

References context, and dispatchBuffer.

◆ createHiZGenerationResources()

void EngineCore::Renderer::createHiZGenerationResources ( )

Definition at line 2415 of file Renderer.cpp.

References EngineCore::DescriptorSetLayoutBuilder::addCombinedImageSampler(), EngineCore::DescriptorSetLayoutBuilder::addStorageImage(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), hiZGenerationComputePass, and TRACY_ZONE_SCOPED_NAMED.

Here is the call graph for this function:

◆ createHiZMipDescriptorSets()

void EngineCore::Renderer::createHiZMipDescriptorSets ( )
private

Definition at line 2468 of file Renderer.cpp.

References context, VulkanHelper::createDescriptorPool(), headset, hiZDescriptorPool, hiZGenerationComputePass, hiZMipDescriptorSets, MAX_FRAMES_IN_FLIGHT, TRACY_ZONE_SCOPED_NAMED, and updateHiZMipDescriptorSets().

Referenced by allocateDescriptors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createHiZSPDDescriptorSets()

void EngineCore::Renderer::createHiZSPDDescriptorSets ( )
private

Definition at line 2667 of file Renderer.cpp.

References context, VulkanHelper::createDescriptorPool(), hiZSPDComputePass, hiZSPDDescriptorSets, MAX_FRAMES_IN_FLIGHT, TRACY_ZONE_SCOPED_NAMED, updateHiZSPDDescriptorSets(), and useSPDHiZ_.

Referenced by allocateDescriptors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createHiZSPDResources()

◆ createMeshletCullingDispatcherResources()

void EngineCore::Renderer::createMeshletCullingDispatcherResources ( )

Creates the compute pipeline for the meshlet culling stage. This should only be called after the meshlet culling shader has been created.

Date
2025-10-11
Author
Konstantin Passig

Definition at line 2255 of file Renderer.cpp.

References EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), EngineCore::ShaderStage::MeshletCullingDispatch::MESHLET_CULLING_DISPATCH_BUFFER, EngineCore::ShaderStage::MeshletCullingDispatch::MESHLET_CULLING_DISPATCH_COUNTER, meshletCullingComputePass, meshletCullingDispatchComputePass, and TRACY_ZONE_SCOPED_NAMED.

Here is the call graph for this function:

◆ createMeshletCullingResources()

◆ createMeshletUnpackingDispatcherResources()

void EngineCore::Renderer::createMeshletUnpackingDispatcherResources ( )

Creates the complete pipeline for the meshlet unpacker. This should only be called after the buffer has been created which it will be dispatching to. So in this case EngineCore::Renderer::createMeshletUnpackingResources()

Date
2025-10-11
Author
Konstantin Passig

Definition at line 2217 of file Renderer.cpp.

References EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), EngineCore::ShaderStage::MeshletUnpackingDispatch::MESHLET_UNPACKING_DISPATCH_BUFFER, EngineCore::ShaderStage::MeshletUnpackingDispatch::MESHLET_UNPACKING_DISPATCH_COUNTER, EngineCore::ShaderStage::MeshletUnpackingDispatch::MESHLET_UNPACKING_DISPATCH_LOD_COUNTER, meshletUnpackingComputePass, meshletUnpackingDispatchComputePass, and TRACY_ZONE_SCOPED_NAMED.

Here is the call graph for this function:

◆ createMeshletUnpackingResources()

◆ createMeshUnpackingDataBuffer()

void EngineCore::Renderer::createMeshUnpackingDataBuffer ( )
private

Definition at line 4643 of file Renderer.cpp.

References context, and meshUnpackingDataBuffer.

◆ createObjectCullingDataBuffer()

void EngineCore::Renderer::createObjectCullingDataBuffer ( )
private

Definition at line 4627 of file Renderer.cpp.

References context, and objectCullingDataBuffer.

◆ createObjectIDsBuffer()

void EngineCore::Renderer::createObjectIDsBuffer ( )
private

Definition at line 4619 of file Renderer.cpp.

References context, and objectIDsBuffer.

◆ createObjectMeshletDataBuffer()

void EngineCore::Renderer::createObjectMeshletDataBuffer ( )
private

Definition at line 4635 of file Renderer.cpp.

References context, and objectMeshletDataBuffer.

◆ createPlaceholderBuffer()

void EngineCore::Renderer::createPlaceholderBuffer ( )
private

Creates a buffer which can be used anywhere and holds one single 32 bit integer.

Definition at line 4596 of file Renderer.cpp.

References context, and placeholderBuffer.

◆ createPlaceholderUniformBuffer()

void EngineCore::Renderer::createPlaceholderUniformBuffer ( )
private

Definition at line 4604 of file Renderer.cpp.

References context, and placeholderUniformBuffer.

◆ createPrepareDrawResources()

void EngineCore::Renderer::createPrepareDrawResources ( )

◆ createPrimitiveCullingResources()

void EngineCore::Renderer::createPrimitiveCullingResources ( )

Definition at line 2105 of file Renderer.cpp.

References EngineCore::DescriptorSetLayoutBuilder::addCombinedImageSampler(), EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::DescriptorSetLayoutBuilder::addUniformBuffer(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), EngineCore::ShaderStage::HiZCulling::HIZ_PYRAMID, EngineCore::ShaderStage::HiZCulling::HIZ_PYRAMID_CURRENT, EngineCore::ShaderStage::HiZCulling::HIZ_VIEW_PROJECTION, objectCullingComputePass, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_CULLING_COUNTER, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_CULLING_DATA, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_CULLING_FAILED, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_CULLING_FAILED_COUNTER, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_CULLING_FRUSTUM_PLANES, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_IDS, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_INSTANCE_CULLING_DATA, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_LOCAL_BOUNDS, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_MESH_GEOMETRY_DATA, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_MESH_UNPACKING_DATA, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_MESHLET_DATA, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_PER_OBJECT_DATA, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_SINGLE_MESHLET_GEO, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_VS_INDIRECT_COUNT, EngineCore::ShaderStage::PrimitiveCulling::PRIMITIVE_VS_INDIRECT_DRAW, and TRACY_ZONE_SCOPED_NAMED.

Here is the call graph for this function:

◆ createVertexShaderPathResources()

void EngineCore::Renderer::createVertexShaderPathResources ( )

Definition at line 3122 of file Renderer.cpp.

References context, VertexShader::destroyShaders(), EngineCore::Path::engineShaders(), VertexShader::getFragmentShader(), VertexShader::getVertexShader(), graphicsPipelineLayout, VulkanHelper::setObjectName(), TRACY_ZONE_SCOPED_NAMED, useVertexShaderPath_, vsDepthOnlyPipeline_, and vsGraphicsPipeline_.

Referenced by allocateDescriptors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createVertexShaderPipelineResources()

void EngineCore::Renderer::createVertexShaderPipelineResources ( )
private

◆ createVSInstancedDrawingResources()

void EngineCore::Renderer::createVSInstancedDrawingResources ( )
private

Definition at line 3344 of file Renderer.cpp.

References EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), TRACY_ZONE_SCOPED_NAMED, useVSInstancedDrawing_, EngineCore::ShaderStage::VSBinning::VS_BINNING_ALLOCATIONS, EngineCore::ShaderStage::VSBinning::VS_BINNING_GEOMETRY_COUNTERS, EngineCore::ShaderStage::VSBinning::VS_BINNING_INSTANCE_CULLING_DATA, EngineCore::ShaderStage::VSBinning::VS_BINNING_MESH_GEOMETRY_DATA, EngineCore::ShaderStage::VSBinning::VS_BINNING_VISIBLE_COUNT, EngineCore::ShaderStage::VSBinning::VS_BINNING_VISIBLE_INSTANCES, EngineCore::ShaderStage::VSPrepareDraw::VS_PREPARE_DRAW_COUNT, EngineCore::ShaderStage::VSPrepareDraw::VS_PREPARE_GEOMETRY_COUNTERS, EngineCore::ShaderStage::VSPrepareDraw::VS_PREPARE_INDIRECT_DRAWS, EngineCore::ShaderStage::VSPrepareDraw::VS_PREPARE_SINGLE_MESHLET_GEO, EngineCore::ShaderStage::VSInstanceUnpacking::VS_UNPACKING_ALLOCATIONS, EngineCore::ShaderStage::VSInstanceUnpacking::VS_UNPACKING_INSTANCE_IDS, EngineCore::ShaderStage::VSInstanceUnpacking::VS_UNPACKING_VISIBLE_COUNT, vsBinningAllocatorComputePass_, vsInstanceUnpackingComputePass_, and vsPrepareDrawComputePass_.

Referenced by allocateDescriptors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ensureOutputBufferSizes()

bool EngineCore::Renderer::ensureOutputBufferSizes ( uint32_t primitiveCount)

Ensures output buffers are sized to handle the given primitive count. Called by RenderingDataManager when structural data changes.

Parameters
primitiveCountThe number of primitives in the scene
Returns
true if any buffer was recreated (descriptor sets need update)

Definition at line 4690 of file Renderer.cpp.

References meshUnpackingDataBuffer, objectCullingDataBuffer, objectIDsBuffer, objectMeshletDataBuffer, and renderProcesses.

Referenced by EngineCore::RenderingDataManager::updatePrimitiveData(), and EngineCore::RenderingDataManager::updatePrimitiveDataInstanced().

Here is the caller graph for this function:

◆ findExistingPipeline()

int EngineCore::Renderer::findExistingPipeline ( const std::string & meshShader,
const std::string & fragShader,
const PipelineMaterialPayload & pipelineData ) const
private

Searches for the first existing pipeline which has the same vertex and fragment shader.

Parameters
meshShaderThe vertex shader.
fragShaderThe fragment shader.
pipelineDataInformation describing the pipeline.
Returns
The found existing pipeline.
Date
2025-02-15
Author
Konstantin Passig

Definition at line 2016 of file Renderer.cpp.

References graphicsPipelines.

◆ getBinningAllocatorComputePass()

ComputePass & EngineCore::Renderer::getBinningAllocatorComputePass ( )

Definition at line 2043 of file Renderer.cpp.

References binningAllocatorComputePass.

Referenced by recordPass2Culling(), and renderToXr().

Here is the caller graph for this function:

◆ getCounterBuffer()

const VulkanBuffer & EngineCore::Renderer::getCounterBuffer ( ) const
nodiscard

Definition at line 4666 of file Renderer.cpp.

References counterBuffer.

◆ getCurrentMirrorViewSemaphore()

VkSemaphore EngineCore::Renderer::getCurrentMirrorViewSemaphore ( ) const
nodiscard

Definition at line 1636 of file Renderer.cpp.

References getCurrentRenderProcess(), and EngineCore::RenderProcess::getMirrorViewImageSemaphore().

Here is the call graph for this function:

◆ getCurrentPresentableSemaphore()

VkSemaphore EngineCore::Renderer::getCurrentPresentableSemaphore ( uint32_t swapchainImageIndex) const
nodiscard

Definition at line 1641 of file Renderer.cpp.

References renderFinishedSemaphores.

◆ getCurrentRenderingCommandBuffer()

VkCommandBuffer EngineCore::Renderer::getCurrentRenderingCommandBuffer ( ) const
nodiscard

Definition at line 1631 of file Renderer.cpp.

References getCurrentRenderProcess(), and EngineCore::RenderProcess::getGraphicsCommandBuffer().

Referenced by recordXrSwapchainImageFinishedWritingBarrier(), renderToXr(), resetMeshletCullingDispatchBuffers(), and resetMeshletUnpackingDispatchBuffers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrentRenderProcess()

◆ getCurrentTracyVkContext()

void EngineCore::Renderer::getCurrentTracyVkContext ( ) const
inlineprivate

Definition at line 548 of file Renderer.h.

Referenced by prepareTransferSubmission(), recordHiZGeneration(), recordHiZGenerationSPD(), recordPass2Culling(), recordPass2RenderPass(), recordRenderPass(), recordTransfer(), recordVertexShaderDraws(), recordVertexShaderDrawsDepthOnly(), recordVSInstancedDrawingPipeline(), and renderToXr().

Here is the caller graph for this function:

◆ getCurrentTransferCommandBuffer()

VkCommandBuffer EngineCore::Renderer::getCurrentTransferCommandBuffer ( ) const
nodiscard

Gets the current frame in flight and retrieves the transfer command buffer.

Returns
the transfer command buffer of the current frame in flight
Date
2025-09-18
Author
Konstantin Passig

Definition at line 1626 of file Renderer.cpp.

References getCurrentRenderProcess(), and EngineCore::RenderProcess::getTransferCommandBuffer().

Referenced by submitInitialTransfers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDispatchBuffer()

const VulkanBuffer & EngineCore::Renderer::getDispatchBuffer ( ) const
nodiscard

Definition at line 4671 of file Renderer.cpp.

References dispatchBuffer.

Referenced by recordPass2Culling(), and renderToXr().

Here is the caller graph for this function:

◆ getDrawPreparationComputePass()

ComputePass & EngineCore::Renderer::getDrawPreparationComputePass ( )

Definition at line 2077 of file Renderer.cpp.

References drawPreparationComputePass.

Referenced by recordPass2Culling(), and renderToXr().

Here is the caller graph for this function:

◆ getFrameElapsedMs()

int64_t EngineCore::Renderer::getFrameElapsedMs ( ) const
nodiscard

Gets the elapsed time since markFrameStart() was called. Used to check if the current frame has taken too long.

Returns
Elapsed milliseconds since frame start
Date
2026-01-17
Author
Konstantin Passig

Definition at line 1923 of file Renderer.cpp.

References lastFrameStartTime_.

◆ getGraphicsCommandBuffers()

std::vector< VkCommandBuffer > EngineCore::Renderer::getGraphicsCommandBuffers ( ) const

Gets all graphics command buffers from all owned EngineCore::RenderProcess.

Returns
a list of all graphics command buffers
Date
2025-09-18
Author
Konstantin Passig

Definition at line 1646 of file Renderer.cpp.

References renderProcesses.

◆ getGraphicsCommandPool()

VkCommandPool EngineCore::Renderer::getGraphicsCommandPool ( ) const
nodiscard

gets the graphics command pool

Returns
command pool
Date
2025-09-18
Author
Konstantin Passig

Definition at line 1656 of file Renderer.cpp.

References vkGraphicsCommandPool.

Referenced by initializeXrSwapchainFormats().

Here is the caller graph for this function:

◆ getGraphicsPipelines()

const std::vector< GraphicsPipeline * > & EngineCore::Renderer::getGraphicsPipelines ( ) const

Gets the list of all graphics pipelines.

Returns
list of graphics pipelines
Date
2025-09-18
Author
Konstantin Passig

Definition at line 1944 of file Renderer.cpp.

References graphicsPipelines.

◆ getHeadset()

Headset * EngineCore::Renderer::getHeadset ( ) const
inlinenodiscard

Gets the headset pointer.

Returns
Pointer to the headset
Date
2026-01-18
Author
Konstantin Passig

Definition at line 443 of file Renderer.h.

References headset.

◆ getMeshletCullingComputePass()

ComputePass & EngineCore::Renderer::getMeshletCullingComputePass ( )

Definition at line 2070 of file Renderer.cpp.

References meshletCullingComputePass.

◆ getMeshletCullingDispatchComputePass()

DispatcherComputePass & EngineCore::Renderer::getMeshletCullingDispatchComputePass ( )

Definition at line 2063 of file Renderer.cpp.

References meshletCullingDispatchComputePass.

◆ getMeshletCullingDispatchToMeshletCullingBarriers()

VkDependencyInfo EngineCore::Renderer::getMeshletCullingDispatchToMeshletCullingBarriers ( )

Definition at line 4776 of file Renderer.cpp.

References Vulkan::BarrierBundle::addComputeBufferBarrier(), Vulkan::BarrierBundle::clear(), dispatchBuffer, and Vulkan::BarrierBundle::getDependencyInfo().

Here is the call graph for this function:

◆ getMeshletCullingToPrepareDrawBarriers()

VkDependencyInfo EngineCore::Renderer::getMeshletCullingToPrepareDrawBarriers ( )

Definition at line 4794 of file Renderer.cpp.

References Vulkan::BarrierBundle::addComputeBufferBarrier(), Vulkan::BarrierBundle::clear(), getCurrentRenderProcess(), and Vulkan::BarrierBundle::getDependencyInfo().

Here is the call graph for this function:

◆ getMeshletUnpackingComputePass()

ComputePass & EngineCore::Renderer::getMeshletUnpackingComputePass ( )

Definition at line 2056 of file Renderer.cpp.

References meshletUnpackingComputePass.

Referenced by recordPass2Culling(), and renderToXr().

Here is the caller graph for this function:

◆ getMeshletUnpackingDispatchComputePass()

DispatcherComputePass & EngineCore::Renderer::getMeshletUnpackingDispatchComputePass ( )

Definition at line 2049 of file Renderer.cpp.

References meshletUnpackingDispatchComputePass.

Referenced by recordPass2Culling(), and renderToXr().

Here is the caller graph for this function:

◆ getMeshletUnpackingDispatchToMeshletUnpackingBarriers()

VkDependencyInfo EngineCore::Renderer::getMeshletUnpackingDispatchToMeshletUnpackingBarriers ( Vulkan::BarrierBundle & bundle) const

Definition at line 4741 of file Renderer.cpp.

References Vulkan::BarrierBundle::addComputeBufferBarrier(), dispatchBuffer, and Vulkan::BarrierBundle::getDependencyInfo().

Referenced by recordPass2Culling(), and renderToXr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMeshletUnpackingToMeshletCullingDispatchBarriers()

VkDependencyInfo EngineCore::Renderer::getMeshletUnpackingToMeshletCullingDispatchBarriers ( Vulkan::BarrierBundle & bundle)

Definition at line 4761 of file Renderer.cpp.

References Vulkan::BarrierBundle::addComputeBufferBarrier(), getCurrentRenderProcess(), and Vulkan::BarrierBundle::getDependencyInfo().

Here is the call graph for this function:

◆ getMeshUnpackingDataBuffer()

const VulkanBuffer & EngineCore::Renderer::getMeshUnpackingDataBuffer ( ) const
nodiscard

Definition at line 4675 of file Renderer.cpp.

References meshUnpackingDataBuffer.

◆ getObjectCullingComputePass()

ComputePass & EngineCore::Renderer::getObjectCullingComputePass ( )
Returns
the compute pass resources for

Definition at line 2037 of file Renderer.cpp.

References objectCullingComputePass.

Referenced by recordPass2Culling(), and renderToXr().

Here is the caller graph for this function:

◆ getObjectCullingDataBuffer()

const VulkanBuffer & EngineCore::Renderer::getObjectCullingDataBuffer ( ) const
nodiscard

Definition at line 4651 of file Renderer.cpp.

References objectCullingDataBuffer.

◆ getObjectCullingToMeshletUnpackingDispatchBarriers()

VkDependencyInfo EngineCore::Renderer::getObjectCullingToMeshletUnpackingDispatchBarriers ( Vulkan::BarrierBundle & bundle) const

Definition at line 4728 of file Renderer.cpp.

References Vulkan::BarrierBundle::addComputeBufferBarrier(), counterBuffer, and Vulkan::BarrierBundle::getDependencyInfo().

Referenced by renderToXr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getObjectIDsBuffer()

const VulkanBuffer & EngineCore::Renderer::getObjectIDsBuffer ( ) const
nodiscard

Definition at line 4661 of file Renderer.cpp.

References objectIDsBuffer.

◆ getObjectMeshletDataBuffer()

const VulkanBuffer & EngineCore::Renderer::getObjectMeshletDataBuffer ( ) const
nodiscard

Definition at line 4656 of file Renderer.cpp.

References objectMeshletDataBuffer.

◆ getPipelineConfig()

PipelineConfig EngineCore::Renderer::getPipelineConfig ( PipelineNames pipelineName)
static

Gets the static configuration for a given pipeline type Returns shader paths and pipeline data for the given PipelineNames enum.

Parameters
pipelineNameThe pipeline type enum
Returns
The static configuration for this pipeline
Author
Konstantin Passig
Date
2026-01-13

Definition at line 4887 of file Renderer.cpp.

References EngineCore::DIFFUSE_FLAT_COLOR, EngineCore::DIFFUSE_SHADER, EngineCore::DYNAMIC_TEXTURES, EngineCore::Path::engineShaders(), EngineCore::L0_SHADER, EngineCore::L1_SHADER, EngineCore::L2_SHADER, EngineCore::MOVABLE_DIFFUSE_SHADER, EngineCore::NORMALS_SHADER, and EngineCore::STATIC_LIGHTMAP.

Referenced by allocateDescriptors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPipelineIndex() [1/2]

bool EngineCore::Renderer::getPipelineIndex ( GraphicsPipeline * pipeline,
uint32_t & pipelineIndex ) const

Gets the index of a pipeline.

Parameters
pipelineThe pipeline to get the index from
pipelineIndexthe index or if the pipeline does not exist value stays unchanged!
Returns
Whether the pipeline exists or not
Date
2025-10-06
Author
Konstantin Passig

Definition at line 4866 of file Renderer.cpp.

References pipelineIndices.

Referenced by getPipelineIndex(), EngineCore::RenderingDataManager::updatePrimitiveData(), and EngineCore::RenderingDataManager::updatePrimitiveDataInstanced().

Here is the caller graph for this function:

◆ getPipelineIndex() [2/2]

bool EngineCore::Renderer::getPipelineIndex ( PipelineNames pipelineName,
uint32_t & pipelineIndex ) const

Gets the pipeline index for a given PipelineNames enum.

Parameters
pipelineNameThe pipeline type enum
pipelineIndexthe index or if the pipeline does not exist value stays unchanged!
Returns
Whether the pipeline exists or not
Author
Konstantin Passig
Date
2026-01-13

Definition at line 4877 of file Renderer.cpp.

References getPipelineIndex(), and pipelinesByName.

Here is the call graph for this function:

◆ getPlaceholderBuffer()

const VulkanBuffer & EngineCore::Renderer::getPlaceholderBuffer ( ) const
nodiscard

Definition at line 4680 of file Renderer.cpp.

References placeholderBuffer.

◆ getPlaceholderUniformBuffer()

const VulkanBuffer & EngineCore::Renderer::getPlaceholderUniformBuffer ( ) const
nodiscard

Definition at line 4685 of file Renderer.cpp.

References placeholderUniformBuffer.

◆ getRenderingDataManager()

const std::unique_ptr< RenderingDataManager > & EngineCore::Renderer::getRenderingDataManager ( ) const

Getter for the rendering data manager.

Returns
Rendering data manager

Definition at line 4584 of file Renderer.cpp.

References renderingDataManager.

Referenced by EngineCore::MeshComponent::beginPlay().

Here is the caller graph for this function:

◆ getRenderProcesses()

const std::vector< RenderProcess * > & EngineCore::Renderer::getRenderProcesses ( ) const
inlinenodiscard

Gets all render processes for cleanup/synchronization.

Definition at line 305 of file Renderer.h.

References renderProcesses.

◆ getTimelineSemaphore()

VkSemaphore EngineCore::Renderer::getTimelineSemaphore ( ) const

Getter for the main timeline renderer semaphore.

Returns
The main timeline semaphore of the renderer
Author
Konstantin Passig
Date
10.12.2025

Definition at line 1934 of file Renderer.cpp.

References timelineSynchronizer_.

◆ getTimelineSemaphoreValue()

uint64_t EngineCore::Renderer::getTimelineSemaphoreValue ( ) const

Definition at line 1621 of file Renderer.cpp.

References timelineSynchronizer_.

◆ getTimelineSynchronizer()

const TimelineSynchronizer & EngineCore::Renderer::getTimelineSynchronizer ( ) const
nodiscard

Gets the timeline synchronizer for managing frame synchronization.

Returns
The timeline synchronizer
Date
2026-01-14
Author
Konstantin Passig

Definition at line 1939 of file Renderer.cpp.

References timelineSynchronizer_.

◆ getTransferCommandPool()

VkCommandPool EngineCore::Renderer::getTransferCommandPool ( ) const
nodiscard

gets the command pool used for recording data transfer at the beginning of a frame

Returns
transfer command pool
Date
2025-07-02
Author
Konstantin Passig

Definition at line 1661 of file Renderer.cpp.

References vkTransferCommandPool.

◆ getVSBinningAllocatorComputePass()

ComputePass & EngineCore::Renderer::getVSBinningAllocatorComputePass ( )

Definition at line 2084 of file Renderer.cpp.

References vsBinningAllocatorComputePass_.

Referenced by recordVSInstancedDrawingPipeline().

Here is the caller graph for this function:

◆ getVSInstanceUnpackingComputePass()

ComputePass & EngineCore::Renderer::getVSInstanceUnpackingComputePass ( )

Definition at line 2091 of file Renderer.cpp.

References vsInstanceUnpackingComputePass_.

Referenced by recordVSInstancedDrawingPipeline().

Here is the caller graph for this function:

◆ getVSPrepareDrawComputePass()

ComputePass & EngineCore::Renderer::getVSPrepareDrawComputePass ( )

Definition at line 2098 of file Renderer.cpp.

References vsPrepareDrawComputePass_.

Referenced by recordVSInstancedDrawingPipeline().

Here is the caller graph for this function:

◆ initializeFrameIndices()

void EngineCore::Renderer::initializeFrameIndices ( )
private

Definition at line 1786 of file Renderer.cpp.

References currentFrame, and renderedFrameCounter.

◆ initializeGpuBuffers()

void EngineCore::Renderer::initializeGpuBuffers ( ) const

Definition at line 557 of file Renderer.cpp.

References engine, renderProcesses, and TRACY_ZONE_SCOPED_NAMED.

◆ initializeXrSwapchainFormats()

void EngineCore::Renderer::initializeXrSwapchainFormats ( )
private

Definition at line 1793 of file Renderer.cpp.

References VulkanHelper::beginSingleTimeCommands(), context, VulkanHelper::endSingleTimeCommands(), getGraphicsCommandPool(), and headset.

Here is the call graph for this function:

◆ isFreezeCulling()

bool EngineCore::Renderer::isFreezeCulling ( ) const
inlinenodiscard

Checks if culling data is currently frozen.

Returns
true if culling data is frozen
Date
2026-01-18
Author
Konstantin Passig

Definition at line 468 of file Renderer.h.

References freezeCulling_.

◆ isInStallRecovery()

bool EngineCore::Renderer::isInStallRecovery ( ) const
nodiscard

Checks if we're currently in stall recovery mode. During stall recovery, extra GPU synchronization should be performed.

Returns
True if in stall recovery mode
Date
2026-01-17
Author
Konstantin Passig

Definition at line 1929 of file Renderer.cpp.

References skipMirrorFramesRemaining_.

◆ markFrameStart()

void EngineCore::Renderer::markFrameStart ( )

Marks the start of a new frame for stall detection. Call this at the beginning of each render frame.

Date
2026-01-17
Author
Konstantin Passig

Definition at line 1892 of file Renderer.cpp.

References context, lastFrameStartTime_, SKIP_FRAMES_AFTER_STALL, skipMirrorFramesRemaining_, STALL_THRESHOLD_MS, and syncTimelineAfterPause().

Here is the call graph for this function:

◆ prepareTransferSubmission()

void EngineCore::Renderer::prepareTransferSubmission ( uint32_t frameIndex) const

Definition at line 582 of file Renderer.cpp.

References context, getCurrentTracyVkContext(), Colors::Green, renderProcesses, syncCopyObjects, TRACY_VK_ZONE_C, and TRACY_ZONE_SCOPED_NAMED.

Referenced by submitInitialTransfers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recordHiZGeneration()

void EngineCore::Renderer::recordHiZGeneration ( )

Records the Hi-Z pyramid generation compute pass Should be called after the render pass completes.

Definition at line 2942 of file Renderer.cpp.

References context, currentFrame, freezeCulling_, getCurrentRenderProcess(), getCurrentTracyVkContext(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getHiZExtent(), EngineCore::RenderProcess::getHiZMipLevels(), EngineCore::RenderProcess::getHiZPyramidImage(), hiZGenerationComputePass, hiZMipDescriptorSets, hiZSPDComputePass, Colors::Orange, pushConstants, recordHiZGenerationSPD(), TRACY_VK_ZONE_C, and useSPDHiZ_.

Referenced by renderToXr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recordHiZGenerationSPD()

void EngineCore::Renderer::recordHiZGenerationSPD ( )
private

Definition at line 2827 of file Renderer.cpp.

References context, currentFrame, getCurrentRenderProcess(), getCurrentTracyVkContext(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getHiZExtent(), EngineCore::RenderProcess::getHiZMipLevels(), EngineCore::RenderProcess::getHiZPyramidImage(), hiZSPDComputePass, hiZSPDDescriptorSets, Colors::Orange, pushConstants, TRACY_VK_ZONE_C, and useSPDHiZ_.

Referenced by recordHiZGeneration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recordPass2Culling()

void EngineCore::Renderer::recordPass2Culling ( size_t swapChainImageIndex)

Records Pass 2 of two-pass occlusion culling Re-tests objects that failed Pass 1 Hi-Z against the newly generated Hi-Z, then re-runs the pipeline and renders any additional survivors.

Parameters
swapChainImageIndexIndex of the swapchain image for rendering

Definition at line 3822 of file Renderer.cpp.

References EngineCore::ComputePipeline::bind(), EngineCore::ComputePass::bindDescriptorSets(), EngineCore::ComputePass::createPushConstantsInfo(), EngineCore::RenderProcess::getBinnedVisibleMeshletIndexBuffer(), getBinningAllocatorComputePass(), EngineCore::VulkanBuffer::getBuffer(), EngineCore::ComputePass::getComputePipeline(), getCurrentRenderProcess(), getCurrentTracyVkContext(), getDispatchBuffer(), getDrawPreparationComputePass(), EngineCore::RenderProcess::getEyeIndex(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getIndirectDrawBuffer(), getMeshletUnpackingComputePass(), getMeshletUnpackingDispatchComputePass(), getMeshletUnpackingDispatchToMeshletUnpackingBarriers(), getObjectCullingComputePass(), EngineCore::RenderProcess::getPipelineBinOffsetsBuffer(), EngineCore::RenderProcess::getPipelineCountersBuffer(), EngineCore::ComputePass::getThreadCount(), Colors::Orange, recordPass2RenderPass(), Colors::Red, renderingDataManager, TRACY_VK_ZONE_C, and TRACY_ZONE_SCOPED_NAMED.

Referenced by renderToXr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recordPass2RenderPass()

void EngineCore::Renderer::recordPass2RenderPass ( size_t swapChainImageIndex)

Records the Pass 2 render pass using dynamic rendering Uses VK_ATTACHMENT_LOAD_OP_LOAD to preserve Pass 1 results.

Parameters
swapChainImageIndexIndex of the swapchain image for rendering

Definition at line 4060 of file Renderer.cpp.

References EngineCore::VulkanBuffer::getBuffer(), getCurrentRenderProcess(), getCurrentTracyVkContext(), VulkanHelper::getFunctions(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getGraphicsDescriptorSet(), EngineCore::RenderProcess::getIndirectDrawBuffer(), graphicsPipelineLayout, graphicsPipelines, Colors::Green, headset, EngineCore::RenderTarget::image, EngineCore::RenderTarget::imageView, MAX_MESHLETS_PER_BIN, recordVertexShaderDraws(), TRACY_VK_ZONE_C, TRACY_ZONE_SCOPED_NAMED, VulkanFunctions::vkCmdBeginConditionalRenderingEXT, VulkanFunctions::vkCmdDrawMeshTasksIndirectEXT, and VulkanFunctions::vkCmdEndConditionalRenderingEXT.

Referenced by recordPass2Culling().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recordRenderPass()

void EngineCore::Renderer::recordRenderPass ( size_t swapChainImageIndex)

◆ recordTransfer()

void EngineCore::Renderer::recordTransfer ( float time)

create texture upload commands if there are textures to upload

Definition at line 725 of file Renderer.cpp.

References context, getCurrentRenderProcess(), getCurrentTracyVkContext(), EngineCore::RenderProcess::getTransferCommandBuffer(), Colors::Green, Colors::Orange, renderingDataManager, renderProcesses, syncCopyObjects, TRACY_VK_ZONE_C, TRACY_ZONE_SCOPED_FUNCTION, and TRACY_ZONE_SCOPED_NAMED.

Here is the call graph for this function:

◆ recordVertexShaderDraws()

void EngineCore::Renderer::recordVertexShaderDraws ( size_t swapChainImageIndex) const
private

◆ recordVertexShaderDrawsDepthOnly()

void EngineCore::Renderer::recordVertexShaderDrawsDepthOnly ( size_t swapChainImageIndex) const
private

◆ recordVSInstancedDrawingPipeline()

◆ recordXrSwapchainImageFinishedWritingBarrier()

void EngineCore::Renderer::recordXrSwapchainImageFinishedWritingBarrier ( uint32_t swapChainImageIndex) const

Definition at line 4539 of file Renderer.cpp.

References getCurrentRenderingCommandBuffer(), headset, and TRACY_ZONE_SCOPED_NAMED.

Referenced by renderToXr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recordXrSwapchainImageWritableBarrier()

void EngineCore::Renderer::recordXrSwapchainImageWritableBarrier ( uint32_t swapChainImageIndex) const

Definition at line 4342 of file Renderer.cpp.

References currentFrame, getCurrentRenderProcess(), Colors::Gray, headset, TRACY_VK_ZONE_C, and TRACY_ZONE_SCOPED_NAMED.

Referenced by renderToXr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderToXr()

void EngineCore::Renderer::renderToXr ( size_t swapChainImageIndex,
float time )

acquire render resources from transfer queue

Definition at line 849 of file Renderer.cpp.

References EngineCore::ComputePipeline::bind(), EngineCore::ComputePass::bindDescriptorSets(), Colors::Blue, counterBuffer, EngineCore::ComputePass::createPushConstantsInfo(), currentFrame, engine, EngineCore::RenderProcess::getBinnedVisibleMeshletIndexBuffer(), getBinningAllocatorComputePass(), EngineCore::VulkanBuffer::getBuffer(), EngineCore::ComputePass::getComputePipeline(), EngineCore::RenderProcess::getCullingFailedCounterBuffer(), getCurrentRenderingCommandBuffer(), getCurrentRenderProcess(), getCurrentTracyVkContext(), getDispatchBuffer(), getDrawPreparationComputePass(), EngineCore::RenderProcess::getEyeIndex(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getHiZPyramidFullView(), EngineCore::RenderProcess::getIndirectDrawBuffer(), EngineCore::RenderProcess::getLodClusterSurvivorCountBuffer(), getMeshletUnpackingComputePass(), getMeshletUnpackingDispatchComputePass(), getMeshletUnpackingDispatchToMeshletUnpackingBarriers(), getObjectCullingComputePass(), getObjectCullingToMeshletUnpackingDispatchBarriers(), EngineCore::RenderProcess::getPipelineBinOffsetsBuffer(), EngineCore::RenderProcess::getPipelineCountersBuffer(), EngineCore::ComputePass::getThreadCount(), EngineCore::RenderProcess::getVSDrawCommandsBuffer(), EngineCore::RenderProcess::getVSDrawCountBuffer(), EngineCore::RenderProcess::getVSIndirectDrawBuffer(), EngineCore::RenderProcess::getVSIndirectDrawCountBuffer(), EngineCore::RenderProcess::getVSVisibleCountBuffer(), headset, LogLOD, MAX_FRAMES_IN_FLIGHT, EngineCore::RenderProcess::processTextureUpload(), recordHiZGeneration(), recordPass2Culling(), recordRenderPass(), recordVSInstancedDrawingPipeline(), recordXrSwapchainImageFinishedWritingBarrier(), recordXrSwapchainImageWritableBarrier(), Colors::Red, renderingDataManager, renderProcesses, restartRenderCommandBuffers(), syncCopyObjects, TRACY_VK_COLLECT, TRACY_VK_ZONE_C, TRACY_ZONE_SCOPED_FUNCTION, TRACY_ZONE_SCOPED_NAMED, Colors::Turquoise, EngineCore::RenderProcess::updateComputeObjectCullingDescriptorSets(), EngineCore::RenderProcess::updateLodConfig(), EngineCore::RenderProcess::uploadLodConfigBuffer(), VS_LOG, VS_LOG_ONCE, and EngineCore::Warning.

Here is the call graph for this function:

◆ resetMeshletCullingDispatchBuffers()

void EngineCore::Renderer::resetMeshletCullingDispatchBuffers ( )

Definition at line 4835 of file Renderer.cpp.

References EngineCore::VulkanBuffer::getBuffer(), getCurrentRenderingCommandBuffer(), getCurrentRenderProcess(), and EngineCore::RenderProcess::getMeshletCounterBuffer().

Here is the call graph for this function:

◆ resetMeshletUnpackingDispatchBuffers()

void EngineCore::Renderer::resetMeshletUnpackingDispatchBuffers ( )

Definition at line 4812 of file Renderer.cpp.

References counterBuffer, and getCurrentRenderingCommandBuffer().

Here is the call graph for this function:

◆ restartRenderCommandBuffers()

void EngineCore::Renderer::restartRenderCommandBuffers ( ) const

Resets the command buffers of the active frame and begins a new write.

Date
2025-09-19
Author
Konstantin Passig

Definition at line 4331 of file Renderer.cpp.

References getCurrentRenderProcess(), and TRACY_ZONE_SCOPED_NAMED.

Referenced by renderToXr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFreezeCulling()

void EngineCore::Renderer::setFreezeCulling ( bool freeze)

Freezes culling data (frustum planes, Hi-Z view-projection)

When frozen, the culling system continues to use the frustum and Hi-Z matrices from the moment freeze was enabled. This allows viewing the scene from a debug camera while seeing what's being culled from the original viewpoint.

Parameters
freezetrue to freeze culling data, false to resume updates
Date
2026-01-18
Author
Konstantin Passig

Definition at line 713 of file Renderer.cpp.

References freezeCulling_.

◆ shouldSkipMirrorView()

bool EngineCore::Renderer::shouldSkipMirrorView ( )
nodiscard

Checks if mirror view should be skipped this frame.

Returns true if:

  • A timeline sync just happened (mirror swapchain may be in PRESENT state)
  • More than 1 second elapsed since last frame (long stall recovery)

When true due to stall, also performs vkDeviceWaitIdle to ensure clean GPU state.

Returns
true if mirror view should be skipped, false otherwise
Date
2026-01-17
Author
Konstantin Passig

Definition at line 1879 of file Renderer.cpp.

References skipMirrorFramesRemaining_.

◆ submitGraphics()

◆ submitInitialTransfers()

◆ submitTransfer()

◆ syncTimelineAfterPause()

void EngineCore::Renderer::syncTimelineAfterPause ( )

Synchronizes the frame counter with the timeline semaphore after pausing.

Call this when transitioning from non-rendering (SkipRender) back to rendering. This ensures the frame counter is advanced enough that timeline semaphore signals will have increasing values (required by Vulkan spec).

Without this, resuming after SkipRender frames would try to signal the same timeline values that were already signaled before pausing, causing a validation error and potential hang.

Date
2026-01-17
Author
Konstantin Passig

Definition at line 1845 of file Renderer.cpp.

References currentFrame, MAX_FRAMES_IN_FLIGHT, EngineCore::PIPELINE_STAGE_COUNT, renderedFrameCounter, SKIP_FRAMES_AFTER_STALL, skipMirrorFramesRemaining_, and timelineSynchronizer_.

Referenced by markFrameStart().

Here is the caller graph for this function:

◆ updateCpuRenderResources()

void EngineCore::Renderer::updateCpuRenderResources ( float time)

Updates all data for gpu frame buffers.

Parameters
timetime for time based fragment shaders
Date
2025-10-16
Author
Konstantin Passig

Definition at line 4252 of file Renderer.cpp.

References getCurrentRenderProcess(), renderingDataManager, syncCopyObjects, TRACY_ZONE_SCOPED_NAMED, EngineCore::RenderProcess::updateFragmentTime(), EngineCore::RenderProcess::updateMeshletDataBuffer(), EngineCore::RenderProcess::updateMeshRenderingData(), EngineCore::RenderProcess::updateSSBO(), updateThreadPool, and updateViewMatrix().

Referenced by uploadFrameData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateHiZMipDescriptorSets()

void EngineCore::Renderer::updateHiZMipDescriptorSets ( uint32_t frameIndex)
private

Definition at line 2539 of file Renderer.cpp.

References EngineCore::DescriptorSetUpdater::addCombinedImageSampler(), EngineCore::DescriptorSetUpdater::addStorageImage(), context, EngineCore::RenderProcess::getHiZMipLevels(), EngineCore::RenderProcess::getHiZPyramidMipView(), headset, EngineCore::ShaderStage::HiZGeneration::HIZ_DST_MIP, EngineCore::ShaderStage::HiZGeneration::HIZ_SRC_DEPTH_MS, EngineCore::ShaderStage::HiZGeneration::HIZ_SRC_TEXTURE, hiZGenerationComputePass, hiZMipDescriptorSets, renderProcesses, and EngineCore::DescriptorSetUpdater::update().

Referenced by createHiZMipDescriptorSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateHiZSPDDescriptorSets()

void EngineCore::Renderer::updateHiZSPDDescriptorSets ( uint32_t frameIndex)
private

Definition at line 2733 of file Renderer.cpp.

References context, VulkanHelper::fullBufferInfo(), EngineCore::RenderProcess::getHiZMipLevels(), EngineCore::RenderProcess::getHiZPyramidMipView(), headset, hiZSPDAtomicBuffer, hiZSPDComputePass, hiZSPDDescriptorSets, and renderProcesses.

Referenced by createHiZSPDDescriptorSets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateViewMatrix()

void EngineCore::Renderer::updateViewMatrix ( )

Requests an update of the current render processes view matrix. The matrix is pulled from the headset.

Author
Konstantin Passig
Date
10.12.2025

Definition at line 698 of file Renderer.cpp.

References freezeCulling_, getCurrentRenderProcess(), headset, TRACY_ZONE_SCOPED_NAMED, EngineCore::RenderProcess::updateEyeViewProjectionMatrices(), EngineCore::RenderProcess::updateFrustumUBOData(), and EngineCore::RenderProcess::updateHiZViewProjectionData().

Referenced by updateCpuRenderResources().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uploadFrameData()

void EngineCore::Renderer::uploadFrameData ( float time)

Definition at line 719 of file Renderer.cpp.

References TRACY_ZONE_SCOPED_FUNCTION, and updateCpuRenderResources().

Here is the call graph for this function:

Member Data Documentation

◆ binningAllocatorComputePass

std::optional<ComputePass> EngineCore::Renderer::binningAllocatorComputePass
private

Stage 1: Binning allocator.

Definition at line 626 of file Renderer.h.

Referenced by createBinningAllocatorResources(), and getBinningAllocatorComputePass().

◆ computeMeshletCullingPipelineLayout

VkPipelineLayout EngineCore::Renderer::computeMeshletCullingPipelineLayout = VK_NULL_HANDLE
private

Definition at line 741 of file Renderer.h.

◆ computeObjectCullingPipelineLayout

VkPipelineLayout EngineCore::Renderer::computeObjectCullingPipelineLayout = VK_NULL_HANDLE
private

The pipeline layout.

Definition at line 740 of file Renderer.h.

Referenced by cleanup().

◆ context

◆ counterBuffer

std::optional<VulkanBuffer> EngineCore::Renderer::counterBuffer
private

◆ currentFrame

◆ depthOnlyGraphicsPipelines

std::vector<GraphicsPipeline *> EngineCore::Renderer::depthOnlyGraphicsPipelines
private

Definition at line 761 of file Renderer.h.

Referenced by allocateDescriptors(), cleanup(), and recordRenderPass().

◆ descriptorPool

VkDescriptorPool EngineCore::Renderer::descriptorPool = VK_NULL_HANDLE
private

The descriptor pool for all descriptors of the renderer.

Author
Konstantin Passig
Date
15.12.2025

Definition at line 620 of file Renderer.h.

Referenced by allocateDescriptors(), and cleanup().

◆ dispatchBuffer

◆ drawPreparation

std::optional<ComputePass> EngineCore::Renderer::drawPreparation
private

Definition at line 636 of file Renderer.h.

◆ drawPreparationComputePass

std::optional<ComputePass> EngineCore::Renderer::drawPreparationComputePass
private

Definition at line 631 of file Renderer.h.

Referenced by createPrepareDrawResources(), and getDrawPreparationComputePass().

◆ engine

const Engine* EngineCore::Renderer::engine = nullptr
private

Definition at line 581 of file Renderer.h.

Referenced by allocateDescriptors(), initializeGpuBuffers(), Renderer(), and renderToXr().

◆ frameCounter

uint64_t EngineCore::Renderer::frameCounter = 0u
private

Definition at line 769 of file Renderer.h.

◆ freezeCulling_

bool EngineCore::Renderer::freezeCulling_ = false
private

When true, culling data (frustum planes, Hi-Z VP) is frozen for debugging.

Definition at line 681 of file Renderer.h.

Referenced by isFreezeCulling(), recordHiZGeneration(), setFreezeCulling(), and updateViewMatrix().

◆ graphicsDescriptorSetLayout

VkDescriptorSetLayout EngineCore::Renderer::graphicsDescriptorSetLayout = VK_NULL_HANDLE
private

Definition at line 707 of file Renderer.h.

Referenced by allocateDescriptors(), and cleanup().

◆ graphicsPipelineLayout

VkPipelineLayout EngineCore::Renderer::graphicsPipelineLayout = VK_NULL_HANDLE
private

◆ graphicsPipelines

std::vector<GraphicsPipeline *> EngineCore::Renderer::graphicsPipelines
private

The pipelines.

Definition at line 757 of file Renderer.h.

Referenced by allocateDescriptors(), cleanup(), findExistingPipeline(), getGraphicsPipelines(), and recordPass2RenderPass().

◆ headset

◆ hiZDescriptorPool

VkDescriptorPool EngineCore::Renderer::hiZDescriptorPool = VK_NULL_HANDLE
private

Definition at line 645 of file Renderer.h.

Referenced by cleanup(), and createHiZMipDescriptorSets().

◆ hiZGenerationComputePass

std::optional<ComputePass> EngineCore::Renderer::hiZGenerationComputePass
private

◆ hiZMipDescriptorSets

std::array<std::array<VkDescriptorSet, MAX_HIZ_MIP_LEVELS>, MAX_FRAMES_IN_FLIGHT> EngineCore::Renderer::hiZMipDescriptorSets {}
private

◆ hiZSPDAtomicBuffer

std::optional<VulkanBuffer> EngineCore::Renderer::hiZSPDAtomicBuffer
private

Definition at line 649 of file Renderer.h.

Referenced by createHiZSPDResources(), and updateHiZSPDDescriptorSets().

◆ hiZSPDComputePass

std::optional<ComputePass> EngineCore::Renderer::hiZSPDComputePass
private

◆ hiZSPDDescriptorSets

std::array<VkDescriptorSet, MAX_FRAMES_IN_FLIGHT> EngineCore::Renderer::hiZSPDDescriptorSets {}
private

◆ lastFrameStartTime_

std::chrono::steady_clock::time_point EngineCore::Renderer::lastFrameStartTime_ = std::chrono::steady_clock::now()
private

Time when the last frame started, for stall detection.

Definition at line 566 of file Renderer.h.

Referenced by getFrameElapsedMs(), and markFrameStart().

◆ MAX_HIZ_MIP_LEVELS

uint32_t EngineCore::Renderer::MAX_HIZ_MIP_LEVELS = 16
staticconstexprprivate

Per-mip descriptor sets for Hi-Z generation (legacy) Array indexed as [frameInFlight][mipLevel]

Definition at line 643 of file Renderer.h.

◆ meshletCullingComputePass

std::optional<ComputePass> EngineCore::Renderer::meshletCullingComputePass
private

◆ meshletCullingDispatchComputePass

std::optional<DispatcherComputePass> EngineCore::Renderer::meshletCullingDispatchComputePass
private

◆ meshletUnpacking

std::optional<ComputePass> EngineCore::Renderer::meshletUnpacking
private

Definition at line 635 of file Renderer.h.

◆ meshletUnpackingComputePass

std::optional<ComputePass> EngineCore::Renderer::meshletUnpackingComputePass
private

◆ meshletUnpackingDispatchComputePass

std::optional<DispatcherComputePass> EngineCore::Renderer::meshletUnpackingDispatchComputePass
private

◆ meshUnpackingDataBuffer

std::optional<VulkanBuffer> EngineCore::Renderer::meshUnpackingDataBuffer
private

◆ objectCullingComputePass

std::optional<ComputePass> EngineCore::Renderer::objectCullingComputePass
private

The descriptor set layout.

Definition at line 625 of file Renderer.h.

Referenced by createPrimitiveCullingResources(), and getObjectCullingComputePass().

◆ objectCullingDataBuffer

std::optional<VulkanBuffer> EngineCore::Renderer::objectCullingDataBuffer
private

◆ objectIDsBuffer

std::optional<VulkanBuffer> EngineCore::Renderer::objectIDsBuffer
private

◆ objectMeshletDataBuffer

std::optional<VulkanBuffer> EngineCore::Renderer::objectMeshletDataBuffer
private

◆ pipelineIndices

std::unordered_map<GraphicsPipeline *, uint32_t> EngineCore::Renderer::pipelineIndices
private

Definition at line 576 of file Renderer.h.

Referenced by allocateDescriptors(), and getPipelineIndex().

◆ pipelinesByName

std::unordered_map<PipelineNames, GraphicsPipeline*> EngineCore::Renderer::pipelinesByName
private

Definition at line 579 of file Renderer.h.

Referenced by allocateDescriptors(), and getPipelineIndex().

◆ placeholderBuffer

std::optional<VulkanBuffer> EngineCore::Renderer::placeholderBuffer
private

Definition at line 224 of file Renderer.h.

Referenced by cleanup(), createPlaceholderBuffer(), and getPlaceholderBuffer().

◆ placeholderUniformBuffer

std::optional<VulkanBuffer> EngineCore::Renderer::placeholderUniformBuffer
private

◆ prepareDrawsComputePipelineLayout

VkPipelineLayout EngineCore::Renderer::prepareDrawsComputePipelineLayout = VK_NULL_HANDLE
private

Definition at line 742 of file Renderer.h.

Referenced by cleanup().

◆ primitiveBinning

std::optional<ComputePass> EngineCore::Renderer::primitiveBinning
private

Definition at line 634 of file Renderer.h.

◆ primitiveCulling

std::optional<ComputePass> EngineCore::Renderer::primitiveCulling
private

Definition at line 633 of file Renderer.h.

◆ pushConstants

std::vector<VkPushConstantRange> EngineCore::Renderer::pushConstants
private

Definition at line 735 of file Renderer.h.

Referenced by allocateDescriptors(), recordHiZGeneration(), and recordHiZGenerationSPD().

◆ renderedFrameCounter

uint64_t EngineCore::Renderer::renderedFrameCounter = 0u
private

◆ renderFinishedSemaphores

std::vector<VkSemaphore> EngineCore::Renderer::renderFinishedSemaphores
private

Definition at line 771 of file Renderer.h.

Referenced by cleanup(), getCurrentPresentableSemaphore(), and submitGraphics().

◆ renderingDataManager

◆ renderProcesses

◆ SKIP_FRAMES_AFTER_STALL

int EngineCore::Renderer::SKIP_FRAMES_AFTER_STALL = 4
staticconstexprprivate

Number of frames to skip after detecting a stall (covers all swapchain images)

Definition at line 563 of file Renderer.h.

Referenced by markFrameStart(), and syncTimelineAfterPause().

◆ skipMirrorFramesRemaining_

int EngineCore::Renderer::skipMirrorFramesRemaining_ = 0
private

Number of frames remaining to skip mirror view after stall recovery We skip multiple frames to cycle through all swapchain images (typically 3)

Definition at line 560 of file Renderer.h.

Referenced by isInStallRecovery(), markFrameStart(), shouldSkipMirrorView(), and syncTimelineAfterPause().

◆ STALL_THRESHOLD_MS

std::chrono::milliseconds EngineCore::Renderer::STALL_THRESHOLD_MS {1000}
staticconstexprprivate

Threshold for considering a frame as "stalled" (1 second)

Definition at line 569 of file Renderer.h.

Referenced by markFrameStart().

◆ syncCopyObjects

std::vector<VulkanStagedBufferSyncObjects> EngineCore::Renderer::syncCopyObjects {}
private

◆ timelineSynchronizer_

std::unique_ptr<TimelineSynchronizer> EngineCore::Renderer::timelineSynchronizer_
private

◆ updateThreadPool

BS_tracy::tracy_thread_pool<BS_tracy::tp::none> EngineCore::Renderer::updateThreadPool
private

Definition at line 573 of file Renderer.h.

Referenced by Renderer(), and updateCpuRenderResources().

◆ useSPDHiZ_

bool EngineCore::Renderer::useSPDHiZ_ = false
private

◆ useVertexShaderPath_

bool EngineCore::Renderer::useVertexShaderPath_ = true
private

◆ useVSInstancedDrawing_

bool EngineCore::Renderer::useVSInstancedDrawing_ = true
private

◆ vkGraphicsCommandPool

VkCommandPool EngineCore::Renderer::vkGraphicsCommandPool = VK_NULL_HANDLE
private

The graphics and present command pool.

Definition at line 604 of file Renderer.h.

Referenced by allocateDescriptors(), cleanup(), and getGraphicsCommandPool().

◆ vkTransferCommandPool

VkCommandPool EngineCore::Renderer::vkTransferCommandPool = VK_NULL_HANDLE
private

The transfer command pool for all commands submitted to the transfer queue.

Author
Konstantin Passig
Date
15.12.2025

Definition at line 612 of file Renderer.h.

Referenced by allocateDescriptors(), cleanup(), and getTransferCommandPool().

◆ vsBinningAllocatorComputePass_

std::optional<ComputePass> EngineCore::Renderer::vsBinningAllocatorComputePass_
private

◆ vsDepthOnlyPipeline_

VkPipeline EngineCore::Renderer::vsDepthOnlyPipeline_ = VK_NULL_HANDLE
private

◆ vsGraphicsPipeline_

VkPipeline EngineCore::Renderer::vsGraphicsPipeline_ = VK_NULL_HANDLE
private

Definition at line 660 of file Renderer.h.

Referenced by cleanup(), createVertexShaderPathResources(), and recordVertexShaderDraws().

◆ vsInstanceUnpackingComputePass_

std::optional<ComputePass> EngineCore::Renderer::vsInstanceUnpackingComputePass_
private

◆ vsPipelineLayout_

VkPipelineLayout EngineCore::Renderer::vsPipelineLayout_ = VK_NULL_HANDLE
private

Definition at line 661 of file Renderer.h.

◆ vsPrepareDrawComputePass_

std::optional<ComputePass> EngineCore::Renderer::vsPrepareDrawComputePass_
private

Definition at line 674 of file Renderer.h.

Referenced by createVSInstancedDrawingResources(), and getVSPrepareDrawComputePass().


The documentation for this class was generated from the following files:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Renderer/Renderer.h
  • /home/magerbeton/Documents/gl3-vulkan/Engine/src/Engine/Renderer/Renderer.cpp