fix(rendering): GBuffer pipeline, second-launch asset reload, HashMap rewrite - #638
Merged
Merged
Conversation
JeanPhilippeKernel
force-pushed
the
fix/rendergraph-gbuffer-pass
branch
from
August 21, 2026 03:06
7f28813 to
1e7691c
Compare
JeanPhilippeKernel
force-pushed
the
fix/rendergraph-gbuffer-pass
branch
from
August 21, 2026 03:14
1e7691c to
3613332
Compare
… rewrite
Rendering:
- Register GbufferPass in render graph; was outputting black via dead BasePass
- Fix magenta background: shaderInt64 device feature not enabled, GbufferPass
Execute was returning before BeginRenderPass when no mesh in scene
- Split vertex_common.glsl / fragment_common.glsl into geometry_bindings.glsl,
texture_bindings.glsl, material.glsl, draw.glsl, draw_types.glsl, surface.glsl
to stop Int64/sampler extensions leaking into geometry-only shader stages
- Redesign RenderPass API: binding-number reflection, BindingsByName O(1) map,
arena-safe SetName/SetPipelineName, pipeline+shader name in error messages
- Fix ImGUIRenderer: remove stale SetSampler("LinearWrapSampler") call
Asset reload (second launch):
- IsAssetExtension: add .zemesh and .zematerial so VFSScanner processes them
- InferTypeFromExtension: map .zematerial -> MATERIAL (was falling through to MESH)
- ImguiLayer: set Scanner.SetAssetRegistry and post startup TriggerScan
- Add AssetManager::ReloadFromDisk — deserializes each unloaded MATERIAL/MESH
record from disk and calls IngestMaterial/IngestMesh
- Fix pre-existing buffer overflow in IngestMesh: sizeof(AssetNodeHierarchy)
used instead of sizeof(NodeHierarchy) for the Hierarchies memcpy, overflowing
308 KB past the allocated block and corrupting the NodeNames hash map
Containers:
- Rewrite UnorderedHashMap: power-of-2 capacity, linear probing with bitmask,
Array::init(cap,cap) + secure_memset(0), guard_load assertion at 75%
- Fix secure_memset arg order: (dst, value, count, dst_size) was swapped,
leaving all entry state bytes as garbage instead of EntryState::Empty
- Rewrite HashMap (ordered): same fixes; per-slot default construction since
prev/next must be size_type(-1), not 0
- 55 edge-case tests: power-of-2, tombstone reuse, collision cluster, large
batch, ordered insertion invariants, sort_keys idempotent
JeanPhilippeKernel
force-pushed
the
fix/rendergraph-gbuffer-pass
branch
from
August 21, 2026 03:33
3613332 to
d47af7e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BindingsByNameO(1) map, dangling-pointer-safeSetName/SetPipelineName, better error messagesIsAssetExtensiondidn't include.zemesh/.zematerial,InferTypeFromExtensionmapped.zematerial→MESH,VFSScanner.m_registrywas never set, and no startup scan or reload path existed; also fixed a pre-existingsizeof(AssetNodeHierarchy)vssizeof(NodeHierarchy)buffer overflow inIngestMeshthat corrupted theNodeNameshash map on reloadArray::init(cap,cap)+ zero-init, guard_load assertion; same fixes for orderedHashMapTest plan
--gtest_filter="*HashMap*").zemeshdrag-and-drop in content browser spawns actor in scene