<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/runtime/src/indirect_clamp.comp, branch docs/pso-cache-scope-note</title>
<subtitle>[no description]</subtitle>
<id>https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note</id>
<link rel='self' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/'/>
<updated>2026-11-26T21:43:28+00:00</updated>
<entry>
<title>indirect clamp: count dispatch records by width and log them (RT-INDIRECT-DISPATCH-COUNTERS)</title>
<updated>2026-11-26T21:43:28+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T20:10:59+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=359ba968d51907ece4438193e03e854ab7bf8d38'/>
<id>urn:sha1:359ba968d51907ece4438193e03e854ab7bf8d38</id>
<content type='text'>
#2230 bounds a dispatch record by the device's maxComputeWorkGroupCount instead of 65 535. Nothing said how wide
the title's dispatches are, nor when a device's own limit still cuts one (llvmpipe allows 65 535 in x; RADV 2^32 - 1),
which its review asked for. The title's tile passes ask for 67 440 groups in x at 2560x1440 (found in the
VIctory-Belobug-AMD fork of VIctory, crates/victory-gpu/src/indirect.rs; no code of it is used).

- indirect_clamp.comp: stats words 12-15 count dispatch records that run wider than 65 535 groups in x, the widest
  x that runs, those cut at the device's limits (and still running), and all of them.
- vulkan_indirect_clamp.h: the counters, read with the others (16 words a slot, words 8-15 zeroed before the pass),
  and a line every 10 s while dispatch records are clamped: `indirect clamp dispatch: N records, W wider than 65535
  groups in x, widest x X, C cut at the device's limits (x x y x z)`.
- indirect_clamp_spv.h regenerated from the .comp as its header says (glslangValidator 16.6.0).
- docs/d3d12_vulkan.md section 4.7: the device's bound per dimension (it still said 65 535), the line, and the test.

Tests: indirect_clamp_test's cases 6b and 6c check the counters (70 000 x 1 x 1: wider than 65 535 where the device
runs it, cut at its limit and counted where not). tests/test_indirect_clamp_telemetry.py checks the new atomics.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge main (fac8b4bb9) into #2230: keep the device-bound dispatch limit and #2378's unfilled draw records</title>
<updated>2026-11-26T20:05:45+00:00</updated>
<author>
<name>Jan Trencansky</name>
<email>jan.trencansky@protonmail.com</email>
</author>
<published>2026-11-26T20:05:45+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=595b1325d922ed05782fc5fd7d0baa5459eadef6'/>
<id>urn:sha1:595b1325d922ed05782fc5fd7d0baa5459eadef6</id>
<content type='text'>
main's #2378 (a draw record of 2^23 vertices or more runs empty and charges nothing) changed indirect_clamp.comp
next to this branch's dispatch bound. The .comp, vulkan_indirect_clamp.h and indirect_clamp_test.cpp merged without
conflicts and keep both changes. The only conflict was the generated indirect_clamp_spv.h: it is regenerated from the
merged indirect_clamp.comp as its header comment says (glslangValidator 16.6.0, -V --target-env vulkan1.2 -Os
--spirv-val; spirv-val passes).

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>indirect clamp: a draw record of 2^23 vertices or more runs empty and free (RT-INDIRECT-DRAW-UNFILLED-COUNT)</title>
<updated>2026-11-26T13:29:11+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-26T13:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=f324b94a72169825262dab64b8eb3ba047d3ed70'/>
<id>urn:sha1:f324b94a72169825262dab64b8eb3ba047d3ed70</id>
<content type='text'>
The clamp cut a garbage draw count to 2^24 vertices and charged it against the
list's 2^27-unit budget. Only records whose words are all 0xFFFFFFFF were
treated as unfilled. A slot with a garbage count but other words set therefore
cost 2^24 units, so eight such records used up the budget and every real draw
after them in the list ran empty.

A census in codec-d/cool_fox's fork of VIctory found 90 records of 2^24
vertices in one list, and that fork treats 2^23 vertices an instance or more as
unfilled. Here such a record now runs empty, keeps its locations and charges
nothing. Draws under 2^23 are unchanged.

