Fixes and research

This commit is contained in:
2026-08-08 20:22:37 +01:00
parent 30408ff244
commit f5ff6c70ea
8 changed files with 592 additions and 17 deletions
+6
View File
@@ -94,6 +94,12 @@ void prNodeDestroy(PrNode *n, PrAllocator *alloc);
Use wapp allocators (`WpAllocator`, arena-based). Stack-allocate where
possible; pass allocators explicitly.
**Never use libc for memory or file I/O.** wapp always takes precedence:
- `wpMemAllocatorAlloc` / `wpMemAllocatorFree` instead of `malloc` / `free`
- `wpFileOpen` / `wpFileRead` / `wpFileClose` instead of `fopen` / `fread` / `fclose`
For one-shot loads (e.g. SPIR-V at init), use `&_G_RHI_CONTEXT.allocator`.
```c
PrGraph *prGraphCreate(PrAllocator *alloc);
void prGraphDestroy(PrGraph *g, PrAllocator *alloc);