Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
214 commits
Select commit Hold shift + click to select a range
0d26cf2
feat(asset): [WIP] AssetBase structs refactor
Pikachuxxxx Dec 21, 2025
a0681bf
feat(core): Added date utils
Pikachuxxxx Dec 21, 2025
edd63fa
feat(core): Finalize RZAsset DS and design
Pikachuxxxx Dec 21, 2025
df01236
fix(core): Apple clang fixes - alignas after struct if not typedef an…
Pikachuxxxx Dec 21, 2025
19f7928
refactor(gfx): unify Camera3D and SceneCamera class into a single RZC…
Pikachuxxxx Dec 22, 2025
766e7c5
refactor(core): Improve RZCamera3D packing
Pikachuxxxx Dec 22, 2025
029bedb
feat(core): Improve explicit packing for RZAsset and it's hot/cold me…
Pikachuxxxx Dec 22, 2025
23a7eeb
feat(asset): Added camera asset with reflection data, since camera3d …
Pikachuxxxx Dec 22, 2025
767f74e
feat(asset): Adding RZLightAsset
Pikachuxxxx Dec 22, 2025
035a263
feat(core): remove existing entt based scene/entity system custom WIP
Pikachuxxxx Dec 22, 2025
b4051b2
feat(asset): disable and remove scene loading, WIP fix some compilati…
Pikachuxxxx Dec 22, 2025
f6a0860
refactor(core): reduce rzapp redundancies and tight packing
Pikachuxxxx Dec 28, 2025
bd1efff
feat(asset): Added base asset types
Pikachuxxxx Dec 28, 2025
30fa577
feat(asset): [WIP] asset pools and assetdb implementation, tbd...
Pikachuxxxx Dec 28, 2025
7f45007
feat(asset): Added basic assetpool freelist
Pikachuxxxx Dec 28, 2025
0d9c8b0
feat(core): added transfrom asset pool specialization
Pikachuxxxx Dec 31, 2025
4d0c37a
fix(asset): implement transform pool TODOs
Pikachuxxxx Jan 3, 2026
b7a87a2
feat(core): Asset pool improvements
Pikachuxxxx Jan 4, 2026
99e25e3
fix(asset): fix up vignere puzzle asset type
Pikachuxxxx Jan 4, 2026
deffc9c
feat(core): Separate Timing and Memory Pool Budgets
Pikachuxxxx Jan 8, 2026
db95968
feat(core): Separate Timing and Memory Pool Budgets
Pikachuxxxx Jan 8, 2026
30d96a8
feat(asset): Added asset db implementation
Pikachuxxxx Jan 11, 2026
d70963f
feat(core): Improve budgeted allocations for RZAssetDB and RZAssetPool
Pikachuxxxx Jan 12, 2026
1dd1a51
feat(core): Added razix memory tracking for malloc/free
Pikachuxxxx Jan 12, 2026
df8fc18
feat(core): debug mem track alloc improvements
Pikachuxxxx Jan 12, 2026
e0123f5
fix(asset): [WIP] compile errors and trying to simplify aligned alloc…
Pikachuxxxx Jan 14, 2026
474bfb9
refactor(core): macro mem alloc refactor merge
Pikachuxxxx Jan 14, 2026
3421b54
feat(core): added rz min/max utils
Pikachuxxxx Jan 14, 2026
3e9b22c
fix(core): Fix asserts with var args placement in spdlog
Pikachuxxxx Jan 14, 2026
c90a4ee
fix(asset): Fix header pool memory spill and enabled all RZAssetDB pools
Pikachuxxxx Jan 14, 2026
80740dd
feat(rhi): Added missing CHECK_HR macro for better error detection an…
Pikachuxxxx Jan 14, 2026
064bbb3
fix(gfx): disable fg when scene is empty some werird state is causing…
Pikachuxxxx Jan 14, 2026
d092e13
refactor(core): minor change
Pikachuxxxx Jan 14, 2026
b0af68b
test(asset): Fix assetdb and assetpool tests
Pikachuxxxx Jan 14, 2026
9a9a32c
docs(asset): update asset serialization design
Pikachuxxxx Jan 15, 2026
aa1abc5
test(asset): Added a simple binary serialization test for simple struct
Pikachuxxxx Jan 15, 2026
af6b02c
fix(core): Fixed up basic serialization made RZSerialzable static tem…
Pikachuxxxx Jan 16, 2026
75c4fc3
fix(core): create mutex not desotry in assetbase constructor
Pikachuxxxx Jan 16, 2026
5ab29ec
fix(asset): missing return value type in RZSerialzable
Pikachuxxxx Jan 16, 2026
58ef5c2
fix(asset): clean up allocated heap memory in assetDB
Pikachuxxxx Jan 16, 2026
06bf5c2
fix(asset): fix asset tests, needs more memory budget
Pikachuxxxx Jan 16, 2026
3c05825
Revert "feat(core): debug mem track alloc improvements"
Pikachuxxxx Jan 16, 2026
47593af
Revert "feat(core): Added razix memory tracking for malloc/free"
Pikachuxxxx Jan 16, 2026
87fe740
fix(core): disable time sensitive yield tests for CI.CD
Pikachuxxxx Jan 17, 2026
e6ffbe2
fix(core): merge resolve
Pikachuxxxx Jan 17, 2026
e281d15
feat(build): Added some asan/ubsan/tsan premake build options for raz…
Pikachuxxxx Jan 17, 2026
3ce7b2f
feat(asset): Separated asset header and payload pool allocator
Pikachuxxxx Jan 18, 2026
c553081
fix(asset): increase header bool budget to next powper of 2 and incre…
Pikachuxxxx Jan 18, 2026
c207c02
fix(core): UBSAN mem align fixes in RZAsset header and in RHI inputel…
Pikachuxxxx Jan 18, 2026
235ed21
fix(core): fix compilation error on windows, ubsan casting mishap
Pikachuxxxx Jan 18, 2026
413ecc8
feat(rhi): Added global vulkan PSO cache
Pikachuxxxx Jan 18, 2026
f835b57
feat(core): update gitignore to ignore PSOCache folder from anywhere
Pikachuxxxx Jan 18, 2026
222180b
feat(rhi): Added DX12 Pipeline library caching similar to VK
Pikachuxxxx Jan 18, 2026
e93b5ce
feat(rhi): Load cached PSO on launch for vk/dx12
Pikachuxxxx Jan 18, 2026
7149ffe
feat(core): Added serialized types to aid with reflection and binary …
Pikachuxxxx Jan 20, 2026
7b77e50
docs(core): udpate asset systmed design notes
Pikachuxxxx Jan 20, 2026
b18a417
feat(core): Added basic primitive types serialization
Pikachuxxxx Jan 20, 2026
240a9ec
test(core): read/write to temp file for serialization handshake tests
Pikachuxxxx Jan 20, 2026
5da9317
fix(core): remove log module dependency for type registry
Pikachuxxxx Jan 20, 2026
a1fa489
fix(core): RZFileSystem headers fix
Pikachuxxxx Jan 20, 2026
c636196
feat(core): Added LZ4 compression wrapper APIs and integration tests
Pikachuxxxx Jan 20, 2026
437dfd5
test(core): Added a disabled big string compression test
Pikachuxxxx Jan 20, 2026
a3b6337
fix(core): msvc def enums cannot have : T
Pikachuxxxx Jan 20, 2026
101c363
feat(core): Add support for SerializedBlob serialization + clangforma…
Pikachuxxxx Jan 20, 2026
4f4e7f5
feat(core): [WIP] Added blob deserialization
Pikachuxxxx Jan 21, 2026
1bb0061
fix(core): Fixed an issues with serialization to correctly offset wri…
Pikachuxxxx Jan 21, 2026
f345bce
fix(core): use disk type tag for serializer
Pikachuxxxx Jan 21, 2026
81393ea
feat(core): Added array blob serialization logic
Pikachuxxxx Jan 21, 2026
21888f5
fix(core): fix instance var name, can cause overlapping, also fixed t…
Pikachuxxxx Jan 21, 2026
eb03930
feat(core): Added array deserialization logic
Pikachuxxxx Jan 21, 2026
71a0910
test(core): Fix tests, use push_back to set data into fixed array sin…
Pikachuxxxx Jan 21, 2026
5b7cd8c
refactor(core): Simplfy RZSerializaer by breaking into RZBinaryArchiv…
Pikachuxxxx Jan 21, 2026
1b4fa12
feat(core): Added string type serialization + tests
Pikachuxxxx Jan 21, 2026
d2f891e
feat(core): expose and implement hash_map serialization and hashmap ops
Pikachuxxxx Jan 22, 2026
2b638b1
fix(core): marked time sensitive tests as disabled for GitHub CI/CD runs
Pikachuxxxx Jan 23, 2026
5b90365
feat(core): Added hashmap serialization logic
Pikachuxxxx Jan 23, 2026
e3b1e9a
feat(core): Added hashmap serialization tests and also hashmap ops
Pikachuxxxx Jan 23, 2026
8b3513c
fix(core): Fix a typo with hashmap get size ops
Pikachuxxxx Jan 23, 2026
a68cbe2
fix(core): Fix up hashmap serialization, write key/value pairs in int…
Pikachuxxxx Jan 24, 2026
a91e4da
feat(core): Implemented serialization for trivially serializable nest…
Pikachuxxxx Jan 25, 2026
e0696d8
feat(build): Forcing more processors for linux build
Pikachuxxxx Jan 25, 2026
2e9b901
feat(core): Added RZUUID as serialization primitive
Pikachuxxxx Jan 25, 2026
b98fce0
fix(core): Added some primitve tests to include vector types
Pikachuxxxx Jan 25, 2026
4d092e3
feat(core): corected reflection for asset types
Pikachuxxxx Jan 25, 2026
826ce82
feat(rhi): added define to force disable profiling when RHI.h in incl…
Pikachuxxxx Jan 25, 2026
c7a4215
test(core): Added asset payload tests for engine asset types
Pikachuxxxx Jan 25, 2026
6f59f47
test(core): Added simple nested blob test for complex type, we will n…
Pikachuxxxx Jan 26, 2026
1fabe2e
fix(core): add extern c for C API exposure to cpp
Pikachuxxxx Jan 26, 2026
23e4cca
feat(asset): Added friend helper macros to private member access for …
Pikachuxxxx Jan 26, 2026
238ed7e
test(asset): Added tests for RZAsset header + fix some linker exposure
Pikachuxxxx Jan 26, 2026
19b93a1
fix(core): Fix up error, use constexpr compatible for compiel time ch…
Pikachuxxxx Jan 26, 2026
21afa07
fix(core): hide RZAsset inplace creation inside .cpp
Pikachuxxxx Jan 26, 2026
3bf4101
fix(core): export RZAssetUtilCreateAssetInstanceInPlace
Pikachuxxxx Jan 26, 2026
2fee4b8
test(core): move header tests to above payload tests
Pikachuxxxx Jan 26, 2026
17fa979
fix(core): RZAsset must be aligned at cache line alignement in tests,…
Pikachuxxxx Jan 26, 2026
68a21f1
feat(core): Added asset header to al asset types + remove unwatend lo…
Pikachuxxxx Jan 26, 2026
278bce0
fix(core): goldmaster define fix for reflecting rz_asset_handle
Pikachuxxxx Jan 27, 2026
d800e7d
feat(core): Added asset header to al asset types + remove unwatend lo…
Pikachuxxxx Jan 26, 2026
e959dd0
fix(core): fix name alloc size for a test and use set_data for UUID o…
Pikachuxxxx Jan 27, 2026
9949241
fix(core): Fix UUID comparison crash by using unaligned SSE loads
Pikachuxxxx Jan 27, 2026
5ba8637
test(asset): fix some memleaks
Pikachuxxxx Jan 27, 2026
44ccd2f
fix(core): Export RZAssetBase destroy function
Pikachuxxxx Jan 27, 2026
b6d35a0
fix(core): Fixed undefined behaviour for cpomputing absolute value fo…
Pikachuxxxx Jan 27, 2026
a2cef08
refactor(core): moved RZBinaryArhcive out to supoprt RZCompressedArchive
Pikachuxxxx Jan 29, 2026
46f9d61
docs(core): Update asset system serializatiom design about comression…
Pikachuxxxx Feb 6, 2026
4af00d1
fix(core): Fix array allocations by checking type alignment, don't de…
Pikachuxxxx Feb 7, 2026
5a0066a
tests(core): Redesign and fixup job system tests, using opus 4.6, I t…
Pikachuxxxx Feb 7, 2026
b5ad030
refactor(core): use templated type archive in RZSerializer serializat…
Pikachuxxxx Feb 7, 2026
1a8a1cf
fix(core): use custom alignment in hashmap allocations if more thatn …
Pikachuxxxx Feb 7, 2026
39ea7b6
feat(core): Added RZCompressedArchive crude implementation
Pikachuxxxx Feb 9, 2026
a8ac2fd
fix(core): zero-out compressed size member when registering RZPayload…
Pikachuxxxx Feb 9, 2026
4f7a116
fix(core): export SerializableTypeToDiskTag symbol, msvc needs, where…
Pikachuxxxx Feb 10, 2026
5156710
refactor(core): [WIP] compressed serializer adding registration to de…
Pikachuxxxx Feb 10, 2026
5708ea4
feat(core): Unified archive read/write paths with meta type ops for e…
Pikachuxxxx Feb 10, 2026
a168027
feat(core): Embed RZFileHeader into serialization + Added constructor…
Pikachuxxxx Feb 10, 2026
e6a83bb
feat(core): Added async context functions impl
Pikachuxxxx Feb 10, 2026
aeec30d
feat(core): expose archive with default constructor as they are not t…
Pikachuxxxx Feb 10, 2026
851c692
test(core): added more compressed binary serializationt tests for pri…
Pikachuxxxx Feb 10, 2026
a685ba7
fix(core): conditional write payload only if it's not empty into fina…
Pikachuxxxx Feb 11, 2026
fde59e1
fix(core): Serializer POD compressed archive fixes
Pikachuxxxx Feb 11, 2026
9309300
test(core): improve compressed tests, make unique names for payloads …
Pikachuxxxx Feb 11, 2026
6209c61
fix(core): use proper base for payload offset and patch compression m…
Pikachuxxxx Feb 11, 2026
d5db068
docs(core): Update asset system design about serialization and future…
Pikachuxxxx Feb 12, 2026
1eb2193
fix(core): conditionally disable RZCompressedArchive as pak will comp…
Pikachuxxxx Feb 12, 2026
b3dc1af
feat(asset): expose access to cold data and don't null it as we can f…
Pikachuxxxx Feb 12, 2026
7d1ac50
feat(core): Update gitignore to ignore .vscode
Pikachuxxxx Feb 12, 2026
d98d10f
fix(core): Allocate memory for serialized blobs from heap allocator e…
Pikachuxxxx Feb 12, 2026
1d41d61
fix(core): Updates serialization tests to pass memory from public API
Pikachuxxxx Feb 12, 2026
794fa04
feat(core): Added final build modes for engine config
Pikachuxxxx Feb 12, 2026
8966676
fix(core): GCC/glibc update fixe gcc to 15 and glibc to 2.43+s
Pikachuxxxx Feb 12, 2026
e9600b7
fix(core): quick asset serializer test failure windows fixes, disable…
Pikachuxxxx Feb 12, 2026
fff8928
Revert "fix(core): quick asset serializer test failure windows fixes,…
Pikachuxxxx Feb 12, 2026
f5bbb03
fix(core): Don't allocate fixed alignment memory from heapi allocator…
Pikachuxxxx Feb 12, 2026
f92d76a
feat(core): Added WIP patch for cereal removal
Pikachuxxxx Feb 13, 2026
2204e30
feat(core): Removed cereal vendor and references
Pikachuxxxx Feb 13, 2026
fb384b6
Revert "feat(core): Added WIP patch for cereal removal"
Pikachuxxxx Feb 13, 2026
b2aa97b
fix(core): typo for windows
Pikachuxxxx Feb 13, 2026
6888b57
feat(core): exposr razix builds modes as defines via build sytem for …
Pikachuxxxx Feb 14, 2026
95f3f20
feat(core): Added assetdb registry export/load functions and create/d…
Pikachuxxxx Feb 14, 2026
0ea1644
feat(core): expose more funcitonali for frame allocator
Pikachuxxxx Feb 14, 2026
f23ca84
feat(core): added RZAssetAsyncLoadJob for async asset load from disk
Pikachuxxxx Feb 14, 2026
75208d4
feat(asset): Added requestAssetLoadFromDisk public API, need to imple…
Pikachuxxxx Feb 15, 2026
36fc0ac
feat(core): Added new file system functions for open/close/read/write…
Pikachuxxxx Feb 15, 2026
3f2608c
feat(asset): Added asset save implementation
Pikachuxxxx Feb 15, 2026
0d64fd5
feat(asset): Added asset save/load typed implementation for full seri…
Pikachuxxxx Feb 16, 2026
2620f0c
fix(core): readback exact size to avoid issues with buffers
Pikachuxxxx Feb 17, 2026
034c20e
fix(core): Fix job function callback to pass correct userdata instead…
Pikachuxxxx Feb 17, 2026
77599f6
fix(core): Properly set handle on payload retrival + also restore han…
Pikachuxxxx Feb 17, 2026
9a5a990
fix(asset): Asset system bug fixes
Pikachuxxxx Feb 17, 2026
6d9b615
test(asset): Added assetdb extended tests to cover load/save/create/d…
Pikachuxxxx Feb 17, 2026
eeda2d9
fix(core): AssetDB fixes
Pikachuxxxx Feb 17, 2026
2ae407d
fix(core): use u64 for filehandles and add implementation for new fil…
Pikachuxxxx Feb 17, 2026
3058b8a
fix(core): don't manualy track offset for window filesystem, let kern…
Pikachuxxxx Feb 17, 2026
e14e86e
fix(core): use u64 for filehandle in Unix
Pikachuxxxx Feb 17, 2026
3445d27
docs(asset): Added some prototype DS and API for scene graph API
Pikachuxxxx Feb 18, 2026
c542394
docs(core): Added sceen format grammar
Pikachuxxxx Feb 19, 2026
5169c03
feat(core): Added metric system defines to razix
Pikachuxxxx Feb 19, 2026
7513d27
feat(core): converted AABB to C-style rz_aabb API
Pikachuxxxx Feb 21, 2026
d9a4113
feat(core): converted RZUUID to C-style rz_uuid API and removed RZUUI…
Pikachuxxxx Feb 21, 2026
18d2a59
chore(core): applied clang-format to the codebase
Pikachuxxxx Feb 21, 2026
b97ecd4
fix(core): removed extern C from RZAABB.h to fix MSVC compatibility
Pikachuxxxx Feb 21, 2026
e9de5e0
fix(core): initialized rz_uuid variables in tests to fix GoldMaster f…
Pikachuxxxx Feb 21, 2026
a62bea8
fix(core): Jobsystem use cas for push/pop and wait for workload in pu…
Pikachuxxxx Feb 21, 2026
7b0a4e1
fix(core): resolve memory leaks and alignment issues in containers
Pikachuxxxx Feb 21, 2026
4f1518c
fix(core): unify asan for gcc/clang and enable for windows
Pikachuxxxx Feb 22, 2026
4b9264c
feat(gfx): implement cross-platform assembly stubs for Scene Graph API
Pikachuxxxx Feb 22, 2026
a641c25
fix(asset): correct payload mask typo and integrate scene graph into …
Pikachuxxxx Feb 22, 2026
b637781
docs(asset): reorganize asset serialization and scene graph design fo…
Pikachuxxxx Feb 22, 2026
da74cda
fix(asset): Fix RZSceneGraph.h extern 'C' linkage imbalance and RZApp…
Pikachuxxxx Feb 22, 2026
edcacd9
fix(asset): Fix cross-compiler compatibility for RZSceneGraph and PCH…
Pikachuxxxx Feb 22, 2026
e2768eb
fix(asset): fix cross-compiler compatibility for RZSceneGraph and dis…
Pikachuxxxx Feb 22, 2026
cd31abe
refactor(asset): split RZSceneGraph assembly into platform-specific f…
Pikachuxxxx Feb 22, 2026
52936f7
docs(art): add Iteration 2 direction to README
Pikachuxxxx Feb 22, 2026
a42b5a6
Revert "docs(art): add Iteration 2 direction to README"
Pikachuxxxx Feb 22, 2026
025ade5
docs(gameplay): update Tanu design direction and mood board for Itera…
Pikachuxxxx Feb 22, 2026
6e40017
refactor(asset): inject allocator into RZAssetAsyncLoadJob
Pikachuxxxx Feb 23, 2026
e93f6ce
refactor(build): unify x64 assembly and enable clang toolset with pro…
Pikachuxxxx Feb 23, 2026
7d5f840
refactor(build): unify x64 assembly using GAS and manual clang assemb…
Pikachuxxxx Feb 23, 2026
6969945
refactor(build): refine assembly filters for arm64 and x64 gas
Pikachuxxxx Feb 23, 2026
2c988f6
fix(build): fix .type assembly error on Windows
Pikachuxxxx Feb 23, 2026
8574af0
refactor(core): minior OCD formatting cleanups + clang-format runs ov…
Pikachuxxxx Feb 23, 2026
b092f41
refactor(core): minor RZSceneGraph cleanup for API structure
Pikachuxxxx Feb 23, 2026
c8b53c9
feat(core): Added x64 infra for function implementations in x64 assembly
Pikachuxxxx Feb 23, 2026
cae61bd
fix(build): use ** wildcard for finding asm files in engine
Pikachuxxxx Feb 23, 2026
b83160f
feat(core): add assembly-friendly logging and profiling wrappers
Pikachuxxxx Feb 24, 2026
762676f
fix(asset): correct assembly offsets and sizes for scene graph
Pikachuxxxx Feb 25, 2026
eb2c6a4
Revert "fix(asset): correct assembly offsets and sizes for scene graph"
Pikachuxxxx Feb 25, 2026
b0ef6ec
Revert "feat(core): add assembly-friendly logging and profiling wrapp…
Pikachuxxxx Feb 25, 2026
de5796b
fix(build): fix x64 GAS assembly build on Windows
Pikachuxxxx Feb 25, 2026
65c0d3b
refactor(asset): rz_scene_graph_create to use RZHeapAllocator for dyn…
Pikachuxxxx Feb 26, 2026
5496b4d
feat(asset): destroy scene graph, cute
Pikachuxxxx Mar 3, 2026
5b0912d
feat(gameplay): Update tanu mood
Pikachuxxxx Mar 13, 2026
93043ce
fix(core): WIP scenegraph, added basic public usage example to see ho…
Pikachuxxxx Apr 18, 2026
d967ed5
fix(rhi): rhi messages format, matches engine now
Pikachuxxxx Apr 20, 2026
efc038b
feat(game): tanu test scene design WIP
Pikachuxxxx Apr 23, 2026
8b99a7a
feat(gameplay): tanu test scene design WIP
Pikachuxxxx Apr 23, 2026
5e1e573
Added base for render thread, all tests pass and tanu can run! This i…
Pikachuxxxx Aug 25, 2026
0a17e88
fix(core): Add scoped mutex to timestamp tracking hashmap writes
Pikachuxxxx Aug 25, 2026
7c4e60f
fix(core): fix PassTimings clear race condition by adding scoped mute…
Pikachuxxxx Aug 25, 2026
16f8f62
fix(core): swapchain resize and move it to renderthread
Pikachuxxxx Aug 26, 2026
e53628a
fix(rhi): enable linux window extensions by checks what's supported
Pikachuxxxx Aug 26, 2026
588e4fb
fix(gfx): use scene HDR for final composition as LDR is currently unused
Pikachuxxxx Aug 26, 2026
f27971f
fix(gfx): remove stale ifdef
Pikachuxxxx Aug 26, 2026
432a3b2
fix(rhi): Added vkDeviceWaitIdle calls before and after swapchainr ec…
Pikachuxxxx Aug 26, 2026
ace325c
feat(core): clang-format pass
Pikachuxxxx Aug 28, 2026
6158cbc
feat(core): Added game thread rz world handoff to render thread atomi…
Pikachuxxxx Aug 28, 2026
9087448
chore(core): Added engine setting to enable/disable world ringbuffer …
Pikachuxxxx Aug 28, 2026
2ccebac
fix(gfx): had to flip imgui uv for flipping because we canot set view…
Pikachuxxxx Aug 28, 2026
11dbf2a
chore(gfx): add decorative tanu proj stats to engine tools status bar
Pikachuxxxx Aug 28, 2026
86513c1
chore(tools): enable engine tools to be toggleable
Pikachuxxxx Aug 28, 2026
147300b
chore(core): timepass rzapp code cleanup
Pikachuxxxx Aug 30, 2026
568e490
feat(gfx): Resurected mesh class and it's utils
Pikachuxxxx Sep 3, 2026
c955621
refactor(gfx): send rzworld via framegraph execute pass
Pikachuxxxx Sep 3, 2026
22467d2
feat(gfx): remove RZworld from buildFramegraph and IRZPass, only pass…
Pikachuxxxx Sep 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Directories
.vs/
.vscode/
# https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder
# don't ignore the NSIS Bin folder
!/Tools/Building.EngineInstaller/NSIS/Bin/**
Expand Down Expand Up @@ -38,6 +39,9 @@ Editor/src/generated/
Logs/
*.log

# Ignore PSO cache
PSOCache

# Test Images
Tests/GfxTests/TestImages/

Expand Down
347 changes: 347 additions & 0 deletions Docs/Architecture/Design_AssetSerialization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,347 @@
# [Draft-1] Asset System Design

## Table of Contents
1. [Razix Serialization Philosophy](#razix-serialization-philosophy)
2. [Definitions](#definitions)
3. [Assets and Pools Architecture](#assets-and-pools-architecture)
4. [Serialization Mechanics](#serialization-mechanics)
5. [Serialization Data Structures](#serialization-data-structures)
6. [Archive & Compression](#archive--compression)
7. [Asynchronous Load Mechanism](#asynchronous-load-mechanism)
8. [SceneGraph Format & Grammar](#scenegraph-format--grammar)
9. [Asset Database & Streaming Workflows](#asset-database--streaming-workflows)
10. [Naming & Validation](#naming--validation)
11. [Pak and Storage Data Structures](#pak-and-storage-data-structures)
12. [Implementation Milestones](#implementation-milestones)
13. [Design FAQs](#design-faqs)

---

## Razix Serialization Philosophy

In razix **"asset is everything"**. For the first draft, we only support binary file formats. Later we can optionally support JSON/S-expressions for asset debuggability or a binary editor tool in pyqt.

Traditional ECS is boring; anyways this started more of an idea while I was high one day. Now idk what this will lead to but I'll be explaining my intuition and final design goals. I don't know how good this design will be or if it can be better than others, but here we go:

_Unlike having separate disk-time assets and runtime entities, in this design **"everything is an asset"**. Runtime and disk time both call them assets. They basically have the same representation on disk vs runtime. Keep metadata and compressed data together + no components; assets reference other assets and we build a scene graphs of UUID refs that maps to linear pools of different asset types._

### Some Rules
- **Hierarchy**: SceneGraph maintains the relationship between different asset nodes.
- **Tagging**: How nodes are tagged is decided by `ISceneGraphRule`.
- **Roots**: Only script and transform assets can exist as first-level nodes in the scene graph.
- **Logic**: A mesh asset should be a child of a transform asset, and a material will be a child of a mesh asset.
- **Storage**: All assets are stored in linear pools (MeshPool, TexturePool, MaterialPool, …).
- **Handles**: References use `rz_asset_handle` (header + payload index).
- **Locality**: Child assets are grouped together in "child slabs" to improve traversal locality.
- **Compression**: Textures & Meshes are compressed to BCn/custom formats; metadata stores this info.

### Misc
- Scene graph parsing code in **RAW ASM**! Only rules in C++.
- Job system to load assets with placeholder defaults until ready.
- Models are broken/constructed by the scene graph inside Blender.
- No House renderer until V.0.8.0.Dev.
- Multi-threaded asset loading via `RZthread`.

---

## Definitions

**SceneGraph** - Every zone has its own scene graph. Each Razix World/Level starts with many Zones as first-class nodes. The SceneGraph uses S-expressions to mimic a tree-like data structure.

**Zone** - Logical separation of assets and nodes in runtime. We separate nodes in the level scene graph per zone and load/stream the corresponding `*.pak` file.

**Pak** - Storage file for all assets in a zone. Supports two scopes: "zone-local" and "shared". Patching is handled via `_patched.pak` which takes precedence.

---

## Assets and Pools Architecture

- There is a central `RZAsset` pool to manage metadata.
- Actual asset data (payloads) are stored in separate, type-specific `RZAssetPools`.
- Each defined asset is bidirectionally linked with `RZAsset` via `rz_asset_handle`.
- This indirection facilitates management without enforcing inheritance or template-based designs.

### The 64-bit Handle
The `rz_asset_handle` is designed for efficient lookups:
- **Lower 32-bits**: Hot/Cold data index in the central asset pool.
- **Higher 32-bits**: Asset payload data index in the specific type pool.

Similar to `RZResourceManager`, the system splits data for cache efficiency. **The entirety of `RZAsset` fits in a single cache line** (with 8 bytes left in hot data for future use).

- **Hot Data**: High-frequency metadata (UUIDs, reference counts, flags).
- **Cold Data**: Sister pool for infrequent metadata, linked via handles to keep similar data together.

---

## Serialization Mechanics

`RZAssetDB` handles the heavy lifting, while `RZAssetPool` is only for runtime management. When `serialize/deserialize` is called on `RZAssetDB`, it picks up each pool and uses the `RZReflectionRegistry` to write them into `*.rzasset` files.

### The `*.rzasset` Format (Defined in `RZAssetSpec.h`)
- **[Header]**: Starts with `RZAsset` and its `RZAssetColdData` metadata. This can be hand-written or use reflection.
- **[Payload]**: The actual asset data (e.g., compressed mesh blob). `RZAssetDB` schedules relevant compression/decompression jobs based on the header info.

### Data Types Handling
We use the reflection registry to parse members and write them per the **ABI format**. Each data type is stored per the size requirements of the platform (assuming x64 ABI consistency).

- **Blobs/Strings**: Stored as a `size` followed by the data blob; type-casted as needed.
- **Primitives**: Written as-is (i32, u32, bool, bitsets, etc.).
- **Arrays**: Uses `RZSerializedArrayHeader` (type info, size, element count).
- **HashMaps**: Serialized as Arrays of keys/values/occupied flags.
- **Clean PODs**: Alignment is tracked and serialized as direct blobs.
- **Compression**: Handled per `SerializedBlob` rather than at the asset level.
- **Logic**: If a type consists only of primitives, it is "trivially copyable" and never compressed—just a direct `memcpy` on file read.

---

## Serialization Data Structures

As for iterating through members:
```cpp
u8* base = reinterpret_cast<u8*>(obj);
void* fieldPtr = base + m.offset;
```

I can then check the `TypeMetaData` serialization type and pass to a switch to fill these structs and write to disk:

```cpp
struct SerializedBlob {
uint32_t offset;
uint32_t size;
uint32_t type_hash;
uint8_t compression;
uint8_t reserved[3];
uint32_t decompressed_size;
};

// Array of anything
struct SerializedArray {
SerializedBlob data;
uint32_t element_count;
uint32_t element_type_hash;
uint8_t element_size;
uint8_t reserved[3];
};

// HashMap
struct SerializedHashMap {
SerializedBlob keys;
SerializedBlob values;
SerializedBlob occupied;
uint32_t capacity;
uint32_t count;
uint32_t index;
};

// String
struct SerializedString {
SerializedBlob data;
uint32_t length;
uint8_t encoding; // UTF-8, UTF-16, ASCII
uint8_t reserved[3];
};

// Struct instance (Clean POD only)
struct SerializedObject {
SerializedBlob data;
uint32_t type_hash;
uint32_t size;
};
```

---

## Archive & Compression

Razix uses a dual-archive approach. `RZCompressedArchive` uses deferred payloads unlike the `RZBinaryArchive`.

**File format:** `[RZFileHeader][HeaderSection][PayloadSection]`

```cpp
// Both archives must provide:
void write(const void* src, size_t size);
void read(void* dst, size_t size);
static constexpr bool kUsesOutOfLineBlobs;

// RZCompressedArchive additionally provides:
void registerBlob(size_t headerOffset, const void* payload, u32 payloadSize, rz_compression_type compression);
void finalize();
```

### Deferred Payloads
- Offsets are patched *after* compression.
- Walk reflection metadata and defer `SerializedBlobs`.
- `if constexpr (Archive::kUsesOutOfLineBlobs)` is used to switch mechanisms at compile time.

---

## Asynchronous Load Mechanism

1. **Discovery**: Once a scene graph is parsed into an `RZZone`, it identifies necessary assets.
2. **Placeholders**: The system installs a placeholder asset and registers for an `AssetLoaded` callback.
3. **Jobs**: Kicks off `RZAssetLoad/SaveAsyncJob`.
- If compressed, it triggers `RZAssetCompress/DecompressAsyncJob`.
- For Gfx resources, it passes data to the `RZResourceManager`.
4. **Resolution**: Once the job completes, the callback replaces the placeholder and updates the SceneGraph.

**TLDR;**
DiskIO jobs spawn child Decompress/PostProcess jobs onto worker threads. Only once the final `ASSET_LOADED` state is achieved does the SceneGraph see the new asset and build new data for the renderer.

```cpp
template<typename T>
rz_asset_handle requestAssetLoadFromDisk(RZUUID assetUUID)
{
RAZIX_PROFILE_FUNCTIONC(RZ_PROFILE_COLOR_ASSET_SYSTEM);
RZString assetName = requestAssetLoadFromDiskInternal(assetUUID, typeid(T));

// Create a dummy asset with default placeholder
rz_asset_handle handle = createAsset<T>(assetName);

RZAsset* pAsset = getAssetHeaderMutable(handle);
pAsset->addFlags(RZ_ASSET_FLAG_PLACEHOLDER | RZ_ASSET_FLAG_STREAMING);
pAsset->removeFlags(RZ_ASSET_FLAG_DIRTY);

return handle;
}
```

---

## SceneGraph Format & Grammar

SceneGraph uses **S-expressions** with a SIMD-accelerated C parser.

### `.scenegraph` Layout
- **Zone Directory**: Top-level coordinates and bounds.
- **Hierarchy**: Per-zone node tree.
- **Transform Pooling**: Rotation/Scale/Translation data is pooled per zone. Transform assets simply point to an index in this pool.

```lisp
(scene-file
(header
(version 1)
(scene-bounds (min -1000 -1000 -1000) (max 1000 1000 1000)))

(zone "zone_0_0_0"
(grid-pos 0 0 0)
(world-bounds (min 0 0 0) (max 100 100 100))
(offset 2048) (size 8192))
)

(zone_0_0
(transforms
(0 0 0 0 0 0 0 1 1 1 1))

(transform world_root 0
(transform player_spawn 1
(mesh player_body uuid...)
(material player_skin uuid...))))
```

### Scene Graph Grammar
```bnf
scene := (scene VERSION bounds grid zone*)
bounds := (bounds MIN_X MIN_Y MIN_Z MAX_X MAX_Y MAX_Z)
grid := (grid DIM_X DIM_Y DIM_Z ZONE_SIZE)

zone := (zone NAME GRID_X...MAX_Z transforms node*)
transforms := (transforms xform* node*)
xform := (INDEX)

node := transform_node | asset_node

transform_node := (transform NAME XFORM_INDEX node*)
asset_node := (TYPE NAME UUID node*)

TYPE := mesh | material | light | camera | script | audio | fx
```

---

## Asset Database & Streaming Workflows

### Dev Build
- **Storage**: Loose `*.rzasset` files on disk.
- **Registry**: `assetdb.bin` stores the map of `UUID -> VFS Path`.
- **Action**: On Zone Activate, the system instantiates the scenegraph subtree and async-fills slots via the VFS paths.

### Shipping Build
- **Storage**: Zone-specific `*.pak` files.
- **Registry**: `UUID -> Pak` mapping.
- **Action**: On Zone Activate, the system opens the zone pak and async-loads chunks.
- **Streaming**: Granularity is at the **Zone** level.

---

## Naming & Validation

- **Naming**: `ASSET_TYPE_PREFIX_AssetName*.rzasset` (e.g., `MAT_Gold.rzasset`).
- **Validation (Dev)**: Verify UUIDs in `.scenegraph` exist in `assetdb.bin`.
- **Validation (Shipping)**: Cross-reference `RZPakFileEntry` against the SceneGraph.

---

## Pak and Storage Data Structures

```cpp
struct RZPakHeader {
u32 magic;
u32 version;
u32 fileCount;
u32 chunkCount;
u64 fileTableOffset;
u64 chunkTableOffset;
u32 chunkSize;
};

struct RZPakFileEntry {
UUID assetID;
u32 chunkIndex;
u32 offsetInChunk;
u32 size;
};

struct RZPakChunkEntry {
u64 fileOffset;
u32 compressedSize;
u32 uncompressedSize;
u8 compression; // 0=None, 1=LZ4
};
```

---

## Implementation Milestones

### Phase 1
- AssetDB and Pool foundations.
- BinaryArchive serialization.
- `assetdb.bin` for development UUID mapping.
- S-expression parsing and Zone nodes.
- Async asset loading for `*.rzasset`.
- Basic Pak reader/writer APIs.

### Phase 2
- Debug tools for `*.rzasset` visualization.
- Zone streaming based on player position.
- Blender workflow integration.

---

## Design FAQs

**Q: How will someone know if the asset is READY?**
**A:** Use the handle to get the `RZAsset` pointer and subscribe to events. The SceneGraph uses these events to mark nodes dirty and trigger updates.

**Q: How to load all assets from disk? What is the workflow?**
**A:** As the scenegraph is parsed, we identify the atom type. This calls an opaque function that triggers the internal templated load, and we are good to go.

**Q: How will zones handle scene hierarchies?**
**A:** Each zone has its own independent scene hierarchy with its own root node. They are completely self-contained and can load/unload without affecting others.

**Q: What about cross-zone mission triggers?**
**A:** Use global triggers defined in the scene graph file. We handle these as a separate system outside the independent zone hierarchy.

**Q: How will asset be backed with GPU handles for textures and meshes?**
**A:** This happens in Async during asset create, now as for calling the ResourceManager API this is done via installing custom hooks to the AsyncLoad
function, that the user can register for asset types. One way to do this is to install global hooks for asset types and the assetdb will call this hook during async load.
2 changes: 2 additions & 0 deletions Docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- Added custom Sync primitives - Mutex/Conditional Variables (wrapped over win32/posix)
- Fixed some minor mem leaks with assignment/copy operators in RZString class
- Added JobSystem API for razix based on atomics, simple local/stealing/global queue etc.
- unified camera class finally
- added RZAssetbase and pool design and base assets (21/12/2025)

#### Version - 0.50.0 [Development] - 26/11/2025
- Re-wrote the RHI backend in C99 with full VK and DX12 backend support, can easily switch backend using config files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ float4 PS_MAIN(VSInput input)
: SV_TARGET
{
return input.Color * g_FontTexture.Sample(g_FontSampler, input.UV);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Texture2D FinalSceneColor : register(t0, space1);
float4 PS_MAIN(PsIn input)
: SV_TARGET
{
#ifdef __GLSL__
input.uv = float2(input.uv.x, 1.0f - input.uv.y);
#endif

float4 result = FinalSceneColor.Sample(g_Sampler, input.uv);
return result;
}
Expand Down
1 change: 1 addition & 0 deletions Engine/content/config/DefaultEngineConfig.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Rendering]
RenderAPI = 1
EnableAPIValidation = false
WorldRingbufferDebugLogs = true;
EnableMSAA = false
EnableBindless = true
EnableBarrierLogging = false
Expand Down
Loading