feat(rendering): compute pass infrastructure, IPipeline, GraphicPass/ComputePass split - #776
Merged
Merged
Conversation
…ComputePass split - Add IPipeline virtual base (Shader, Device, Handle, Layout, GetBindPoint/Bake/Dispose) GraphicPipeline and ComputePipeline both derive from it - Split RenderPass into RenderPass (base), GraphicPass, and ComputePass GraphicPass owns all attachment, pipeline, render-area, and descriptor-binding state ComputePass owns only ComputePipeline* Pipeline - IComputeCallbackPass::Compile and Execute are now fully implemented Compile creates a ComputePass via UseComputeShader; Execute calls BindPipeline + ExecuteCompute - CommandBuffer::BindPipeline(IPipeline*) replaces the GraphicPipeline-only overload dispatch uses pipeline->GetBindPoint() so it works for both pipeline types - CommandBuffer switches m_active_render_pass to m_active_pipeline + m_in_render_pass BindDescriptorSets, BindDescriptorSet, PushConstants all use m_active_pipeline->Layout/GetBindPoint - BeginRenderPass and BeginSecondary are now typed GraphicPass* — compile error to pass compute - VulkanDevice::CreateRenderPass dispatches to GraphicPass or ComputePass based on spec.Type - GraphicRenderer and RenderGraph cast to GraphicPass* at call sites that need graphic-specific fields - ZUIRenderer::DrawPass typed as GraphicPass* - Extract EntryState and hash_compute from HashMap.h and UnorderedHashMap.h into ContainerCommon.h fixes the latent ODR redefinition triggered when both headers appear in the same TU - GraphicPass::BoundBindings uses Core::Containers::HashSet<cstring> instead of std::set<std::string> arena-allocated, no STL heap; initialized in GraphicPass::Initialize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IPipeline virtual base — shared fields (Shader, Device, Handle, Layout) and interface (GetBindPoint, Bake, Dispose). GraphicPipeline and ComputePipeline both derive from it.
RenderPass split — RenderPass is now a pure virtual base. GraphicPass owns all attachment, pipeline, render-area, and descriptor-binding state. ComputePass owns only ComputePipeline* Pipeline. The render graph continues to store RenderPass* uniformly.
IComputeCallbackPass fully implemented — Compile() creates a ComputePass via UseComputeShader(); Execute() calls BindPipeline(cp->Pipeline) then delegates to ExecuteCompute().
CommandBuffer::BindPipeline(IPipeline)* — replaces the graphic-only overload. Dispatches via pipeline->GetBindPoint() so it works for both pipeline types. m_active_pipeline + m_in_render_pass replace m_active_render_pass; BindDescriptorSets, BindDescriptorSet, PushConstants use m_active_pipeline directly.
BeginRenderPass/BeginSecondary typed as GraphicPass* — compile error to pass a compute pass.
VulkanDevice::CreateRenderPass — dispatches to GraphicPass or ComputePass based on spec.Type.
ContainerCommon.h — extracts EntryState and hash_compute from HashMap.h and UnorderedHashMap.h, fixing a latent ODR redefinition triggered when both headers appear in the same translation unit.
GraphicPass::BoundBindings — std::setstd::string replaced with Core::Containers::HashSet. Arena-allocated, no STL heap allocation.
Test plan