indirect_clamp_test: the old garbage cases now expect an empty record. New
cases check the 2^23 edge and 16 garbage counts ahead of a real draw, which ran
empty with the old shader and runs with this one. The list-budget case uses a
real 2^22 x 16 draw. indirect_clamp_spv.h was regenerated with glslangValidator
15.1.0 (-V --target-env vulkan1.2 -Os).

Tested: full ctest (108 tests) on Linux with Mesa lavapipe (llvmpipe, LLVM 19.1.7).

Changes made by Claude Code (AI-assisted).

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
</content>
</entry>
<entry>
<title>indirect clamp: bound dispatch records by the device's maxComputeWorkGroupCount</title>
<updated>2026-11-26T08:27:26+00:00</updated>
<author>
<name>Tyrannys</name>
<email>80750971+Tyrannys@users.noreply.github.com</email>
</author>
<published>2026-11-26T08:27:26+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=7a761696dcef8cb2415c3000dfc3c4196675263b'/>
<id>urn:sha1:7a761696dcef8cb2415c3000dfc3c4196675263b</id>
<content type='text'>
The ExecuteIndirect argument clamp (indirect_clamp.comp) cut every dispatch
record at a fixed 65,535 groups per dimension, Vulkan's guaranteed minimum.
Devices report far more in x (NVIDIA: 2^31 - 1), so a one-dimensional
indirect dispatch of more than 65,535 groups ran only its first 65,535
groups; the rest never wrote their output.

The clamp now takes the device's maxComputeWorkGroupCount per axis in its
push constants (88 bytes, was 72) and bounds dispatch records by that. The
2^20 groups-per-dispatch cap, the list budget and LEONIDA_INDIRECT_GROUP_BUDGET
are unchanged; the product check now divides instead of multiplying, since x
alone may exceed 65,535. Mesh dispatches keep 65,535 in x.

indirect_clamp_test runs real indirect dispatches through the clamped
scratch with a marker shader (one atomic per group): 70,000 x 1 x 1 ran
65,535 groups and left 4,465 unrun on main, and runs all 70,000 exactly once
now; 65,535 x 1 x 1 and 1 x 65,535 x 1 (at the old limit) run exactly once
on both. A size past the device's own limit is skipped.

Idea from codec-d/cool_fox docs/findings.md ("Blocky patches: indirect
dispatches cut at 65,535 groups"); idea only, no code taken.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Improve post-load GPU memory and pipeline handling (RT-POST-LOAD-GPU-MEMORY)</title>
<updated>2026-11-25T20:30:51+00:00</updated>
<author>
<name>Moriz82</name>
<email>72836413+Moriz82@users.noreply.github.com</email>
</author>
<published>2026-11-25T20:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=9f98dcc617df5b21eb66b48a289914b551769029'/>
<id>urn:sha1:9f98dcc617df5b21eb66b48a289914b551769029</id>
<content type='text'>
Fall back to a dedicated buffer allocation when the shared arena fills.
Update console descriptors and resource backing, preserve pipeline cache
entries, and replay mesh records using bounded indirect arguments. Keep
scripted input available until read and cover the runtime and translator
paths with synthetic tests.

Co-authored-by: Plaaasma &lt;47513553+Plaaasma@users.noreply.github.com&gt;
Co-authored-by: ivanepsilondelta &lt;264061546+ivanepsilondelta@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>Integrate post-story-load memory, queue and Vulkan runtime changes</title>
<updated>2026-11-25T09:44:43+00:00</updated>
<author>
<name>Moriz82</name>
<email>72836413+Moriz82@users.noreply.github.com</email>
</author>
<published>2026-11-25T09:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=ba626820ec54776fb0faffa2413727285befe85b'/>
<id>urn:sha1:ba626820ec54776fb0faffa2413727285befe85b</id>
<content type='text'>
Preserve physical window aliases across remaps, order console list values,
and replay bounded indirect graphics with captured draw state. Coordinate
pipeline lifetime, texture refresh and queue teardown. Add synthetic CPU
and GPU coverage for the integrated paths.

Co-authored-by: Plaaasma &lt;47513553+Plaaasma@users.noreply.github.com&gt;
Co-authored-by: ivanepsilondelta &lt;264061546+ivanepsilondelta@users.noreply.github.com&gt;
</content>
</entry>
</feed>
