<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/tests/video_core/vertex_repack.cpp, branch nx2</title>
<subtitle>Mirror of github.com/cira0100/Eglantine-public nx2, a fork of Djihads80/Eglantine.</subtitle>
<id>https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2</id>
<link rel='self' href='https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2'/>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/'/>
<updated>2026-11-02T19:53:47+00:00</updated>
<entry>
<title>vulkan: repack 69-byte vertices without dynamic vertex input on MoltenVK</title>
<updated>2026-11-02T19:53:47+00:00</updated>
<author>
<name>Sssnowyyy</name>
<email>78863999+Sssnowyyy@users.noreply.github.com</email>
</author>
<published>2026-11-02T16:56:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=cd9b19c69d7eedc2d2d3557c27a0a06c4420213d'/>
<id>urn:sha1:cd9b19c69d7eedc2d2d3557c27a0a06c4420213d</id>
<content type='text'>
e38b738b84 repacks the 69-byte vertex stride to 72 only with dynamic
vertex input, unless EGLANTINE_EXPERIMENTAL_STATIC_VERTEX_REPACK=1.
MoltenVK has no VK_EXT_vertex_input_dynamic_state and Metal needs strides
that are a multiple of 4, so the stride was never fixed on Macs.

Enable the static path automatically when the device's minimum vertex
binding stride alignment does not divide 69. The device reports 4 for
MoltenVK, matching its portability subset limit. The environment variable
still overrides it: 1 forces the repack on, 0 forces it off.

Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
</content>
</entry>
<entry>
<title>vulkan: repack 69-byte vertices only when needed</title>
<updated>2026-11-02T19:53:47+00:00</updated>
<author>
<name>Sssnowyyy</name>
<email>78863999+Sssnowyyy@users.noreply.github.com</email>
</author>
<published>2026-11-02T16:38:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=13fc5fda26e6b5a9af67f5a654e831187bfa1962'/>
<id>urn:sha1:13fc5fda26e6b5a9af67f5a654e831187bfa1962</id>
<content type='text'>
SetVertexRepackLayout returned old_mask | new_mask, which stays non-zero
on every draw that uses a 69-byte binding. PrepareDraw then re-dirtied the
vertex buffers and vertex input each time, so the repack compute pass ran
and the render pass ended once per draw, which is costly on tiled GPUs.

Return old_mask ^ new_mask so only a layout change re-dirties the
bindings. The repacked copy only stays valid while the source data is
unchanged, so the buffer cache now flags the vertex buffers overlapping a
CPU write, inline or DMA write, or GPU write, and re-dirties the repacked
ones before binding. Command buffer submission already invalidates all
vertex buffer state, which keeps the staging copy within its tick.

Also pass the source buffer size to the repack pass and clamp the
word-rounded storage descriptor range to it; it could run up to three
bytes past the end of the buffer. A binding that does not fit is skipped
like one over the device limits.

Follow-up to e38b738b84.

Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
</content>
</entry>
<entry>
<title>vulkan: repack 69-byte vertices to 72 bytes (#281)</title>
<updated>2026-11-02T07:38:47+00:00</updated>
<author>
<name>Mako</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-11-02T07:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=e38b738b84eb671b7567a37b4932f11a58843dad'/>
<id>urn:sha1:e38b738b84eb671b7567a37b4932f11a58843dad</id>
<content type='text'>
Splatoon Raiders draws with a 69-byte vertex stride and a packed 4-byte
attribute at byte 65. Those fetches are unaligned, which Vulkan leaves
undefined: NVIDIA reads them as meant, the AMD Windows driver does not,
and the outdoor scenes turn into a white haze with horizontal streaks.

When a binding uses that layout, a compute pass copies it to a 72-byte
stride with the tail moved to byte 68, and the vertex input offsets and
stride follow. EGLANTINE_TEST_VERTEX_REPACK=0 turns it off;
EGLANTINE_EXPERIMENTAL_STATIC_VERTEX_REPACK=1 also covers pipelines
without dynamic vertex input.

Based on an outside patch (02-portable-vertex-repacking). Changes from
it: a range over the device limits skips the repack instead of throwing,
and the pipeline cache version stays, so caches are kept.</content>
</entry>
</feed>
