|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
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>
Classes | |
| struct | MeshConstants |
| A texture index push constant. More... | |
| struct | TaskConstants |
| Used to tell the pipeline which objects are shaded with which shader. More... | |
| struct | TonemapPushConstants |
Public Member Functions | |
| Renderer (Core::ApplicationContext *context=nullptr, Headset *headset=nullptr, const EngineKern *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 () const |
| Requests an update of the current render processes view matrix. The matrix is pulled from the headset. | |
| void | createVertexShaderPathResources () |
| void | updateCpuRenderResources (float time) |
| 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, such as the meshlet unpacking resources. | |
| void | restartRenderCommandBuffers () const |
| Resets the command buffers of the active frame and begins a new write. | |
| void | recordTonemapToSwapchain (uint32_t swapChainImageIndex) const |
| void | recordRenderPass (size_t swapChainImageIndex) |
| Records the main render pass using dynamic rendering. | |
| const std::unique_ptr< Core::RenderingDataManager > & | getRenderingDataManager () const |
| Getter for the rendering data manager. | |
| const std::unique_ptr< BufferManager > & | getBufferManager () const |
| Getter for the buffer manager of the renderer. | |
| const std::unique_ptr< ComputePassManager > & | getComputePassManager () const |
| bool | ensureOutputBufferSizes (uint32_t primitive_count) const |
| Calculates buffer sizes based on primitive count. | |
| const Vulkan::Buffer & | getObjectCullingDataBuffer () const |
| const Vulkan::Buffer & | getObjectMeshletDataBuffer () const |
| const Vulkan::Buffer & | getObjectIDsBuffer () const |
| const Vulkan::Buffer & | getCounterBuffer () const |
| const Vulkan::Buffer & | getDispatchBuffer () const |
| const Vulkan::Buffer & | getMeshUnpackingDataBuffer () const |
| const Vulkan::Buffer & | getPlaceholderBuffer () const |
| const Vulkan::Buffer & | getPlaceholderUniformBuffer () const |
| VkDependencyInfo | getObjectCullingToMeshletUnpackingDispatchBarriers (Vulkan::BarrierBundle &bundle) const |
| VkDependencyInfo | getMeshletUnpackingDispatchToMeshletUnpackingBarriers (Vulkan::BarrierBundle &bundle) const |
| VkDependencyInfo | getMeshletUnpackingToMeshletCullingDispatchBarriers (Vulkan::BarrierBundle &bundle) const |
| VkDependencyInfo | getMeshletCullingDispatchToMeshletCullingBarriers () const |
| VkDependencyInfo | getMeshletCullingToPrepareDrawBarriers () const |
| void | resetMeshletUnpackingDispatchBuffers () |
| void | resetMeshletCullingDispatchBuffers () const |
| void | renderToXr (size_t swapChainImageIndex, float time) |
| void | recordTransfer (float time) |
| void | submitInitialTransfers () |
| void | uploadFrameData (float time) |
| void | submitTransfer () const |
| void | waitForPreviousFrame () const |
| Waits for the previous frame's transfer to complete before writing to GPU buffers. Must be called BEFORE updateIfDirty() to prevent race conditions where the GPU is still reading from buffers while the CPU writes new data. | |
| void | submitGraphics (uint32_t swapChainImageIndex, VkSemaphore mirrorAcquireSemaphore=VK_NULL_HANDLE) const |
| 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 render processes. | |
| std::vector< VkCommandBuffer > | getTransferCommandBuffers () const |
| 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. | |
| RenderProcess * | getCurrentRenderProcess () 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. | |
| void | resetFrameTimer () |
| Resets the frame timer to prevent false stall detection. Call after long blocking operations (e.g. vkDeviceWaitIdle during state transitions) so that the next markFrameStart() doesn't see the blocking time as a stall. | |
| 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. | |
| Headset * | getHeadset () const |
| Gets the headset pointer. | |
| const ImageBasedLightingResources & | getIBLResources () const |
| const SunShadowResources & | getSunShadowResources () const |
| const SunShadowResources & | getDynamicSunShadowResources () const |
| void | setFreezeCulling (bool freeze) |
| Freezes culling data (frustum planes, view-projection) | |
| bool | isFreezeCulling () const |
| Checks if culling data is currently frozen. | |
| void | setVertexShaderOnlyMode (bool enabled) |
| bool | isVertexShaderOnlyMode () const |
| void | setParallelLodSelection (bool enabled) const |
| void | setVSInstancedDrawing (bool enabled) |
| void | setSkipMeshShaderDraw (bool skip) |
| void | setSkipVertexShaderDraw (bool skip) |
| void | setSunShadowCasterDebugView (bool enabled) |
| void | registerWindTrailEmitter (std::shared_ptr< Entities::SceneNode > node) |
| void | unregisterWindTrailEmitter () |
| void | setTracyContextManager (Debug::Tracy::TracyVkContextManager *manager) |
| const TimelineSynchronizer & | getTimelineSynchronizer () const |
| Gets the timeline synchronizer for managing frame synchronization. | |
| WorldUiRenderer * | getWorldUiRenderer () const |
| void | notifyMaterialLoaded (Assets::Material *material) const |
| 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. | |
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 | getCurrentTracyVkContext () const |
| void | getCurrentTracyTransferVkContext () const |
| void | initializeFrameIndices () |
| void | initializeXrSwapchainFormats () const |
| 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 | createVertexShaderPipelineResources () |
| void | recordVertexShaderDraws (size_t swapChainImageIndex) const |
| void | createVSInstancedDrawingResources () |
| void | recordVSInstancedDrawingPipeline () const |
| void | recordParallelLodSelectionPipeline () const |
| void | resetVisibilityBuffers (VkCommandBuffer commandBuffer) const |
| void | recordVisibilityComputeToGraphicsBarriers (VkCommandBuffer commandBuffer) const |
| void | createImageBasedLightingResources () |
| void | createSunShadowResources () |
| void | createSunShadowPipelines () |
| void | updateSunShadowCascades () |
| void | recordSunShadowPass () |
| void | recordSunShadowVisibilityPipeline (uint32_t cascadeIndex) const |
| void | recordSunShadowPipelineDraws (VkCommandBuffer commandBuffer, PipelineNames pipelineName, VkPipeline shadowPipeline, uint32_t cascadeIndex) |
| void | recordSunShadowVertexShaderDraws (VkCommandBuffer commandBuffer, uint32_t cascadeIndex, bool staticCastersOnly, bool dynamicCastersOnly) const |
| VkPipeline | getSunShadowPipelineForCaster (PipelineNames pipelineName) const |
| VkPipeline | getVSSunShadowPipelineForCaster (PipelineNames pipelineName) const |
| void | createDebugLinePipeline () |
| void | recordDebugLineDraws (VkCommandBuffer commandBuffer) const |
| void | createSkyGradientPipeline () |
| void | recordSkyGradientDraw (VkCommandBuffer commandBuffer) |
| void | createTonemapResources () |
Private Attributes | |
| std::unique_ptr< Core::RenderingDataManager > | renderingDataManager_ |
| std::unique_ptr< BufferManager > | bufferManager_ |
| std::unique_ptr< ComputePassManager > | computePassManager_ |
| Debug::Tracy::TracyVkContextManager * | tracyContextManager_ = nullptr |
| std::unique_ptr< TimelineSynchronizer > | timelineSynchronizer_ |
| std::unique_ptr< WorldUiRenderer > | worldUiRenderer_ |
| 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< Vulkan::StagedBufferSyncObjects > | syncCopyObjects_ {} |
| std::unordered_map< GraphicsPipeline *, uint32_t > | pipelineIndices_ |
| std::unordered_map< PipelineNames, GraphicsPipeline * > | pipelinesByName_ |
| std::unordered_map< PipelineNames, uint32_t > | vsPipelineNameToIndex_ |
| const EngineKern * | engine_ = 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::vector< VkPipeline > | vsGraphicsPipelines_ |
| VkPipelineLayout | vsPipelineLayout_ = VK_NULL_HANDLE |
| bool | useVertexShaderPath_ = true |
| bool | vertexShaderOnlyMode_ = false |
| bool | useVSInstancedDrawing_ = true |
| ImageBasedLightingResources | iblResources_ |
| VkDescriptorPool | iblDescriptorPool_ = VK_NULL_HANDLE |
| VkDescriptorSet | brdfLutDescriptorSet_ = VK_NULL_HANDLE |
| SunShadowResources | sunShadowResources_ |
| SunShadowResources | dynamicSunShadowResources_ |
| SunShadowCascadeBuffer | staticSunShadowCascadeData_ {} |
| bool | staticSunShadowCacheValid_ = false |
| VkPipeline | sunShadowOpaquePipeline_ = VK_NULL_HANDLE |
| VkPipeline | sunShadowMovableAlphaPipeline_ = VK_NULL_HANDLE |
| VkPipeline | sunShadowStaticAlphaPipeline_ = VK_NULL_HANDLE |
| VkPipeline | vsSunShadowOpaquePipeline_ = VK_NULL_HANDLE |
| VkPipeline | vsSunShadowMovableAlphaPipeline_ = VK_NULL_HANDLE |
| VkPipeline | vsSunShadowStaticAlphaPipeline_ = VK_NULL_HANDLE |
| VkPipeline | debugLinePipeline_ = VK_NULL_HANDLE |
| VkPipeline | debugLineOverlayPipeline_ = VK_NULL_HANDLE |
| VkPipeline | skyGradientPipeline_ = VK_NULL_HANDLE |
| VkPipelineLayout | skyGradientPipelineLayout_ = VK_NULL_HANDLE |
| VkDescriptorSetLayout | tonemapDescriptorSetLayout_ = VK_NULL_HANDLE |
| VkDescriptorSet | tonemapDescriptorSet_ = VK_NULL_HANDLE |
| VkPipelineLayout | tonemapPipelineLayout_ = VK_NULL_HANDLE |
| VkPipeline | tonemapPipeline_ = VK_NULL_HANDLE |
| ParticleSystem * | particleSystem_ = nullptr |
| std::weak_ptr< Entities::SceneNode > | windTrailEmitterNode_ |
| float | lastRenderTime_ = 0.0f |
| bool | freezeCulling_ = false |
| When true, culling data (frustum planes) is frozen for debugging. | |
| bool | skipMeshShaderDraw_ = false |
| bool | skipVertexShaderDraw_ = false |
| bool | sunShadowCasterDebugView_ = false |
| 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. | |
| uint32_t | currentFrame = 0u |
| Core::ApplicationContext * | context_ = nullptr |
| Headset * | headset_ = 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) | |
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.
RenderProcess.
Definition at line 76 of file Renderer.h.
|
explicit |
Constructor.
| context | The application context. |
| headset | The headset. |
| engine | pointer to the engine |
| Engine::Rendering::Renderer::~Renderer | ( | ) |
cleans up the object
| void Engine::Rendering::Renderer::advanceFrameIndices | ( | ) |
advances the frame indices for the next frame in flight
| void Engine::Rendering::Renderer::allocateDescriptors | ( | ) |
allocates the first batch of mesh data to the shaders
| std::runtime_error() | Thrown when functions dont resolve |
| void Engine::Rendering::Renderer::cleanup | ( | ) |
Cleans up all resources of the renderer.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void Engine::Rendering::Renderer::createVertexShaderPathResources | ( | ) |
|
private |
|
private |
| bool Engine::Rendering::Renderer::ensureOutputBufferSizes | ( | uint32_t | primitive_count | ) | const |
Calculates buffer sizes based on primitive count.
| primitive_count | number of primitives in the scene |
|
private |
Searches for the first existing pipeline which has the same vertex and fragment shader.
| meshShader | The vertex shader. |
| fragShader | The fragment shader. |
| pipelineData | Information describing the pipeline. |
| const std::unique_ptr< BufferManager > & Engine::Rendering::Renderer::getBufferManager | ( | ) | const |
Getter for the buffer manager of the renderer.
| const std::unique_ptr< ComputePassManager > & Engine::Rendering::Renderer::getComputePassManager | ( | ) | const |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
| RenderProcess * Engine::Rendering::Renderer::getCurrentRenderProcess | ( | ) | const |
Gets the render process of the current frame.
|
inlineprivate |
Definition at line 450 of file Renderer.h.
|
inlineprivate |
Definition at line 449 of file Renderer.h.
|
nodiscard |
Gets the current frame in flight and retrieves the transfer command buffer.
|
nodiscard |
|
inlinenodiscard |
Definition at line 371 of file Renderer.h.
References dynamicSunShadowResources_.
|
nodiscard |
Gets the elapsed time since markFrameStart() was called. Used to check if the current frame has taken too long.
| std::vector< VkCommandBuffer > Engine::Rendering::Renderer::getGraphicsCommandBuffers | ( | ) | const |
Gets all graphics command buffers from all owned render processes.
|
nodiscard |
gets the graphics command pool
| const std::vector< GraphicsPipeline * > & Engine::Rendering::Renderer::getGraphicsPipelines | ( | ) | const |
Gets the list of all graphics pipelines.
|
inlinenodiscard |
Gets the headset pointer.
Definition at line 367 of file Renderer.h.
References headset_.
|
inlinenodiscard |
Definition at line 369 of file Renderer.h.
References iblResources_.
| VkDependencyInfo Engine::Rendering::Renderer::getMeshletCullingDispatchToMeshletCullingBarriers | ( | ) | const |
| VkDependencyInfo Engine::Rendering::Renderer::getMeshletCullingToPrepareDrawBarriers | ( | ) | const |
| VkDependencyInfo Engine::Rendering::Renderer::getMeshletUnpackingDispatchToMeshletUnpackingBarriers | ( | Vulkan::BarrierBundle & | bundle | ) | const |
| VkDependencyInfo Engine::Rendering::Renderer::getMeshletUnpackingToMeshletCullingDispatchBarriers | ( | Vulkan::BarrierBundle & | bundle | ) | const |
|
nodiscard |
|
nodiscard |
| VkDependencyInfo Engine::Rendering::Renderer::getObjectCullingToMeshletUnpackingDispatchBarriers | ( | Vulkan::BarrierBundle & | bundle | ) | const |
|
nodiscard |
|
nodiscard |
|
static |
Gets the static configuration for a given pipeline type Returns shader paths and pipeline data for the given PipelineNames enum.
| pipelineName | The pipeline type enum |
| bool Engine::Rendering::Renderer::getPipelineIndex | ( | GraphicsPipeline * | pipeline, |
| uint32_t & | pipelineIndex ) const |
Gets the index of a pipeline.
| pipeline | The pipeline to get the index from |
| pipelineIndex | the index or if the pipeline does not exist value stays unchanged! |
| bool Engine::Rendering::Renderer::getPipelineIndex | ( | PipelineNames | pipelineName, |
| uint32_t & | pipelineIndex ) const |
Gets the pipeline index for a given PipelineNames enum.
| pipelineName | The pipeline type enum |
| pipelineIndex | the index or if the pipeline does not exist value stays unchanged! |
|
nodiscard |
|
nodiscard |
| const std::unique_ptr< Core::RenderingDataManager > & Engine::Rendering::Renderer::getRenderingDataManager | ( | ) | const |
Getter for the rendering data manager.
|
inlinenodiscard |
Gets all render processes for cleanup/synchronization.
Definition at line 261 of file Renderer.h.
References renderProcesses.
|
nodiscardprivate |
|
inlinenodiscard |
Definition at line 370 of file Renderer.h.
References sunShadowResources_.
| VkSemaphore Engine::Rendering::Renderer::getTimelineSemaphore | ( | ) | const |
Getter for the main timeline renderer semaphore.
| uint64_t Engine::Rendering::Renderer::getTimelineSemaphoreValue | ( | ) | const |
|
nodiscard |
Gets the timeline synchronizer for managing frame synchronization.
| std::vector< VkCommandBuffer > Engine::Rendering::Renderer::getTransferCommandBuffers | ( | ) | const |
|
nodiscard |
gets the command pool used for recording data transfer at the beginning of a frame
|
nodiscardprivate |
|
inlinenodiscard |
Definition at line 413 of file Renderer.h.
References worldUiRenderer_.
|
private |
| void Engine::Rendering::Renderer::initializeGpuBuffers | ( | ) | const |
|
private |
|
inlinenodiscard |
Checks if culling data is currently frozen.
Definition at line 390 of file Renderer.h.
References freezeCulling_.
|
nodiscard |
Checks if we're currently in stall recovery mode. During stall recovery, extra GPU synchronization should be performed.
|
inlinenodiscard |
Definition at line 393 of file Renderer.h.
References vertexShaderOnlyMode_.
| void Engine::Rendering::Renderer::markFrameStart | ( | ) |
Marks the start of a new frame for stall detection. Call this at the beginning of each render frame.
| void Engine::Rendering::Renderer::notifyMaterialLoaded | ( | Assets::Material * | material | ) | const |
| void Engine::Rendering::Renderer::prepareTransferSubmission | ( | uint32_t | frameIndex | ) | const |
|
private |
|
private |
| void Engine::Rendering::Renderer::recordRenderPass | ( | size_t | swapChainImageIndex | ) |
Records the main render pass using dynamic rendering.
| swapChainImageIndex | Index of the swapchain image for rendering |
|
private |
|
private |
|
private |
|
private |
|
private |
| void Engine::Rendering::Renderer::recordTonemapToSwapchain | ( | uint32_t | swapChainImageIndex | ) | const |
| void Engine::Rendering::Renderer::recordTransfer | ( | float | time | ) |
|
private |
|
private |
|
private |
|
inline |
Definition at line 402 of file Renderer.h.
References windTrailEmitterNode_.
| void Engine::Rendering::Renderer::renderToXr | ( | size_t | swapChainImageIndex, |
| float | time ) |
| void Engine::Rendering::Renderer::resetFrameTimer | ( | ) |
Resets the frame timer to prevent false stall detection. Call after long blocking operations (e.g. vkDeviceWaitIdle during state transitions) so that the next markFrameStart() doesn't see the blocking time as a stall.
| void Engine::Rendering::Renderer::resetMeshletCullingDispatchBuffers | ( | ) | const |
| void Engine::Rendering::Renderer::resetMeshletUnpackingDispatchBuffers | ( | ) |
|
private |
| void Engine::Rendering::Renderer::restartRenderCommandBuffers | ( | ) | const |
Resets the command buffers of the active frame and begins a new write.
| void Engine::Rendering::Renderer::setFreezeCulling | ( | bool | freeze | ) |
Freezes culling data (frustum planes, view-projection)
When frozen, the culling system continues to use the frustum 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.
| freeze | true to freeze culling data, false to resume updates |
| void Engine::Rendering::Renderer::setParallelLodSelection | ( | bool | enabled | ) | const |
|
inline |
Definition at line 398 of file Renderer.h.
References skipMeshShaderDraw_.
|
inline |
Definition at line 399 of file Renderer.h.
References skipVertexShaderDraw_.
|
inline |
Definition at line 400 of file Renderer.h.
References sunShadowCasterDebugView_.
|
inline |
Definition at line 405 of file Renderer.h.
References tracyContextManager_.
|
inline |
Definition at line 392 of file Renderer.h.
References vertexShaderOnlyMode_.
|
inline |
Definition at line 397 of file Renderer.h.
References useVSInstancedDrawing_.
|
nodiscard |
Checks if mirror view should be skipped this frame.
Returns true if:
When true due to stall, also performs vkDeviceWaitIdle to ensure clean GPU state.
| void Engine::Rendering::Renderer::submitGraphics | ( | uint32_t | swapChainImageIndex, |
| VkSemaphore | mirrorAcquireSemaphore = VK_NULL_HANDLE ) const |
| void Engine::Rendering::Renderer::submitInitialTransfers | ( | ) |
| void Engine::Rendering::Renderer::submitTransfer | ( | ) | const |
| void Engine::Rendering::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.
|
inline |
Definition at line 403 of file Renderer.h.
References windTrailEmitterNode_.
| void Engine::Rendering::Renderer::updateCpuRenderResources | ( | float | time | ) |
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, such as the meshlet unpacking resources.
Creates the compute pipeline for the meshlet culling stage. This should only be called after the meshlet culling shader has been created.
Updates all data for gpu frame buffers
| time | time for time based fragment shaders |
|
private |
| void Engine::Rendering::Renderer::updateViewMatrix | ( | ) | const |
Requests an update of the current render processes view matrix. The matrix is pulled from the headset.
| void Engine::Rendering::Renderer::uploadFrameData | ( | float | time | ) |
| void Engine::Rendering::Renderer::waitForPreviousFrame | ( | ) | const |
Waits for the previous frame's transfer to complete before writing to GPU buffers. Must be called BEFORE updateIfDirty() to prevent race conditions where the GPU is still reading from buffers while the CPU writes new data.
|
private |
Definition at line 541 of file Renderer.h.
|
private |
Definition at line 197 of file Renderer.h.
|
private |
Definition at line 638 of file Renderer.h.
|
private |
The pipeline layout.
Definition at line 637 of file Renderer.h.
|
private |
Definition at line 198 of file Renderer.h.
|
private |
Definition at line 658 of file Renderer.h.
|
private |
Definition at line 656 of file Renderer.h.
|
private |
Definition at line 569 of file Renderer.h.
|
private |
Definition at line 568 of file Renderer.h.
|
private |
The descriptor pool for all descriptors of the renderer.
Definition at line 515 of file Renderer.h.
|
private |
Definition at line 547 of file Renderer.h.
Referenced by getDynamicSunShadowResources().
|
private |
Definition at line 485 of file Renderer.h.
|
private |
Definition at line 661 of file Renderer.h.
|
private |
When true, culling data (frustum planes) is frozen for debugging.
Definition at line 601 of file Renderer.h.
Referenced by isFreezeCulling().
|
private |
Definition at line 607 of file Renderer.h.
|
private |
Definition at line 640 of file Renderer.h.
|
private |
The pipelines.
Definition at line 654 of file Renderer.h.
|
private |
Definition at line 659 of file Renderer.h.
Referenced by getHeadset().
|
private |
Definition at line 540 of file Renderer.h.
|
private |
Definition at line 539 of file Renderer.h.
Referenced by getIBLResources().
|
private |
Time when the last frame started, for stall detection.
Definition at line 469 of file Renderer.h.
|
private |
Definition at line 598 of file Renderer.h.
|
private |
Definition at line 596 of file Renderer.h.
|
private |
Definition at line 477 of file Renderer.h.
|
private |
Definition at line 480 of file Renderer.h.
|
private |
Definition at line 639 of file Renderer.h.
|
private |
Definition at line 632 of file Renderer.h.
|
private |
Definition at line 459 of file Renderer.h.
|
private |
Definition at line 663 of file Renderer.h.
|
private |
Definition at line 196 of file Renderer.h.
|
private |
The render processes.
Definition at line 645 of file Renderer.h.
Referenced by getRenderProcesses().
|
staticconstexprprivate |
Number of frames to skip after detecting a stall (covers all swapchain images)
Definition at line 466 of file Renderer.h.
|
private |
Definition at line 603 of file Renderer.h.
Referenced by setSkipMeshShaderDraw().
|
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 463 of file Renderer.h.
|
private |
Definition at line 604 of file Renderer.h.
Referenced by setSkipVertexShaderDraw().
|
private |
Definition at line 575 of file Renderer.h.
|
private |
Definition at line 576 of file Renderer.h.
|
staticconstexprprivate |
Threshold for considering a frame as "stalled" (1 second)
Definition at line 472 of file Renderer.h.
|
private |
Definition at line 549 of file Renderer.h.
|
private |
Definition at line 548 of file Renderer.h.
|
private |
Definition at line 605 of file Renderer.h.
Referenced by setSunShadowCasterDebugView().
|
private |
Definition at line 551 of file Renderer.h.
|
private |
Definition at line 550 of file Renderer.h.
|
private |
Definition at line 546 of file Renderer.h.
Referenced by getSunShadowResources().
|
private |
Definition at line 552 of file Renderer.h.
|
private |
Definition at line 474 of file Renderer.h.
|
private |
Definition at line 453 of file Renderer.h.
|
private |
Definition at line 589 of file Renderer.h.
|
private |
Definition at line 588 of file Renderer.h.
|
private |
Definition at line 591 of file Renderer.h.
|
private |
Definition at line 590 of file Renderer.h.
|
private |
Definition at line 443 of file Renderer.h.
Referenced by setTracyContextManager().
|
private |
Definition at line 522 of file Renderer.h.
|
private |
Definition at line 528 of file Renderer.h.
Referenced by setVSInstancedDrawing().
|
private |
Definition at line 523 of file Renderer.h.
Referenced by isVertexShaderOnlyMode(), and setVertexShaderOnlyMode().
|
private |
The graphics and present command pool.
Definition at line 505 of file Renderer.h.
|
private |
The transfer command pool for all commands submitted to the transfer queue.
Definition at line 510 of file Renderer.h.
|
private |
Definition at line 520 of file Renderer.h.
|
private |
Definition at line 521 of file Renderer.h.
|
private |
Definition at line 483 of file Renderer.h.
|
private |
Definition at line 554 of file Renderer.h.
|
private |
Definition at line 553 of file Renderer.h.
|
private |
Definition at line 555 of file Renderer.h.
|
private |
Definition at line 597 of file Renderer.h.
Referenced by registerWindTrailEmitter(), and unregisterWindTrailEmitter().
|
private |
Definition at line 454 of file Renderer.h.
Referenced by getWorldUiRenderer().