Phase 1: RHI Interface Segregation Cleanup
Goal
Finish the RHI interface split by removing deprecated methods from IRenderContext and routing consumers through focused interfaces.
Why this matters
src/engine/graphics/rhi.zig still exposes a broad IRenderContext with methods that already belong to smaller interfaces. That weakens ISP and keeps the rest of the codebase coupled to legacy convenience methods.
Parallel Tasks
Issue 1.1: Remove computeSSAO from IRenderContext
- Type: refactor / solid
- Scope:
src/engine/graphics/rhi.zig
- Problem:
computeSSAO is duplicated on IRenderContext even though ISSAOContext already exists.
- Work:
- Remove
computeSSAO from IRenderContext.VTable
- Remove the
IRenderContext.computeSSAO() forwarding method
- Update any direct callers to use
rhi.ssao() or rhi.ssao().compute(...)
- Acceptance criteria:
IRenderContext no longer exposes SSAO-specific behavior
- Build passes
- No remaining call sites depend on the removed method
- Parallel-safe: yes, if no one else is editing the same call sites
Issue 1.2: Remove drawDebugShadowMap from IRenderContext
- Type: refactor / solid
- Scope:
src/engine/graphics/rhi.zig
- Problem: debug overlay behavior is still embedded in the general render context.
- Work:
- Remove
drawDebugShadowMap from IRenderContext.VTable
- Remove the
IRenderContext.drawDebugShadowMap() forwarding method
- Ensure the debug overlay path uses
IDebugOverlayContext
- Acceptance criteria:
- Debug shadow rendering is accessed through the dedicated interface only
- Build passes
- Parallel-safe: yes
Issue 1.3: Route SSAO calls through ISSAOContext in the render graph
- Type: refactor / solid
- Scope:
src/engine/graphics/render_graph.zig, call sites that build SceneContext
- Problem: the render graph already receives
ISSAOContext, but the codebase still needs a clean, explicit dependency path.
- Work:
- Audit
SceneContext construction and ensure SSAO work always uses ssao_ctx
- Remove any remaining render-context-based SSAO assumptions
- Update comments/docs to reflect the focused interface
- Acceptance criteria:
- Render graph code only references
ISSAOContext for SSAO work
- No lingering comments or docs describe SSAO as a render-context concern
- Parallel-safe: yes
Dependencies
- None required before Phase 1
Verification
nix develop --command zig build test
nix develop --command zig build
Phase 1: RHI Interface Segregation Cleanup
Goal
Finish the RHI interface split by removing deprecated methods from
IRenderContextand routing consumers through focused interfaces.Why this matters
src/engine/graphics/rhi.zigstill exposes a broadIRenderContextwith methods that already belong to smaller interfaces. That weakens ISP and keeps the rest of the codebase coupled to legacy convenience methods.Parallel Tasks
Issue 1.1: Remove
computeSSAOfromIRenderContextsrc/engine/graphics/rhi.zigcomputeSSAOis duplicated onIRenderContexteven thoughISSAOContextalready exists.computeSSAOfromIRenderContext.VTableIRenderContext.computeSSAO()forwarding methodrhi.ssao()orrhi.ssao().compute(...)IRenderContextno longer exposes SSAO-specific behaviorIssue 1.2: Remove
drawDebugShadowMapfromIRenderContextsrc/engine/graphics/rhi.zigdrawDebugShadowMapfromIRenderContext.VTableIRenderContext.drawDebugShadowMap()forwarding methodIDebugOverlayContextIssue 1.3: Route SSAO calls through
ISSAOContextin the render graphsrc/engine/graphics/render_graph.zig, call sites that buildSceneContextISSAOContext, but the codebase still needs a clean, explicit dependency path.SceneContextconstruction and ensure SSAO work always usesssao_ctxISSAOContextfor SSAO workDependencies
Verification
nix develop --command zig build testnix develop --command zig build