Skip to content

feat(rendering): compute pass infrastructure, IPipeline, GraphicPass/ComputePass split - #776

Merged
JeanPhilippeKernel merged 1 commit into
developfrom
feat/compute-pass
Sep 10, 2026
Merged

feat(rendering): compute pass infrastructure, IPipeline, GraphicPass/ComputePass split#776
JeanPhilippeKernel merged 1 commit into
developfrom
feat/compute-pass

Conversation

@JeanPhilippeKernel

Copy link
Copy Markdown
Owner

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

  • Build passes clean with pre-push clang-format hook
  • Engine runs at 120 fps, no validation errors
  • Mesh upload, buffer binding, and descriptor sets confirmed working via Console output

…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
@JeanPhilippeKernel JeanPhilippeKernel moved this to In Progress in ZEngine Board Sep 10, 2026
@JeanPhilippeKernel JeanPhilippeKernel added area-rendering area-linux Work on Linux system area-window Work on Window system area-macOS Work on macOS system vulkan-api labels Sep 10, 2026
@JeanPhilippeKernel JeanPhilippeKernel self-assigned this Sep 10, 2026
@JeanPhilippeKernel
JeanPhilippeKernel merged commit 192757e into develop Sep 10, 2026
17 checks passed
@JeanPhilippeKernel
JeanPhilippeKernel deleted the feat/compute-pass branch September 10, 2026 05:05
@github-project-automation github-project-automation Bot moved this from In Progress to Done in ZEngine Board Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-linux Work on Linux system area-macOS Work on macOS system area-rendering area-window Work on Window system vulkan-api

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant