The record was a fill of the whole record with 1 followed by fills and copies into parts of it, with no barrier between them: transfer writes to the same bytes, which the GPU may run in any order. On an RX 580 the vertex count, the first vertex or instance or the task count was the fill's 1 in about half the draws, and the foliage the mesh programs draw flashed, missing or white from the wrong slots. The record is now built as words first and written as fills of runs that do not overlap, with the count the GPU wrote copied into the words left out for it.
No vkCmdUpdateBuffer: it is not among the recorder thread's commands (vk_rec.h), so with the recorder on (an AMD card without mesh shaders in the low-end GPU mode) the call went to the driver from the replay thread while the recorder recorded the same command buffer, and amdvlk64.dll ended with an access violation at the first fallback draw.
Two commits by Tobim6 from the public repository (2d988e36 and 8ee0ca9d), applied to this line as one. Not run here: no card in this PC takes the fallback. The file compiles.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The record's copies put the count the game's culling pass wrote into the first dispatch and, without a task stage, into the draw's instances as it was. A garbage count launched up to millions of workgroups that write nothing and instances that draw nothing, enough to keep the GPU past the driver's timeout; with the fallback now the default on AMD's driver for RDNA 1 and 2, such a count would have moved a hang there instead of removing it. A single-thread compute pass (shaders/meshfb_clamp.comp) cuts the count to the buffers' room, which changes nothing that is drawn; the report word keeps the count asked for, so record_check still logs a mesh-only draw that asked for more than the buffers hold. On for every device that uses the fallback: one dispatch and one barrier per indirect fallback draw.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mesh draw becomes its record (the workgroup count, copied on the GPU for an indirect draw), the task dispatch, a
scan that lists the mesh workgroups the tasks started, the mesh dispatch, and an instanced indirect draw with a
generated vertex stage and the program's fragment stage. The compute modules bind the resources of the task and mesh
stages, and their pipelines are made on a thread of their own while the program's draws are skipped.
The indirect mesh ring and the texture pool marks are released at a probe's shutdown.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>