From f822defd1e7d43a96ead2e9b5462945544f682e8 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 5 Jul 2026 02:35:21 +0100 Subject: [PATCH] Update AGENTS.md --- AGENTS.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 97536a0..1d1df63 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -236,3 +236,30 @@ Only commit when explicitly asked. When asked: - Stage only intended files. - Write a short, conventional commit message in present tense. - Never amend, force-push, or create PRs without a request. + +## Session Log — 2026-07-05 + +### Completed +- **DAG refactoring** (`scratchpad/dag.c`): Decoupled PrGraph from PrNodeManager. + Graph tracks its own active vertices (`vertex_count`, `max_vertex_ever`, `b8 active`). + `prGraphAddEdge`, `prGraphTopologicalSort` no longer take `PrNodeManager*`. + Kahn's algorithm integrated into `prGraphAddEdge` for cycle detection with rollback. + Output verified matching baseline. +- **RHI research document** written to `documents/research/rendering-hardware-interface.md`. + Covers 8 reference RHIs, architecture patterns, core API surface, Vulkan-specific + considerations, Slang integration, and proposed directory layout / lifecycle design. +- Added NVRHI to `documents/resources.md`. + +### Key Decisions +- Graph API is self-contained — no graphics or node-manager dependencies. +- RHI will use object-based + command-list-oriented architecture with vtbl dispatch. +- Object lifecycle: `prRhiCreate*` / `prRhiDestroy*` with explicit `WpAllocator*`. +- All GPU state explicit (no hidden pipeline state). +- Per-frame command pools and descriptor pools, arena-allocated scratch. +- `#version-macro` convention removed from Slang files; `__slang` define used instead. + +### Next Steps +1. User reviews RHI research document, then iterate if needed. +2. Begin implementing RHI layer: types header, device creation, Vulkan backend skeleton. +3. Implement Slang shader compilation + reflection integration. +4. Wire up per-frame lifecycle (command pool reset, descriptor pool reset, scratch reset).