|
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... | |
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 VulkanBuffer & | getObjectCullingDataBuffer () const |
| const VulkanBuffer & | getObjectMeshletDataBuffer () const |
| const VulkanBuffer & | getObjectIDsBuffer () const |
| const VulkanBuffer & | getCounterBuffer () const |
| const VulkanBuffer & | getDispatchBuffer () const |
| const VulkanBuffer & | getMeshUnpackingDataBuffer () const |
| const VulkanBuffer & | getPlaceholderBuffer () const |
| const VulkanBuffer & | getPlaceholderUniformBuffer () 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. | |
| 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. | |
| 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. | |
| void | setFreezeCulling (bool freeze) |
| Freezes culling data (frustum planes, Hi-Z view-projection) | |
| bool | isFreezeCulling () const |
| Checks if culling data is currently frozen. | |
| const TimelineSynchronizer & | getTimelineSynchronizer () 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. | |
| ComputePass & | getObjectCullingComputePass () |
| ComputePass & | getBinningAllocatorComputePass () |
| DispatcherComputePass & | getMeshletUnpackingDispatchComputePass () |
| ComputePass & | getMeshletUnpackingComputePass () |
| DispatcherComputePass & | getMeshletCullingDispatchComputePass () |
| ComputePass & | getMeshletCullingComputePass () |
| ComputePass & | getDrawPreparationComputePass () |
| ComputePass & | getVSBinningAllocatorComputePass () |
| ComputePass & | getVSInstanceUnpackingComputePass () |
| ComputePass & | getVSPrepareDrawComputePass () |
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 Attributes | |
| std::unique_ptr< RenderingDataManager > | renderingDataManager |
| std::optional< VulkanBuffer > | objectCullingDataBuffer |
| std::optional< VulkanBuffer > | objectMeshletDataBuffer |
| std::optional< VulkanBuffer > | objectIDsBuffer |
| std::optional< VulkanBuffer > | meshUnpackingDataBuffer |
| std::optional< VulkanBuffer > | counterBuffer |
| std::optional< VulkanBuffer > | dispatchBuffer |
| std::optional< VulkanBuffer > | placeholderBuffer |
| std::optional< VulkanBuffer > | placeholderUniformBuffer |
| std::unique_ptr< TimelineSynchronizer > | timelineSynchronizer_ |
| 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< VulkanStagedBufferSyncObjects > | syncCopyObjects {} |
| BS_tracy::tracy_thread_pool< BS_tracy::tp::none > | updateThreadPool |
| std::unordered_map< GraphicsPipeline *, uint32_t > | pipelineIndices |
| std::unordered_map< PipelineNames, GraphicsPipeline * > | pipelinesByName |
| const Engine * | 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::optional< ComputePass > | objectCullingComputePass |
| The descriptor set layout. | |
| std::optional< ComputePass > | binningAllocatorComputePass |
| Stage 1: Binning allocator. | |
| std::optional< DispatcherComputePass > | meshletUnpackingDispatchComputePass |
| std::optional< ComputePass > | meshletUnpackingComputePass |
| std::optional< DispatcherComputePass > | meshletCullingDispatchComputePass |
| std::optional< ComputePass > | meshletCullingComputePass |
| std::optional< ComputePass > | drawPreparationComputePass |
| std::optional< ComputePass > | primitiveCulling |
| std::optional< ComputePass > | primitiveBinning |
| std::optional< ComputePass > | meshletUnpacking |
| std::optional< ComputePass > | drawPreparation |
| std::optional< ComputePass > | hiZGenerationComputePass |
| std::array< std::array< VkDescriptorSet, MAX_HIZ_MIP_LEVELS >, MAX_FRAMES_IN_FLIGHT > | hiZMipDescriptorSets {} |
| VkDescriptorPool | hiZDescriptorPool = VK_NULL_HANDLE |
| std::optional< ComputePass > | hiZSPDComputePass |
| std::optional< VulkanBuffer > | hiZSPDAtomicBuffer |
| std::array< VkDescriptorSet, MAX_FRAMES_IN_FLIGHT > | hiZSPDDescriptorSets {} |
| bool | useSPDHiZ_ = false |
| VkPipeline | vsGraphicsPipeline_ = VK_NULL_HANDLE |
| VkPipelineLayout | vsPipelineLayout_ = VK_NULL_HANDLE |
| bool | useVertexShaderPath_ = true |
| std::optional< ComputePass > | vsBinningAllocatorComputePass_ |
| std::optional< ComputePass > | vsInstanceUnpackingComputePass_ |
| std::optional< ComputePass > | vsPrepareDrawComputePass_ |
| 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 |
| 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) | |
| static constexpr uint32_t | MAX_HIZ_MIP_LEVELS = 16 |
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.
Definition at line 71 of file Renderer.h.
|
explicit |
Constructor.
| context | The application context. |
| headset | The headset. |
| engine | pointer to the engine |
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.
| EngineCore::Renderer::~Renderer | ( | ) |
cleans up the object
Definition at line 202 of file Renderer.cpp.
References cleanup().
| void EngineCore::Renderer::advanceFrameIndices | ( | ) |
advances the frame indices for the next frame in flight
Definition at line 1838 of file Renderer.cpp.
References currentFrame, MAX_FRAMES_IN_FLIGHT, and renderedFrameCounter.
| void EngineCore::Renderer::allocateDescriptors | ( | ) |
allocates the first batch of mesh data to the shaders
| 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.
| void EngineCore::Renderer::cleanup | ( | ) |
Cleans up all resources of the renderer.
Definition at line 1666 of file Renderer.cpp.
References computeObjectCullingPipelineLayout, context, counterBuffer, depthOnlyGraphicsPipelines, descriptorPool, dispatchBuffer, graphicsDescriptorSetLayout, graphicsPipelineLayout, graphicsPipelines, hiZDescriptorPool, meshUnpackingDataBuffer, objectCullingDataBuffer, objectIDsBuffer, objectMeshletDataBuffer, placeholderBuffer, placeholderUniformBuffer, prepareDrawsComputePipelineLayout, renderFinishedSemaphores, renderProcesses, timelineSynchronizer_, TRACY_ZONE_SCOPED_NAMED, vkGraphicsCommandPool, vkTransferCommandPool, vsDepthOnlyPipeline_, and vsGraphicsPipeline_.
Referenced by ~Renderer().
| void EngineCore::Renderer::createBinningAllocatorResources | ( | ) |
Definition at line 2173 of file Renderer.cpp.
References EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::ShaderStage::PrimitiveBinning::BINNING_ALLOCATIONS, EngineCore::ShaderStage::PrimitiveBinning::BINNING_CULLING_SURVIVORS, EngineCore::ShaderStage::PrimitiveBinning::BINNING_PIPELINE_COUNTERS, EngineCore::ShaderStage::PrimitiveBinning::BINNING_PRIMITIVE_MESHLET_DATA, EngineCore::ShaderStage::PrimitiveBinning::BINNING_SURVIVOR_COUNT, binningAllocatorComputePass, EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), and TRACY_ZONE_SCOPED_NAMED.
|
private |
Definition at line 4612 of file Renderer.cpp.
References context, and counterBuffer.
|
private |
Definition at line 4589 of file Renderer.cpp.
References context, and dispatchBuffer.
| 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.
|
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().
|
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().
|
private |
Definition at line 2602 of file Renderer.cpp.
References EngineCore::DescriptorSetLayoutBuilder::addCombinedImageSampler(), EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::DescriptorSetLayoutBuilder::addStorageImage(), EngineCore::DescriptorSetLayoutBuilder::addStorageImageArray(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), hiZSPDAtomicBuffer, hiZSPDComputePass, and TRACY_ZONE_SCOPED_NAMED.
| 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.
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.
| void EngineCore::Renderer::createMeshletCullingResources | ( | ) |
Definition at line 2336 of file Renderer.cpp.
References EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::DescriptorSetLayoutBuilder::addUniformBuffer(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), EngineCore::ShaderStage::MeshletCulling::MESHLET_CULLING_BINNED_RENDERING, EngineCore::ShaderStage::MeshletCulling::MESHLET_CULLING_BOUNDS, EngineCore::ShaderStage::MeshletCulling::MESHLET_CULLING_COUNTS, EngineCore::ShaderStage::MeshletCulling::MESHLET_CULLING_FRUSTUM_PLANES, EngineCore::ShaderStage::MeshletCulling::MESHLET_CULLING_INDICES, meshletCullingComputePass, and TRACY_ZONE_SCOPED_NAMED.
| 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()
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.
| void EngineCore::Renderer::createMeshletUnpackingResources | ( | ) |
Definition at line 2292 of file Renderer.cpp.
References EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, EngineCore::Path::engineShaders(), meshletUnpackingComputePass, EngineCore::ShaderStage::MeshletUnpackingV2::UNPACKING_ALLOCATIONS, EngineCore::ShaderStage::MeshletUnpackingV2::UNPACKING_BIN_OFFSETS, EngineCore::ShaderStage::MeshletUnpackingV2::UNPACKING_OUTPUT, and EngineCore::ShaderStage::MeshletUnpackingV2::UNPACKING_SURVIVOR_COUNT.
|
private |
Definition at line 4643 of file Renderer.cpp.
References context, and meshUnpackingDataBuffer.
|
private |
Definition at line 4627 of file Renderer.cpp.
References context, and objectCullingDataBuffer.
|
private |
Definition at line 4619 of file Renderer.cpp.
References context, and objectIDsBuffer.
|
private |
Definition at line 4635 of file Renderer.cpp.
References context, and objectMeshletDataBuffer.
|
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.
|
private |
Definition at line 4604 of file Renderer.cpp.
References context, and placeholderUniformBuffer.
| void EngineCore::Renderer::createPrepareDrawResources | ( | ) |
Definition at line 2380 of file Renderer.cpp.
References EngineCore::DescriptorSetLayoutBuilder::addStorageBuffer(), EngineCore::DescriptorSetLayoutBuilder::build(), COMPUTE_SHADER_NAME, context, drawPreparationComputePass, EngineCore::Path::engineShaders(), MAX_PIPELINES, EngineCore::ShaderStage::PrepareDraw::PREPARE_DRAW_INDIRECT_DRAW, EngineCore::ShaderStage::PrepareDraw::PREPARE_DRAW_MESHLET_COUNTER, and TRACY_ZONE_SCOPED_NAMED.
| 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.
| 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().
|
private |
|
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().
| 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.
| primitiveCount | The number of primitives in the scene |
Definition at line 4690 of file Renderer.cpp.
References meshUnpackingDataBuffer, objectCullingDataBuffer, objectIDsBuffer, objectMeshletDataBuffer, and renderProcesses.
Referenced by EngineCore::RenderingDataManager::updatePrimitiveData(), and EngineCore::RenderingDataManager::updatePrimitiveDataInstanced().
|
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. |
Definition at line 2016 of file Renderer.cpp.
References graphicsPipelines.
| ComputePass & EngineCore::Renderer::getBinningAllocatorComputePass | ( | ) |
Definition at line 2043 of file Renderer.cpp.
References binningAllocatorComputePass.
Referenced by recordPass2Culling(), and renderToXr().
|
nodiscard |
Definition at line 4666 of file Renderer.cpp.
References counterBuffer.
|
nodiscard |
Definition at line 1636 of file Renderer.cpp.
References getCurrentRenderProcess(), and EngineCore::RenderProcess::getMirrorViewImageSemaphore().
|
nodiscard |
Definition at line 1641 of file Renderer.cpp.
References renderFinishedSemaphores.
|
nodiscard |
Definition at line 1631 of file Renderer.cpp.
References getCurrentRenderProcess(), and EngineCore::RenderProcess::getGraphicsCommandBuffer().
Referenced by recordXrSwapchainImageFinishedWritingBarrier(), renderToXr(), resetMeshletCullingDispatchBuffers(), and resetMeshletUnpackingDispatchBuffers().
| RenderProcess * EngineCore::Renderer::getCurrentRenderProcess | ( | ) | const |
Gets the render process of the current frame.
Definition at line 1781 of file Renderer.cpp.
References currentFrame, and renderProcesses.
Referenced by EngineCore::Texture::createDataUploadCommand(), getCurrentMirrorViewSemaphore(), getCurrentRenderingCommandBuffer(), getCurrentTransferCommandBuffer(), getMeshletCullingToPrepareDrawBarriers(), getMeshletUnpackingToMeshletCullingDispatchBarriers(), recordHiZGeneration(), recordHiZGenerationSPD(), recordPass2Culling(), recordPass2RenderPass(), recordRenderPass(), recordTransfer(), recordVertexShaderDraws(), recordVertexShaderDrawsDepthOnly(), recordVSInstancedDrawingPipeline(), recordXrSwapchainImageWritableBarrier(), renderToXr(), resetMeshletCullingDispatchBuffers(), restartRenderCommandBuffers(), submitGraphics(), updateCpuRenderResources(), and updateViewMatrix().
|
inlineprivate |
Definition at line 548 of file Renderer.h.
Referenced by prepareTransferSubmission(), recordHiZGeneration(), recordHiZGenerationSPD(), recordPass2Culling(), recordPass2RenderPass(), recordRenderPass(), recordTransfer(), recordVertexShaderDraws(), recordVertexShaderDrawsDepthOnly(), recordVSInstancedDrawingPipeline(), and renderToXr().
|
nodiscard |
Gets the current frame in flight and retrieves the transfer command buffer.
Definition at line 1626 of file Renderer.cpp.
References getCurrentRenderProcess(), and EngineCore::RenderProcess::getTransferCommandBuffer().
Referenced by submitInitialTransfers().
|
nodiscard |
Definition at line 4671 of file Renderer.cpp.
References dispatchBuffer.
Referenced by recordPass2Culling(), and renderToXr().
| ComputePass & EngineCore::Renderer::getDrawPreparationComputePass | ( | ) |
Definition at line 2077 of file Renderer.cpp.
References drawPreparationComputePass.
Referenced by recordPass2Culling(), and renderToXr().
|
nodiscard |
Gets the elapsed time since markFrameStart() was called. Used to check if the current frame has taken too long.
Definition at line 1923 of file Renderer.cpp.
References lastFrameStartTime_.
| std::vector< VkCommandBuffer > EngineCore::Renderer::getGraphicsCommandBuffers | ( | ) | const |
Gets all graphics command buffers from all owned EngineCore::RenderProcess.
Definition at line 1646 of file Renderer.cpp.
References renderProcesses.
|
nodiscard |
gets the graphics command pool
Definition at line 1656 of file Renderer.cpp.
References vkGraphicsCommandPool.
Referenced by initializeXrSwapchainFormats().
| const std::vector< GraphicsPipeline * > & EngineCore::Renderer::getGraphicsPipelines | ( | ) | const |
Gets the list of all graphics pipelines.
Definition at line 1944 of file Renderer.cpp.
References graphicsPipelines.
|
inlinenodiscard |
Gets the headset pointer.
Definition at line 443 of file Renderer.h.
References headset.
| ComputePass & EngineCore::Renderer::getMeshletCullingComputePass | ( | ) |
Definition at line 2070 of file Renderer.cpp.
References meshletCullingComputePass.
| DispatcherComputePass & EngineCore::Renderer::getMeshletCullingDispatchComputePass | ( | ) |
Definition at line 2063 of file Renderer.cpp.
References meshletCullingDispatchComputePass.
| VkDependencyInfo EngineCore::Renderer::getMeshletCullingDispatchToMeshletCullingBarriers | ( | ) |
Definition at line 4776 of file Renderer.cpp.
References Vulkan::BarrierBundle::addComputeBufferBarrier(), Vulkan::BarrierBundle::clear(), dispatchBuffer, and Vulkan::BarrierBundle::getDependencyInfo().
| VkDependencyInfo EngineCore::Renderer::getMeshletCullingToPrepareDrawBarriers | ( | ) |
Definition at line 4794 of file Renderer.cpp.
References Vulkan::BarrierBundle::addComputeBufferBarrier(), Vulkan::BarrierBundle::clear(), getCurrentRenderProcess(), and Vulkan::BarrierBundle::getDependencyInfo().
| ComputePass & EngineCore::Renderer::getMeshletUnpackingComputePass | ( | ) |
Definition at line 2056 of file Renderer.cpp.
References meshletUnpackingComputePass.
Referenced by recordPass2Culling(), and renderToXr().
| DispatcherComputePass & EngineCore::Renderer::getMeshletUnpackingDispatchComputePass | ( | ) |
Definition at line 2049 of file Renderer.cpp.
References meshletUnpackingDispatchComputePass.
Referenced by recordPass2Culling(), and renderToXr().
| 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().
| VkDependencyInfo EngineCore::Renderer::getMeshletUnpackingToMeshletCullingDispatchBarriers | ( | Vulkan::BarrierBundle & | bundle | ) |
Definition at line 4761 of file Renderer.cpp.
References Vulkan::BarrierBundle::addComputeBufferBarrier(), getCurrentRenderProcess(), and Vulkan::BarrierBundle::getDependencyInfo().
|
nodiscard |
Definition at line 4675 of file Renderer.cpp.
References meshUnpackingDataBuffer.
| ComputePass & EngineCore::Renderer::getObjectCullingComputePass | ( | ) |
Definition at line 2037 of file Renderer.cpp.
References objectCullingComputePass.
Referenced by recordPass2Culling(), and renderToXr().
|
nodiscard |
Definition at line 4651 of file Renderer.cpp.
References objectCullingDataBuffer.
| 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().
|
nodiscard |
Definition at line 4661 of file Renderer.cpp.
References objectIDsBuffer.
|
nodiscard |
Definition at line 4656 of file Renderer.cpp.
References objectMeshletDataBuffer.
|
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 |
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().
| bool EngineCore::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! |
Definition at line 4866 of file Renderer.cpp.
References pipelineIndices.
Referenced by getPipelineIndex(), EngineCore::RenderingDataManager::updatePrimitiveData(), and EngineCore::RenderingDataManager::updatePrimitiveDataInstanced().
| bool EngineCore::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! |
Definition at line 4877 of file Renderer.cpp.
References getPipelineIndex(), and pipelinesByName.
|
nodiscard |
Definition at line 4680 of file Renderer.cpp.
References placeholderBuffer.
|
nodiscard |
Definition at line 4685 of file Renderer.cpp.
References placeholderUniformBuffer.
| const std::unique_ptr< RenderingDataManager > & EngineCore::Renderer::getRenderingDataManager | ( | ) | const |
Getter for the rendering data manager.
Definition at line 4584 of file Renderer.cpp.
References renderingDataManager.
Referenced by EngineCore::MeshComponent::beginPlay().
|
inlinenodiscard |
Gets all render processes for cleanup/synchronization.
Definition at line 305 of file Renderer.h.
References renderProcesses.
| VkSemaphore EngineCore::Renderer::getTimelineSemaphore | ( | ) | const |
Getter for the main timeline renderer semaphore.
Definition at line 1934 of file Renderer.cpp.
References timelineSynchronizer_.
| uint64_t EngineCore::Renderer::getTimelineSemaphoreValue | ( | ) | const |
Definition at line 1621 of file Renderer.cpp.
References timelineSynchronizer_.
|
nodiscard |
Gets the timeline synchronizer for managing frame synchronization.
Definition at line 1939 of file Renderer.cpp.
References timelineSynchronizer_.
|
nodiscard |
gets the command pool used for recording data transfer at the beginning of a frame
Definition at line 1661 of file Renderer.cpp.
References vkTransferCommandPool.
| ComputePass & EngineCore::Renderer::getVSBinningAllocatorComputePass | ( | ) |
Definition at line 2084 of file Renderer.cpp.
References vsBinningAllocatorComputePass_.
Referenced by recordVSInstancedDrawingPipeline().
| ComputePass & EngineCore::Renderer::getVSInstanceUnpackingComputePass | ( | ) |
Definition at line 2091 of file Renderer.cpp.
References vsInstanceUnpackingComputePass_.
Referenced by recordVSInstancedDrawingPipeline().
| ComputePass & EngineCore::Renderer::getVSPrepareDrawComputePass | ( | ) |
Definition at line 2098 of file Renderer.cpp.
References vsPrepareDrawComputePass_.
Referenced by recordVSInstancedDrawingPipeline().
|
private |
Definition at line 1786 of file Renderer.cpp.
References currentFrame, and renderedFrameCounter.
| void EngineCore::Renderer::initializeGpuBuffers | ( | ) | const |
Definition at line 557 of file Renderer.cpp.
References engine, renderProcesses, and TRACY_ZONE_SCOPED_NAMED.
|
private |
Definition at line 1793 of file Renderer.cpp.
References VulkanHelper::beginSingleTimeCommands(), context, VulkanHelper::endSingleTimeCommands(), getGraphicsCommandPool(), and headset.
|
inlinenodiscard |
Checks if culling data is currently frozen.
Definition at line 468 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.
Definition at line 1929 of file Renderer.cpp.
References skipMirrorFramesRemaining_.
| void EngineCore::Renderer::markFrameStart | ( | ) |
Marks the start of a new frame for stall detection. Call this at the beginning of each render frame.
Definition at line 1892 of file Renderer.cpp.
References context, lastFrameStartTime_, SKIP_FRAMES_AFTER_STALL, skipMirrorFramesRemaining_, STALL_THRESHOLD_MS, and syncTimelineAfterPause().
| 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().
| 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().
|
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().
| 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.
| swapChainImageIndex | Index 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().
| 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.
| swapChainImageIndex | Index 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().
| void EngineCore::Renderer::recordRenderPass | ( | size_t | swapChainImageIndex | ) |
Definition at line 4375 of file Renderer.cpp.
References depthOnlyGraphicsPipelines, EngineCore::VulkanBuffer::getBuffer(), getCurrentRenderProcess(), getCurrentTracyVkContext(), VulkanHelper::getFunctions(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getGraphicsDescriptorSet(), EngineCore::RenderProcess::getIndirectDrawBuffer(), GRAPHICS_GUARD, graphicsPipelineLayout, Colors::Green, headset, MAX_MESHLETS_PER_BIN, recordVertexShaderDrawsDepthOnly(), TRACY_VK_ZONE_C, TRACY_ZONE_SCOPED_NAMED, VulkanFunctions::vkCmdBeginConditionalRenderingEXT, VulkanFunctions::vkCmdDrawMeshTasksIndirectEXT, and VulkanFunctions::vkCmdEndConditionalRenderingEXT.
Referenced by renderToXr().
| 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.
|
private |
Definition at line 3630 of file Renderer.cpp.
References Colors::Cyan, EngineCore::VulkanBuffer::getBuffer(), getCurrentRenderProcess(), getCurrentTracyVkContext(), EngineCore::RenderProcess::getEyeIndex(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getGraphicsDescriptorSet(), EngineCore::RenderProcess::getVSDrawCommandsBuffer(), EngineCore::RenderProcess::getVSDrawCountBuffer(), EngineCore::RenderProcess::getVSIndirectDrawBuffer(), EngineCore::RenderProcess::getVSIndirectDrawCountBuffer(), graphicsPipelineLayout, renderingDataManager, TRACY_VK_ZONE_C, TRACY_ZONE_SCOPED_NAMED, useVertexShaderPath_, useVSInstancedDrawing_, vsBinningAllocatorComputePass_, and vsGraphicsPipeline_.
Referenced by recordPass2RenderPass().
|
private |
Definition at line 3746 of file Renderer.cpp.
References Colors::Cyan, EngineCore::VulkanBuffer::getBuffer(), getCurrentRenderProcess(), getCurrentTracyVkContext(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getGraphicsDescriptorSet(), EngineCore::RenderProcess::getVSDrawCommandsBuffer(), EngineCore::RenderProcess::getVSDrawCountBuffer(), EngineCore::RenderProcess::getVSIndirectDrawBuffer(), EngineCore::RenderProcess::getVSIndirectDrawCountBuffer(), graphicsPipelineLayout, renderingDataManager, TRACY_VK_ZONE_C, TRACY_ZONE_SCOPED_NAMED, useVertexShaderPath_, useVSInstancedDrawing_, vsBinningAllocatorComputePass_, and vsDepthOnlyPipeline_.
Referenced by recordRenderPass().
|
private |
Definition at line 3496 of file Renderer.cpp.
References EngineCore::ComputePipeline::bind(), EngineCore::ComputePass::bindDescriptorSets(), COMPUTE_GUARD, EngineCore::ComputePass::createPushConstantsInfo(), Colors::Cyan, EngineCore::VulkanBuffer::getBuffer(), EngineCore::ComputePass::getComputePipeline(), getCurrentRenderProcess(), getCurrentTracyVkContext(), EngineCore::RenderProcess::getEyeIndex(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::ComputePass::getThreadCount(), getVSBinningAllocatorComputePass(), EngineCore::RenderProcess::getVSDrawCountBuffer(), EngineCore::RenderProcess::getVSGeometryCountersBuffer(), getVSInstanceUnpackingComputePass(), getVSPrepareDrawComputePass(), renderingDataManager, TRACY_VK_ZONE_C, useVSInstancedDrawing_, and vsBinningAllocatorComputePass_.
Referenced by renderToXr().
| 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().
| 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().
| 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.
| void EngineCore::Renderer::resetMeshletCullingDispatchBuffers | ( | ) |
Definition at line 4835 of file Renderer.cpp.
References EngineCore::VulkanBuffer::getBuffer(), getCurrentRenderingCommandBuffer(), getCurrentRenderProcess(), and EngineCore::RenderProcess::getMeshletCounterBuffer().
| void EngineCore::Renderer::resetMeshletUnpackingDispatchBuffers | ( | ) |
Definition at line 4812 of file Renderer.cpp.
References counterBuffer, and getCurrentRenderingCommandBuffer().
| void EngineCore::Renderer::restartRenderCommandBuffers | ( | ) | const |
Resets the command buffers of the active frame and begins a new write.
Definition at line 4331 of file Renderer.cpp.
References getCurrentRenderProcess(), and TRACY_ZONE_SCOPED_NAMED.
Referenced by renderToXr().
| 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.
| freeze | true to freeze culling data, false to resume updates |
Definition at line 713 of file Renderer.cpp.
References freezeCulling_.
|
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.
Definition at line 1879 of file Renderer.cpp.
References skipMirrorFramesRemaining_.
| void EngineCore::Renderer::submitGraphics | ( | uint32_t | swapChainImageIndex, |
| VkSemaphore | mirrorAcquireSemaphore = VK_NULL_HANDLE ) |
Definition at line 1546 of file Renderer.cpp.
References context, getCurrentRenderProcess(), EngineCore::RenderProcess::getGraphicsCommandBuffer(), EngineCore::RenderProcess::getGraphicsCompleteFence(), EngineCore::GraphicsComplete, renderedFrameCounter, renderFinishedSemaphores, EngineCore::RenderProcess::setGraphicsFenceSubmitted(), EngineCore::QueueSubmitBuilder::signalBinary(), EngineCore::QueueSubmitBuilder::signalStage(), EngineCore::QueueSubmitBuilder::submit(), timelineSynchronizer_, TRACY_ZONE_SCOPED_NAMED, EngineCore::TransferComplete, EngineCore::QueueSubmitBuilder::waitForBinary(), EngineCore::QueueSubmitBuilder::waitForCurrent(), EngineCore::QueueSubmitBuilder::waitForPrevious(), and EngineCore::QueueSubmitBuilder::withCommandBuffer().
| void EngineCore::Renderer::submitInitialTransfers | ( | ) |
Definition at line 1434 of file Renderer.cpp.
References context, getCurrentTransferCommandBuffer(), EngineCore::RenderProcess::getTransferCompleteFence(), MAX_FRAMES_IN_FLIGHT, prepareTransferSubmission(), renderedFrameCounter, renderProcesses, EngineCore::RenderProcess::setTransferFenceSubmitted(), EngineCore::QueueSubmitBuilder::signalStage(), EngineCore::QueueSubmitBuilder::submit(), timelineSynchronizer_, TRACY_ZONE_SCOPED_NAMED, EngineCore::TransferComplete, and EngineCore::QueueSubmitBuilder::withCommandBuffer().
| void EngineCore::Renderer::submitTransfer | ( | ) |
Definition at line 1491 of file Renderer.cpp.
References EngineCore::RenderProcess::cleanupStagingBuffer(), context, currentFrame, EngineCore::RenderProcess::getTransferCommandBuffer(), EngineCore::RenderProcess::getTransferCompleteFence(), EngineCore::RenderProcess::getTransferFenceSubmitted(), EngineCore::GraphicsComplete, renderedFrameCounter, renderingDataManager, renderProcesses, EngineCore::RenderProcess::setTransferFenceSubmitted(), EngineCore::QueueSubmitBuilder::signalStage(), EngineCore::QueueSubmitBuilder::submit(), timelineSynchronizer_, TRACY_ZONE_SCOPED_NAMED, EngineCore::TransferComplete, EngineCore::QueueSubmitBuilder::waitForResourceReuse(), and EngineCore::QueueSubmitBuilder::withCommandBuffer().
| 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.
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().
| void EngineCore::Renderer::updateCpuRenderResources | ( | float | time | ) |
Updates all data for gpu frame buffers.
| time | time for time based fragment shaders |
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().
|
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().
|
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().
| void EngineCore::Renderer::updateViewMatrix | ( | ) |
Requests an update of the current render processes view matrix. The matrix is pulled from the headset.
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().
| void EngineCore::Renderer::uploadFrameData | ( | float | time | ) |
Definition at line 719 of file Renderer.cpp.
References TRACY_ZONE_SCOPED_FUNCTION, and updateCpuRenderResources().
|
private |
Stage 1: Binning allocator.
Definition at line 626 of file Renderer.h.
Referenced by createBinningAllocatorResources(), and getBinningAllocatorComputePass().
|
private |
Definition at line 741 of file Renderer.h.
|
private |
|
private |
Definition at line 766 of file Renderer.h.
Referenced by allocateDescriptors(), cleanup(), createBinningAllocatorResources(), createCounterBuffer(), createDispatchBuffer(), createHiZGenerationResources(), createHiZMipDescriptorSets(), createHiZSPDDescriptorSets(), createHiZSPDResources(), createMeshletCullingDispatcherResources(), createMeshletCullingResources(), createMeshletUnpackingDispatcherResources(), createMeshletUnpackingResources(), createMeshUnpackingDataBuffer(), createObjectCullingDataBuffer(), createObjectIDsBuffer(), createObjectMeshletDataBuffer(), createPlaceholderBuffer(), createPlaceholderUniformBuffer(), createPrepareDrawResources(), createPrimitiveCullingResources(), createVertexShaderPathResources(), createVSInstancedDrawingResources(), initializeXrSwapchainFormats(), markFrameStart(), prepareTransferSubmission(), recordHiZGeneration(), recordHiZGenerationSPD(), recordTransfer(), Renderer(), submitGraphics(), submitInitialTransfers(), submitTransfer(), updateHiZMipDescriptorSets(), and updateHiZSPDDescriptorSets().
|
private |
Definition at line 221 of file Renderer.h.
Referenced by cleanup(), createCounterBuffer(), getCounterBuffer(), getObjectCullingToMeshletUnpackingDispatchBarriers(), renderToXr(), and resetMeshletUnpackingDispatchBuffers().
|
private |
Definition at line 764 of file Renderer.h.
Referenced by advanceFrameIndices(), getCurrentRenderProcess(), initializeFrameIndices(), recordHiZGeneration(), recordHiZGenerationSPD(), recordXrSwapchainImageWritableBarrier(), renderToXr(), submitTransfer(), and syncTimelineAfterPause().
|
private |
Definition at line 761 of file Renderer.h.
Referenced by allocateDescriptors(), cleanup(), and recordRenderPass().
|
private |
The descriptor pool for all descriptors of the renderer.
Definition at line 620 of file Renderer.h.
Referenced by allocateDescriptors(), and cleanup().
|
private |
Definition at line 222 of file Renderer.h.
Referenced by cleanup(), createDispatchBuffer(), getDispatchBuffer(), getMeshletCullingDispatchToMeshletCullingBarriers(), and getMeshletUnpackingDispatchToMeshletUnpackingBarriers().
|
private |
Definition at line 636 of file Renderer.h.
|
private |
Definition at line 631 of file Renderer.h.
Referenced by createPrepareDrawResources(), and getDrawPreparationComputePass().
|
private |
Definition at line 581 of file Renderer.h.
Referenced by allocateDescriptors(), initializeGpuBuffers(), Renderer(), and renderToXr().
|
private |
Definition at line 769 of file Renderer.h.
|
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().
|
private |
Definition at line 707 of file Renderer.h.
Referenced by allocateDescriptors(), and cleanup().
|
private |
Definition at line 743 of file Renderer.h.
Referenced by allocateDescriptors(), cleanup(), createVertexShaderPathResources(), recordPass2RenderPass(), recordRenderPass(), recordVertexShaderDraws(), and recordVertexShaderDrawsDepthOnly().
|
private |
The pipelines.
Definition at line 757 of file Renderer.h.
Referenced by allocateDescriptors(), cleanup(), findExistingPipeline(), getGraphicsPipelines(), and recordPass2RenderPass().
|
private |
Definition at line 767 of file Renderer.h.
Referenced by allocateDescriptors(), createHiZMipDescriptorSets(), getHeadset(), initializeXrSwapchainFormats(), recordPass2RenderPass(), recordRenderPass(), recordXrSwapchainImageFinishedWritingBarrier(), recordXrSwapchainImageWritableBarrier(), Renderer(), renderToXr(), updateHiZMipDescriptorSets(), updateHiZSPDDescriptorSets(), and updateViewMatrix().
|
private |
Definition at line 645 of file Renderer.h.
Referenced by cleanup(), and createHiZMipDescriptorSets().
|
private |
Definition at line 639 of file Renderer.h.
Referenced by createHiZGenerationResources(), createHiZMipDescriptorSets(), recordHiZGeneration(), and updateHiZMipDescriptorSets().
|
private |
Definition at line 644 of file Renderer.h.
Referenced by createHiZMipDescriptorSets(), recordHiZGeneration(), and updateHiZMipDescriptorSets().
|
private |
Definition at line 649 of file Renderer.h.
Referenced by createHiZSPDResources(), and updateHiZSPDDescriptorSets().
|
private |
Definition at line 648 of file Renderer.h.
Referenced by createHiZSPDDescriptorSets(), createHiZSPDResources(), recordHiZGeneration(), recordHiZGenerationSPD(), and updateHiZSPDDescriptorSets().
|
private |
Definition at line 650 of file Renderer.h.
Referenced by createHiZSPDDescriptorSets(), recordHiZGenerationSPD(), and updateHiZSPDDescriptorSets().
|
private |
Time when the last frame started, for stall detection.
Definition at line 566 of file Renderer.h.
Referenced by getFrameElapsedMs(), and markFrameStart().
|
staticconstexprprivate |
Per-mip descriptor sets for Hi-Z generation (legacy) Array indexed as [frameInFlight][mipLevel]
Definition at line 643 of file Renderer.h.
|
private |
Definition at line 630 of file Renderer.h.
Referenced by createMeshletCullingDispatcherResources(), createMeshletCullingResources(), and getMeshletCullingComputePass().
|
private |
Definition at line 629 of file Renderer.h.
Referenced by createMeshletCullingDispatcherResources(), and getMeshletCullingDispatchComputePass().
|
private |
Definition at line 635 of file Renderer.h.
|
private |
Definition at line 628 of file Renderer.h.
Referenced by createMeshletUnpackingDispatcherResources(), createMeshletUnpackingResources(), and getMeshletUnpackingComputePass().
|
private |
Definition at line 627 of file Renderer.h.
Referenced by createMeshletUnpackingDispatcherResources(), and getMeshletUnpackingDispatchComputePass().
|
private |
Definition at line 219 of file Renderer.h.
Referenced by cleanup(), createMeshUnpackingDataBuffer(), ensureOutputBufferSizes(), and getMeshUnpackingDataBuffer().
|
private |
The descriptor set layout.
Definition at line 625 of file Renderer.h.
Referenced by createPrimitiveCullingResources(), and getObjectCullingComputePass().
|
private |
Definition at line 216 of file Renderer.h.
Referenced by cleanup(), createObjectCullingDataBuffer(), ensureOutputBufferSizes(), and getObjectCullingDataBuffer().
|
private |
Definition at line 218 of file Renderer.h.
Referenced by cleanup(), createObjectIDsBuffer(), ensureOutputBufferSizes(), and getObjectIDsBuffer().
|
private |
Definition at line 217 of file Renderer.h.
Referenced by cleanup(), createObjectMeshletDataBuffer(), ensureOutputBufferSizes(), and getObjectMeshletDataBuffer().
|
private |
Definition at line 576 of file Renderer.h.
Referenced by allocateDescriptors(), and getPipelineIndex().
|
private |
Definition at line 579 of file Renderer.h.
Referenced by allocateDescriptors(), and getPipelineIndex().
|
private |
Definition at line 224 of file Renderer.h.
Referenced by cleanup(), createPlaceholderBuffer(), and getPlaceholderBuffer().
|
private |
Definition at line 225 of file Renderer.h.
Referenced by cleanup(), createPlaceholderUniformBuffer(), and getPlaceholderUniformBuffer().
|
private |
Definition at line 742 of file Renderer.h.
Referenced by cleanup().
|
private |
Definition at line 634 of file Renderer.h.
|
private |
Definition at line 633 of file Renderer.h.
|
private |
Definition at line 735 of file Renderer.h.
Referenced by allocateDescriptors(), recordHiZGeneration(), and recordHiZGenerationSPD().
|
private |
Definition at line 556 of file Renderer.h.
Referenced by advanceFrameIndices(), initializeFrameIndices(), submitGraphics(), submitInitialTransfers(), submitTransfer(), and syncTimelineAfterPause().
|
private |
Definition at line 771 of file Renderer.h.
Referenced by cleanup(), getCurrentPresentableSemaphore(), and submitGraphics().
|
private |
Definition at line 214 of file Renderer.h.
Referenced by allocateDescriptors(), getRenderingDataManager(), recordPass2Culling(), recordTransfer(), recordVertexShaderDraws(), recordVertexShaderDrawsDepthOnly(), recordVSInstancedDrawingPipeline(), renderToXr(), submitTransfer(), and updateCpuRenderResources().
|
private |
The render processes.
Definition at line 748 of file Renderer.h.
Referenced by allocateDescriptors(), cleanup(), ensureOutputBufferSizes(), getCurrentRenderProcess(), getGraphicsCommandBuffers(), getRenderProcesses(), initializeGpuBuffers(), prepareTransferSubmission(), recordTransfer(), renderToXr(), submitInitialTransfers(), submitTransfer(), updateHiZMipDescriptorSets(), and updateHiZSPDDescriptorSets().
|
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().
|
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().
|
staticconstexprprivate |
Threshold for considering a frame as "stalled" (1 second)
Definition at line 569 of file Renderer.h.
Referenced by markFrameStart().
|
private |
Definition at line 571 of file Renderer.h.
Referenced by prepareTransferSubmission(), recordTransfer(), renderToXr(), and updateCpuRenderResources().
|
private |
Definition at line 551 of file Renderer.h.
Referenced by cleanup(), getTimelineSemaphore(), getTimelineSemaphoreValue(), getTimelineSynchronizer(), submitGraphics(), submitInitialTransfers(), submitTransfer(), and syncTimelineAfterPause().
|
private |
Definition at line 573 of file Renderer.h.
Referenced by Renderer(), and updateCpuRenderResources().
|
private |
Definition at line 651 of file Renderer.h.
Referenced by createHiZSPDDescriptorSets(), recordHiZGeneration(), and recordHiZGenerationSPD().
|
private |
Definition at line 662 of file Renderer.h.
Referenced by createVertexShaderPathResources(), recordVertexShaderDraws(), and recordVertexShaderDrawsDepthOnly().
|
private |
Definition at line 675 of file Renderer.h.
Referenced by createVSInstancedDrawingResources(), recordVertexShaderDraws(), recordVertexShaderDrawsDepthOnly(), and recordVSInstancedDrawingPipeline().
|
private |
The graphics and present command pool.
Definition at line 604 of file Renderer.h.
Referenced by allocateDescriptors(), cleanup(), and getGraphicsCommandPool().
|
private |
The transfer command pool for all commands submitted to the transfer queue.
Definition at line 612 of file Renderer.h.
Referenced by allocateDescriptors(), cleanup(), and getTransferCommandPool().
|
private |
Definition at line 672 of file Renderer.h.
Referenced by createVSInstancedDrawingResources(), getVSBinningAllocatorComputePass(), recordVertexShaderDraws(), recordVertexShaderDrawsDepthOnly(), and recordVSInstancedDrawingPipeline().
|
private |
Definition at line 762 of file Renderer.h.
Referenced by cleanup(), createVertexShaderPathResources(), and recordVertexShaderDrawsDepthOnly().
|
private |
Definition at line 660 of file Renderer.h.
Referenced by cleanup(), createVertexShaderPathResources(), and recordVertexShaderDraws().
|
private |
Definition at line 673 of file Renderer.h.
Referenced by createVSInstancedDrawingResources(), and getVSInstanceUnpackingComputePass().
|
private |
Definition at line 661 of file Renderer.h.
|
private |
Definition at line 674 of file Renderer.h.
Referenced by createVSInstancedDrawingResources(), and getVSPrepareDrawComputePass().