You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(missing): record the CNA Vulkan renderer's per-draw UBO overrun
Building MeshCraft with -DMESH_CRAFT_GRAPHICS_BACKEND=VULKAN works and the
editor runs, but lighting on some objects flickers frame to frame in scenes
with many lit objects -- reproduced on test/medieval_castle.mc3.xml against
CNA develop @ 1bb2145d9, on a real Intel Iris Xe.
The Vulkan validation layer names it every frame: pDynamicOffsets[0] runs
131072..133376 in steps of 256, i.e. ring-buffer slots 512..521 of a 512-slot
buffer (VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979). The cause is at
VulkanRenderer.cpp:9210 -- the bounds guard covers the host-side memcpy but
not the vkCmdBindDescriptorSets that follows it, so a draw past slot 512 binds
an out-of-range offset and reads whatever memory follows the buffer instead of
its own lighting constants. That memory changes between frames, hence the
flicker; that the guard covers only the memcpy is why this shows up as wrong
pixels rather than host-memory corruption.
All six per-draw UBO paths share the pattern (DualTexFog, EnvMap, Skinned,
SkinnedFog, LitTextured, FogTex3D), so it is one pattern to fix rather than
one site. Skinned/SkinnedFog cap at 32 draws and so break far earlier.
This is a CNA-side defect and this repo's CLAUDE.md forbids CNA changes without
the owner's permission, so it is written down here instead of fixed. The
section carries the reproduction, the root cause, the affected table, two
candidate fixes, and -- so the scope is not overstated -- what does work on
VULKAN today: it builds clean, runs, and renders a pixel-correct headless
screenshot with zero validation errors, because a single frame never reaches
slot 512. That is precisely why the defect hides in one-shot renders.
missing.md is otherwise about mc3 format coverage; the intro and the summary
table now both flag this section as a deliberate scope exception.
0 commit comments