Pre-existing dev failure: Procgen.cpp binds addFunc('getBool'/'setBool')
without documenting them in procgen.md, which fails the script-binding
documentation check for any PR against dev. Acknowledge the gap via the
known-gaps allowlist (unrelated to the logging change).
Add 7 shaders to the stylize module, exposed through the existing
Style* runtime and Squirrel API (no new module or bindings):
- Mesh materials (reuse mesh3d_toon.vert): rim light, dissolve,
hologram, snow accumulation.
- Post passes: vignette, chromatic aberration, film grain.
Original GLSL implementations of common techniques, not verbatim
copies (see docs/dev/ported-material-shaders.md for licensing).
Adds EffectShaders.{h,cpp} with param tables + uniform binding +
shader creation, wired via delegation from StyleShaders.cpp, plus
SPIR-V embeds and per-module tests (test/stylize_effects.cpp).
scripts/check_bindings.py now treats pre-existing doc gaps as registered
debt: scripts/check_bindings_gaps.txt (module:binding, regenerated via
--write-gaps, 857 entries) turns them into warnings, while any NEW bound
name missing from its doc chapter fails the check. make check/bindings and
the CI layering job now run the full --strict check instead of the ten
newly-authored chapters, so docs cannot silently drift from bindings
anywhere in the tree.
Resolved conflicts:
- test/*: keep the shared Fixtures.h migration (drop the per-file
openGfxWindow copies that dev still had).
- vulkan/Graphics.cpp: keep dev's extName loop variable rename AND the
headless set_headless() line.
Local win32-debug build + headless/sampler/mocks/binding tests pass after
forcing a rebuild of EVProcgen (stale object from the pre-merge tree caused
a duplicate PbrTextureSet::destroy symbol).
- scripts/check_bindings.py: scans every addFunc/addVar in src/modules and
greps the matching docs/usr/modules chapter. Missing names are warnings by
default (large pre-existing doc debt); --strict + --modules turn them into
CI failures. Wired as make check/bindings and a step in the CI layering
job for the ten newly-authored chapters (avatar, buildingfx, camera,
database, dialogue, grid, housegen, sceneloader, stylize, virtualgeometry),
so those chapters cannot silently drift from the bindings.
- test/binding_selfcheck.cpp: builds a script VM with every module exposed,
constructs the light modules and asserts curated hot bindings exist
(eve.reflect itself is covered by the existing ReflectScript test).
- EVENGINE_ENABLE_STRICT_WARNINGS option: MSVC /W4 /WX, GCC/Clang
-Wall -Wextra -Werror, with documented noise suppressions and
-isystem/-external:I for third-party headers; enabled on the
Windows/Linux debug CI jobs.
- Fix warnings across engine, modules and tests exposed by the gate,
including real bugs (incomplete-type deletes, Timespan microsecond
overflow, overload hiding, enum switch gaps, dead code).
- Add Linux ASan+UBSan job, example smoke step, python-tools test
job, ruff config (scripts+tools), weekly Linux coverage job and a
CodeQL workflow.
CI hit a python socket timeout connecting to the embedded MCP server,
likely because the sed-triggered hot reload delayed frame-loop MCP pumping
on a slower runner. Bump the socket timeout to 30s, retry eve_status, and
dump the eve log tail on failure so future CI failures carry the actual
engine output.
Render 14 examples with the prebuilt eve host and capture the actual
swapchain frame via gfx.saveFramePng (capture_root.nut wrapper), then
publish the PNGs under docs/images/examples with a gallery README and a
link from the user guide.
Adds scripts/capture_example.ps1 + scripts/capture_root.nut for
regenerating the captures on any example.
With --debug the engine routes Squirrel print() into the DevTools console,
so 'DevTools attached' never reaches stdout/stderr and the log-grep test
always timed out. The test now starts eve with --mcp-port, waits for the
stderr 'MCP listening' line, and verifies attachment + hot reload through
the embedded MCP server (eve_status attached + eve_eval lab.reloads).
sq_newslot(-3) expects a [table, key, value] three-level stack; the code
pushed only the value, so the slot write silently targeted the native
frame's mode argument (a string, not a table) and was skipped. Handles
therefore had methods but empty _path/_data, making read()/getSize()
throw 'file not readable' on every platform where the stack layout
did not accidentally alias the table.
Fix cardgame's ui.sameLine() calls to pass an id (the binding requires
one), and make the example smoke failure output print non-frame-error
lines so future CI failures carry the real root cause instead of being
buried under per-frame error spam.
Adds a self-contained browser playground (editor + canvas + console + REPL)
around the Emscripten WebGPU build, plus the engine fixes required to render:
- JS<->Squirrel bridge (apply/eval/read/pause) and Emscripten 6 exports
- soft hot-reload via load.nut handle_change with __pg state preservation
- fix Uint16 index buffer byte sizes in SetIndexBuffer calls
- fix dangling GbufferSlot/SceneColorSlot gpuHandle pointers (std::move bug)
- fallback shadow depth texture when no shadow map is configured
- fix WGSL syntax (mod/ivec2) and default shadow sampler maxAnisotropy
- serve_webgpu.py COOP/COEP server and playground docs/demos/assets
scene.addNode(id, name) requires both params; the example passed one.
smoke_examples.sh now dumps the last 25 lines of a failing example's log
so CI failures carry the full error context.
- devlab: flagship --debug example (console/snapshot/AI panel/pause/hot
reload/error slice), make devlab target with RUN_ARGS support
- ai-game: agent-drivable live game + agent_demo.py (pause/read/mutate/
verify/snapshot/restore/screenshot loop)
- ai-editor: headless eve mcp editor host demo (JSON View + ViewModel MVVM)
- examples: fill all missing READMEs + config.nut, add examples/ index
- load.nut: add key_just_pressed/clampf/persist helpers; dedupe 19 examples
- rpg/cardgame: move JSON definitions to data files
- fix eve mcp crash: ModuleManager::requireAll() instantiates modules in
the headless host (IEditorHost etc. were null)
- graphics: actionable screenshot error when readback was just enabled
- CI: smoke all examples (devlab with --debug) + DevLab hot-reload test
Fixes surfaced by the new CI smoke (examples had never been smoke-tested):
- scene_director kit: camera slot doubled as function + instance and was
nulled by reset(); move the live Camera3D into cameraObj
- readTextFile used non-existent readn()/len(); use file.read()
(rpg/cardgame/hex-levels)
- daynight used non-existent keyboard.wasPressed() -> key_just_pressed
- outline passed ints to float-only drawSolidRect; linear-structures
slider passed an int value
- scene-ecs beginNode() requires (id, name); ai-stage guarded compilestring
- smoke_examples.sh: timeout -k 3 so SIGTERM-ignoring hosts cannot hang CI
Virtual-geometry assets now render through the main GPU-driven frame instead of
the standalone software-raster experiment:
- Shared VG scene in vulkan::Graphics: pooled positions/triangles/clusters +
per-cluster asset ids + per-slot visible list / indirect commands / asset
models + materials. Meshes attach an asset via gpuDrivenVgAttachToMesh;
GpuMeshRecord.vgAssetId routes them out of the instance chain.
- vg_main_cull.comp runs in the main frame's compute section (frustum + HZB
against the per-asset model) and emits per-cluster VkDrawIndirectCommand
(vertexCount = triCount*3, firstInstance = cluster id).
- Hardware raster: mesh3d_gbuffer_vgvis draws clusters with NO vertex input -
gl_InstanceIndex = cluster, gl_VertexIndex = triangle corner, positions from
the cluster stream; face normals computed from world edges; writes the same
visID/visBary attachments (bit31 marks VG clusters).
- resolve_vis.frag decodes VG clusters: asset -> material, interpolates from
the cluster stream, flat-tint shading via the shared PBR core, writes
gl_FragDepth so later transparent draws depth-test correctly.
- gpu_emit.comp additionally writes non-indexed VkDrawIndirectCommand per
bucket (the 20-byte indexed layout's firstInstance sits at offset 16, which
vkCmdDrawIndirect (16-byte commands) ignores - this was the vis pass showing
only instance 0). The vis pass now draws from that command stream.
- All per-frame bindless updates (vis samplers 15/16, VG bindings 26-29) moved
BEFORE the set is bound to the recording command buffer (no UPDATE_AFTER_BIND;
updating a bound set invalidates the CB - caught by validation).
- drawIndirectCount Vulkan 1.2 feature enabled at device creation; the VG
count buffer carries VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT.
- RenderControl gains the "visResolve" feature flag (the stage-3 resolve path
was previously enabled via an unknown flag that setFeature silently dropped).
Verified: GpuDriven.visResolveParity now genuinely exercises the resolve path
(maxDelta = 0.0 vs forward); GpuDriven.vgVisResolve renders a sphere's clusters
through the main frame (9 visible after frustum+HZB, tint-correct center,
frustum-culled to 0 behind the camera); 19 render tests + 3x suite repeat pass;
validation shows no new VUIDs.
Opaque GPU-driven instances now render through a deferred-style path under the
new "visResolve" render-control flag (1x scene pass):
- GBuffer gains visID (R32G32UI: instance + pooled triangle base) and visBary
(R16G16F) attachments plus a vis render-pass variant and pipeline.
- The vis pass draws the cull chain's indirect commands with NO vertex input:
the vertex shader fetches position/normal/uv from new pooled buffers via
gl_VertexIndex (non-indexed draw reuses the same indirect commands), which
also makes the per-vertex barycentric constants exact (gl_VertexIndex % 3).
Triangle ids are computed in the vertex stage and passed flat, avoiding
gl_PrimitiveID in the fragment (which would require the SPIR-V Geometry
capability / geometryShader feature).
- resolve_vis.frag runs as a fullscreen triangle inside the scene color pass:
it reconstructs world pos / normal / uv from the pool using the barycentrics,
shades with the shared PBR code and writes the opaque depth (gl_FragDepth),
so later hair/transparent draws depth-test correctly.
- New vertex pool (positions/normals/uvs as vec4/vec4/vec2 SSBO arrays +
u32 index pool, host-visible, grow-by-2x with waitIdle); meshes are pooled
lazily at registerMeshRecord and GpuMeshRecord.vertexOffset/indexOffset now
point into the pool. Bindless set1 gains bindings 15/16 (vis samplers) and
18-21 (pool buffers), all rewritten per slot/frame following the safe-point
rule from 8f156a6.
- pbr_shade.glsl extracts the GPU-driven PBR/CSM/cloud/env shading so the
forward path and the resolve share one source of truth.
Verified: GpuDriven.visResolveParity passes with maxDelta=0.0 vs the forward
path (same cull, same pixels); full GpuDriven + RenderSystem3D/Shadow3D/
Lighting3D suites pass; validation shows no new VUIDs (the SPIR-V Geometry
capability error from gl_PrimitiveID was removed by the flat-triangle-base
change).
Add the stage-2 compute chain to the main frame:
- ComputePass wrapper + compile script for compute SPIR-V (hzb_build /
gpu_cull / gpu_emit); bindless set extended with cull UBO, visible flags,
compacted instances, indirect commands, HZB buffer and GBuffer depth.
- HZB: R32F max-downsampled mip chain per frame slot built from the
GBuffer depth after the GBuffer pass (buffer-based; offsets header at slot
start). Same-frame self-occlusion handled by testing the bounding sphere's
FRONT depth, and near-zero depth (uninitialized/corner garbage) never
occludes.
- Cull: per-instance Gribb-Hartmann frustum test + HZB occlusion test, flags
written per instance; emit compacts visible instances per CPU-provided
bucket layout and fills per-bucket indirect commands with atomic counters.
- Frame wiring: begin3DFrame defers opening the scene color pass when the
cull chain is live, so the compute section records before the opaque
draws; RenderSystem3D uploads sorted instances, runs cull+emit, opens the
pass and draws with GPU-written commands (per-bucket, empty buckets no-op).
Fallback to stage 1 when compute caps are missing. gpuDriven now forces
the GBuffer pass (HZB source).
- Known limitation: HZB is built from the same-frame GBuffer, so objects
already in the GBuffer cannot be occlusion-culled until the GBuffer itself
is culled (stage 3 vis buffer); the chain is verified with frustum culling
(2 of 5 instances culled) and pixel parity.
Tests: GpuDriven.opaqueForwardCullParity (5 spheres, 2 outside frustum ->
3 visible / 3 non-empty buckets, pixel parity < 0.03); all 6 GpuDriven
tests pass (integrated GPU; the AMD driver intermittently crashes at
vkCreateImage during init - environmental).
- Shared GPU-driven types (GpuDrivenTypes.h) in the backend-independent
graphics namespace; IndirectBuilder (pure CPU) sorts instances by
(pipeline, material, mesh) and merges buckets into GpuIndirectCommand.
- Base Graphics gains a capability-gated seam (supportsGpuDriven3D,
gpuDrivenMeshRecord/MaterialRecord, gpuDrivenSubmitOpaque); WebGPU keeps
the default false.
- Vulkan backend: mesh3d_gpudriven vert/frag (instance + bindless textures +
material table, mirroring mesh3d PBR/CSM/IBL shading), a dedicated pipeline
with a firstInstance push constant, per-frame arena upload of the sorted
instance buffer + commands, and per-bucket vkCmdDrawIndexedIndirect.
- Bindless set1 uses fixed-size descriptor arrays + dynamic indexing instead
of nonuniform() because this toolchain's glslc lacks
GL_EXT_nonuniform_qualifier; indices are uniform per bucket (one material
per indirect draw), which is spec-legal. Caps requirements updated to
match (drops runtime descriptor arrays / non-uniform indexing).
- RenderControl feature 'gpuDriven' (default OFF; opt-in until runtime
verified). RenderSystem3D collects opaque instances when enabled and
eligible (default camera, Material-driven, no custom shader, no clustered);
any ineligible item falls back to the legacy per-draw path.
- Tests: IndirectBuilder merging/stable-order/pipeline-separation (CPU).
GPU-driven runtime tests (GpuDriven.*) remain pending driver recovery.
Rendering is unchanged by default (feature off).
* chore(ci): add clang-format gate, CODEOWNERS and agent collaboration rules
* refactor(modules): clear remaining back-edges and split the largest TUs
Three known dependency back-edges are gone (module_depgraph.py KNOWN_BACK_EDGES
is now empty; --check passes with 0 violations, 0 cycles):
- window -> graphics: window queries the new IWindowSurfaceHost capability
(common/WindowSurfaceHost.h) instead of holding a Graphics pointer;
Window::setGraphics was removed and all call sites updated.
- window -> image: Window::setIcon was replaced by setIconRGBA(const uint8_t*,
w, h); the window no longer decodes ImageData.
- scene -> graphics: pickScreenAt / collectFrustumIdsAt implementations moved
to graphics/ScenePicking.cpp (graphics -> scene is a legal downward edge);
scene now depends only on spatial.
TU splits (pure moves, verified identical method sets and brace balance):
- vulkan/Graphics.cpp (5118 lines) -> Graphics.cpp (lifecycle), GraphicsPipeline,
Graphics2D, Graphics3D, GraphicsMesh + shared GraphicsInternal.h.
- scene/Scene.cpp -> Scene.cpp (script layer / host lifecycle / serialization)
+ SceneNodes.cpp + shared SceneInternal.h.
Verified with a real build (MSVC 19.51, prebuilt third-party): full build green;
window.* and Scene.* suites pass, including scene picking/culling and GPU cases.
* refactor(graphics): narrow Graphics interfaces and clear public-header leaks
Step 4 — interface segregation:
- New lean interfaces: IGraphics2D, IGraphics3D, IResourceFactory, IPostFX
(pure virtuals, forward-declared types only; graphics/Color.h extracted from
Canvas.h so modules that only need the color type stop pulling Canvas.h).
- Graphics now implements all four facets; consumers can depend on the narrow
interface they use instead of the 129-method god class.
- Migrated voxel (VoxelWorld::drawVisible -> IGraphics3D*) and model3d
(ModelRenderer::buildRenderable(s) -> IResourceFactory&).
- Graphics.h slims from 24 sub-header includes to a handful of small type
headers + forward declarations; the destructor moved out-of-line so
unique_ptr effect members are destroyed where types are complete.
Step 5 — header leaks (module_depgraph.py '*' marks: 14 -> 7):
- map/TileLayer.h, particles/ParticleEmitter.h, avatar/AvatarInstance.h,
animation/SpineAnim.h, map/TileSystem.h, model3d/ModelData.h,
model3d/ModelRenderer.h, audio/Audio.h + Source.h, image/ImageData.h +
Image.h, dialogue/Dialogue.h, procgen Palette/OutputSpec/TextureRecipe/
PbrMaterial -> forward declarations, includes moved to .cpp.
- voxel/VoxelWorld.h: terrain sampler Pimpl'd (unique_ptr + out-of-line
destructor), removing the procgen header dependency.
- gpgpu/vulkan backend headers stop pulling graphics/vulkan/Graphics.h.
- Remaining '*' marks are deliberate: tiny POD/enum headers (GridConfig,
MapObject, BlendMode, Color), an internal backend header
(GraphicsInternal.h -> filesystem), and lean interface references.
Verified with a full clean build (MSVC) and tests: window/Scene/voxel/
RenderSystem/Quad/shader/TextureSampler/resourceLifetime pass; broad suite
only shows the pre-existing PHYSFS-init filesystem-environment failures.
* feat(resources): revive ResourceManager as unified IAssetReloader-backed cache
* fix(resources): leak ResourceManager singleton to avoid exit-time teardown crashes
Cached CPU resources may own third-party handles (FreeType faces, Assimp
scenes, image decode handlers) whose libraries are torn down at process
exit in an unspecified TU order; destroying cached entries from the
singleton destructor can segfault at exit (seen on CI Windows in
model3d.materialApi.objMtl). Keep the singleton alive until OS reclaim;
explicit unload()/clear() still release entries during the run.
* refactor(devtools): consume business modules through capability interfaces
DevTools / cmdline no longer include business-module headers, so trimming
scene / physics / procgen / particles / audio / ui / graphics no longer
requires disabling devtools, and devtools can be switched off with
-DEVENGINE_MODULE_DEVTOOLS=OFF.
New capability interfaces in common/:
- ISceneQuery (scene) - host/node inspection + mutation + transform sync
- IRenderCapture (graphics) - render status, PNG capture, camera control,
visible-entity snapshot, entity-ID mask, G-buffer PNGs
- IPhysicsQuery (physics) - 2D world lifecycle + ray casts
- IProcgenQuery (procgen) - recipe listing, map/mesh generation
- IParticlesQuery (particles) - emitter status + one-shot emit
- IAudioQuery (audio) - volume / stop-all
- IEditorHost (ui) - declarative editor host (used by cmdline too)
Providers register in their module constructors. DevTools rewires McpServer
(render/scene/procgen/physics/particles/audio/host tools), SceneInspect
(now delegates to ISceneQuery + IRenderCapture) and RenderVision (uses
IRenderCapture::capturePngDataUrl); cmdline/Mcp.cpp uses IEditorHost.
manifest: devtools DEPS graphics scene physics procgen particles audio ui
image event filesystem -> event; cmdline DEPS filesystem ui -> filesystem.
Verified: full build green; devtools.mcp.* tests pass; broad suite shows
only the pre-existing PHYSFS-init filesystem-environment failures.
* style: apply clang-format to changed lines after dev merge
* fix(webgpu): include RenderControl/TextureSampler explicitly after Graphics.h slimming
* fix(webgpu): provide newFont/print stubs to satisfy IGraphics2D/IResourceFactory vtables
* fix(common): make ProcgenQuery.h self-sufficient (cstdint/utility for GCC)
Re-add test/hair.cpp and test/runtime.cpp (fixing the missing zeroerr include and enum comparisons), add graphics.resourceLifetime tests for the new release APIs, a test-source manifest check, module declared-layer check with unit tests, and a raw-string-literal regression test.