Validation is silent on float-typed image stores into non-float views #138

Closed
opened 2026-12-01 20:42:11 +00:00 by github-bot · 3 comments
Owner

@⁠TheRifai on GitHub · 2026-12-01 20:37 UTC · original

Validation does not report the float-typed image store (follow-up to docs/TASKS.md, "Image stores are float-typed whatever the view's format"; seen on main ab7b4e6).

Main's note says victory-shader emit/lower.rs lowers almost every image store to textureStore.f32, so dxil-spirv makes a float storage image even for an R8_UINT view (pixel shader 5ad3a82b1c3cc63a30f2451375447485, the boat cutscene tile binning pass). RADV writes the intended bits but the numeric-type mismatch is undefined. The task asks for a validation run to see whether the layers report it.

I ran the boat-save cutscene for 125 s on GE-Proton11-16 with VK_LAYER_KHRONOS_validation, VK_KHRONOS_VALIDATION_REPORT_FLAGS=error, duplicate limit 3, warm shader store, no RenderDoc. World reached at ~39 s; run survived to timeout.

Result: only the four known VUIDs — 03428, 01688, 01687 (6 each), 06409 (2) — and no message about image-store type, storage images, numeric type or OpImageWrite in the validation log.

So the layers cannot be used as the gate for a fix; the check has to come from the translator/store side (the store's type from the view, or a typeless/raw store). Evidence: /tmp/opencode/capture/valimg-store/20261201-213540/ (validation.txt, log.txt, vk.log), binary /tmp/opencode/capture/bin-valimg (clean main ab7b4e6). Not a performance measurement.

**@⁠TheRifai** on GitHub · 2026-12-01 20:37 UTC · [original](https://github.com/vktory6/VKtory/issues/138) Validation does not report the float-typed image store (follow-up to docs/TASKS.md, "Image stores are float-typed whatever the view's format"; seen on main `ab7b4e6`). Main's note says `victory-shader emit/lower.rs` lowers almost every image store to `textureStore.f32`, so dxil-spirv makes a float storage image even for an R8_UINT view (pixel shader `5ad3a82b1c3cc63a30f2451375447485`, the boat cutscene tile binning pass). RADV writes the intended bits but the numeric-type mismatch is undefined. The task asks for a validation run to see whether the layers report it. I ran the boat-save cutscene for 125 s on GE-Proton11-16 with `VK_LAYER_KHRONOS_validation`, `VK_KHRONOS_VALIDATION_REPORT_FLAGS=error`, duplicate limit 3, warm shader store, no RenderDoc. World reached at ~39 s; run survived to timeout. Result: only the four known VUIDs — `03428`, `01688`, `01687` (6 each), `06409` (2) — and **no** message about image-store type, storage images, numeric type or `OpImageWrite` in the validation log. So the layers cannot be used as the gate for a fix; the check has to come from the translator/store side (the store's type from the view, or a typeless/raw store). Evidence: `/tmp/opencode/capture/valimg-store/20261201-213540/` (`validation.txt`, `log.txt`, `vk.log`), binary `/tmp/opencode/capture/bin-valimg` (clean main `ab7b4e6`). Not a performance measurement.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:42:11 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 20:40 UTC · original

Thanks, that answers the task's open question. I added your result to the task: github.com/vktory6/VKtory@ba1cf67

Since the layers stay silent, the gate for the fix has to come from the translator side: compare each store's SPIR-V type with the bound view's numeric type, count it, and make a mismatch loud. Closing this issue; the task "Image stores are float-typed whatever the view's format" keeps the work.

If you want a next topic: the anti-stutter tasks in docs/TASKS.md ("Texture fills on the GPU", "Renderer CPU: index slots", "Placed image creation in the streaming phase") have the biggest measured payoff right now.

**@⁠vktory6** on GitHub · 2026-12-01 20:40 UTC · [original](https://github.com/vktory6/VKtory/issues/138#issuecomment-7325095055) Thanks, that answers the task's open question. I added your result to the task: https://github.com/vktory6/VKtory/commit/ba1cf67 Since the layers stay silent, the gate for the fix has to come from the translator side: compare each store's SPIR-V type with the bound view's numeric type, count it, and make a mismatch loud. Closing this issue; the task "Image stores are float-typed whatever the view's format" keeps the work. If you want a next topic: the anti-stutter tasks in docs/TASKS.md ("Texture fills on the GPU", "Renderer CPU: index slots", "Placed image creation in the streaming phase") have the biggest measured payoff right now.
Author
Owner

@⁠TheRifai on GitHub · 2026-12-01 23:22 UTC · original

Cost-model measurement for the anti-stutter list (seen on main d59b4f8, RX 9070 XT, GE-Proton11-16, warm shader store, no validation layer, GE-Proton11-16). I ran three VKB_LAT=1 runs and aggregated the frec frames with present time >= 50 ms (own time of renderer labels, so nested "of which" labels are not double counted). The top labels per slow frame:

run slow frames slot_reads at Execute remap waits at present fill prepare slot_reads in lists
boat A (170 s) 427 8.22 ms 2.29 ms 3.02 ms 2.62 ms
boat B (150 s) 320 7.54 ms 3.02 ms 1.96 ms 2.40 ms
city 70% (150 s) 382 6.77 ms 4.37 ms 1.16 ms 2.08 ms

Full totals and all labels are in /tmp/opencode/capture/parse-lat.py applied to /tmp/opencode/capture/fill-cost-{lat2,boat2,city}/lat.txt.

So on current main, with a warm store, texture fill prepare is not the largest renderer-CPU item in slow frames: slot reads at Execute are 2-7x larger, and remap waits at presents are comparable. This differs from the presentwait b1 number (11.0 s of fill prepare in 46.7 s busy time over a 300 s stream-heavy boat run); these runs have far less cold streaming (pexl/xl warm, only 3-6 warm-up frames). Hypothesis: the GPU-detile idea pays mainly in cold-streaming bursts, not in the steady slow frames these runs sample. A cheaper first target remains slot reads (PR #143 reduced them 27%) and remap waits. If someone wants to test the detile idea, an A/B should be armed over a cold-streaming window, not a warm-store run. No code change from me; this is a prioritisation measurement, not a performance claim for a fix.

**@⁠TheRifai** on GitHub · 2026-12-01 23:22 UTC · [original](https://github.com/vktory6/VKtory/issues/138#issuecomment-7329263315) Cost-model measurement for the anti-stutter list (seen on main `d59b4f8`, RX 9070 XT, GE-Proton11-16, warm shader store, no validation layer, GE-Proton11-16). I ran three `VKB_LAT=1` runs and aggregated the `frec` frames with present time >= 50 ms (own time of renderer labels, so nested "of which" labels are not double counted). The top labels per slow frame: | run | slow frames | slot_reads at Execute | remap waits at present | fill prepare | slot_reads in lists | |---|---:|---:|---:|---:|---:| | boat A (170 s) | 427 | 8.22 ms | 2.29 ms | 3.02 ms | 2.62 ms | | boat B (150 s) | 320 | 7.54 ms | 3.02 ms | 1.96 ms | 2.40 ms | | city 70% (150 s) | 382 | 6.77 ms | 4.37 ms | 1.16 ms | 2.08 ms | Full totals and all labels are in `/tmp/opencode/capture/parse-lat.py` applied to `/tmp/opencode/capture/fill-cost-{lat2,boat2,city}/lat.txt`. So on current main, with a warm store, **texture fill prepare is not the largest renderer-CPU item in slow frames**: slot reads at Execute are 2-7x larger, and remap waits at presents are comparable. This differs from the presentwait b1 number (11.0 s of fill prepare in 46.7 s busy time over a 300 s stream-heavy boat run); these runs have far less cold streaming (pexl/xl warm, only 3-6 warm-up frames). Hypothesis: the GPU-detile idea pays mainly in cold-streaming bursts, not in the steady slow frames these runs sample. A cheaper first target remains slot reads (PR #143 reduced them 27%) and remap waits. If someone wants to test the detile idea, an A/B should be armed over a cold-streaming window, not a warm-store run. No code change from me; this is a prioritisation measurement, not a performance claim for a fix.
Author
Owner

@⁠TheRifai on GitHub · 2026-12-02 00:31 UTC · original

Addendum to the cost-model table: a camera-walk run on the same build/scene (boat save, GE-Proton11-16, warm store, VKB_LAT, keys W/I/K/J/L/W over 170 s, /tmp/opencode/capture/fill-cost-walk/lat.txt) gives 363 slow frames with per-slow-frame own times: slot_reads at Execute 7.07 ms, rec draw/dispatch 3.59 ms, remap waits 3.53 ms, run_list 3.53 ms, fill prepare 1.35 ms, slot_reads in lists 2.01 ms. So even with a walk that streams more textures, fill prepare stays below slot reads and remap waits. Four runs now agree; I still have no evidence that a warm-store A/B would show the GPU-detile idea paying off. The cold-streaming window remains the case to measure before committing to that refactor.

**@⁠TheRifai** on GitHub · 2026-12-02 00:31 UTC · [original](https://github.com/vktory6/VKtory/issues/138#issuecomment-7330656229) Addendum to the cost-model table: a camera-walk run on the same build/scene (boat save, GE-Proton11-16, warm store, VKB_LAT, keys W/I/K/J/L/W over 170 s, `/tmp/opencode/capture/fill-cost-walk/lat.txt`) gives 363 slow frames with per-slow-frame own times: slot_reads at Execute 7.07 ms, rec draw/dispatch 3.59 ms, remap waits 3.53 ms, run_list 3.53 ms, fill prepare 1.35 ms, slot_reads in lists 2.01 ms. So even with a walk that streams more textures, fill prepare stays below slot reads and remap waits. Four runs now agree; I still have no evidence that a warm-store A/B would show the GPU-detile idea paying off. The cold-streaming window remains the case to measure before committing to that refactor.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/vktory6--VKtory#138
No description provided.