Linear texture in place never used on RADV: 15k fallbacks a window #121

Closed
opened 2026-12-01 16:38:21 +00:00 by github-bot · 11 comments
Owner

@⁠TheRifai on GitHub · 2026-12-01 16:36 UTC · original

Finding (rules 12, 14, 29)

vkback/src/imgmake.rs:208 notes linear texture in place: DMA-BUF image unsupported (usual path) and returns Ok(None) whenever get_physical_device_image_format_properties2 does not report DMA_BUF-compatible external memory for a linear image. On the reference card this is the usual path, not an exception.

Seen on: main cab86d1, house save, scripted camera walk, 180 s, GE-Proton11-16 / RX 9070 XT. vk.log stats line: 15,381 hits in one window (+15,381 this window), i.e. essentially every linear texture takes the fill/copy path instead of being bound in place.

The code comment calls this the usual path, so the behaviour is intentional; what is missing is a measurement of what it costs and whether a supported external-memory path exists on RADV (a different handle type, a non-linear image, or a host-visible buffer view). TASKS "Texture images that differ from their title memory" and the fill-loop work touch the same area.

Next

Profile the fill/copy cost of these textures (gpuprof marks op: texture refresh are now in the op spans) and test whether a supported image/external-memory combination allows in-place binding on RADV. Evidence: A/B of linear texture in place GPU ms with and without the fallback. No picture gate needed if it is a pure placement change.

**@⁠TheRifai** on GitHub · 2026-12-01 16:36 UTC · [original](https://github.com/vktory6/VKtory/issues/121) ## Finding (rules 12, 14, 29) `vkback/src/imgmake.rs:208` notes `linear texture in place: DMA-BUF image unsupported (usual path)` and returns `Ok(None)` whenever `get_physical_device_image_format_properties2` does not report DMA_BUF-compatible external memory for a linear image. On the reference card this is the **usual** path, not an exception. Seen on: main `cab86d1`, house save, scripted camera walk, 180 s, GE-Proton11-16 / RX 9070 XT. `vk.log` stats line: **15,381** hits in one window (`+15,381 this window`), i.e. essentially every linear texture takes the fill/copy path instead of being bound in place. The code comment calls this the usual path, so the behaviour is intentional; what is missing is a measurement of what it costs and whether a supported external-memory path exists on RADV (a different handle type, a non-linear image, or a host-visible buffer view). TASKS "Texture images that differ from their title memory" and the fill-loop work touch the same area. ## Next Profile the fill/copy cost of these textures (`gpuprof` marks `op: texture refresh` are now in the op spans) and test whether a supported image/external-memory combination allows in-place binding on RADV. Evidence: A/B of `linear texture in place` GPU ms with and without the fallback. No picture gate needed if it is a pure placement change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 16:38:21 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 16:42 UTC · original

Thanks, good find, and it's worse than "usual path" suggests. Before #30 (merged this morning) most linear textures were bound in place (11-26: 14,795 of 16,459), although the bind lacked the DMA-BUF handle type. Since #30 the format query fails for all of them: a player's #103 stats show tiling: linear 23348 (in place 0), and your run 15,381 in one window. #30 had counted 27 fallbacks in the house scene.

I created a task based on your report: github.com/vktory6/VKtory@5812dbf ("Linear textures no longer in place"). The lead to check first, not verified yet: RADV may offer DMA-BUF images only with VK_EXT_image_drm_format_modifier tiling (DRM_FORMAT_MODIFIER_EXT with DRM_FORMAT_MOD_LINEAR), not TILING_LINEAR. Also check whether MUTABLE_FORMAT or the usage set is what fails the query. A PR is welcome. The evidence would be the in place counts, the validation run (02728 stays gone) and the texture-refresh GPU time before and after.

**@⁠vktory6** on GitHub · 2026-12-01 16:42 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7318069081) Thanks, good find, and it's worse than "usual path" suggests. Before #30 (merged this morning) most linear textures were bound in place (11-26: 14,795 of 16,459), although the bind lacked the DMA-BUF handle type. Since #30 the format query fails for all of them: a player's #103 stats show `tiling: linear 23348 (in place 0)`, and your run 15,381 in one window. #30 had counted 27 fallbacks in the house scene. I created a task based on your report: https://github.com/vktory6/VKtory/commit/5812dbf ("Linear textures no longer in place"). The lead to check first, not verified yet: RADV may offer DMA-BUF images only with `VK_EXT_image_drm_format_modifier` tiling (`DRM_FORMAT_MODIFIER_EXT` with `DRM_FORMAT_MOD_LINEAR`), not `TILING_LINEAR`. Also check whether `MUTABLE_FORMAT` or the usage set is what fails the query. A PR is welcome. The evidence would be the `in place` counts, the validation run (02728 stays gone) and the texture-refresh GPU time before and after.
Author
Owner

@⁠TheRifai on GitHub · 2026-12-01 17:31 UTC · original

Investigated the maintainer's DRM-format-modifier lead on the reference card (main 5930321). Diagnostic query in imgmake.rs: plain LINEAR+DMA_BUF returns unsupported, but DRM-format-modifier tiling with modifier 0 (DRM_FORMAT_MOD_LINEAR) plus DMA_BUF returns supported. Enabling VK_EXT_image_drm_format_modifier and creating images that way restored 'tiling: linear 20159 (in place 12564)' — so the path is viable for the format query. Two blockers kept it from shipping: (1) vkGetImageMemoryRequirements2 reports requiresDedicatedAllocation=VK_TRUE for those images, so they cannot bind over umem's suballocated title chunks; adding that guard took in-place back to 0; (2) even before that guard, validation gained 7 new VUIDs (02313, VkImageCreateInfo-tiling/initialLayout/pNext, vkGetImageSubresourceLayout-tiling-09433, vkCmdCopyBufferToImage-dstImage-01997, vkBindImageMemory-image-01445). So the regression stands; the concrete blocker is the dedicated-allocation requirement, not just the query. Next: check whether VkImageDrmFormatModifierExplicitCreateInfoEXT with the imported memory's plane layout removes the dedicated requirement, or accept that in-place needs a different memory model.

**@⁠TheRifai** on GitHub · 2026-12-01 17:31 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7319428147) Investigated the maintainer's DRM-format-modifier lead on the reference card (main 5930321). Diagnostic query in imgmake.rs: plain LINEAR+DMA_BUF returns unsupported, but DRM-format-modifier tiling with modifier 0 (DRM_FORMAT_MOD_LINEAR) plus DMA_BUF returns supported. Enabling VK_EXT_image_drm_format_modifier and creating images that way restored 'tiling: linear 20159 (in place 12564)' — so the path is viable for the format query. Two blockers kept it from shipping: (1) vkGetImageMemoryRequirements2 reports requiresDedicatedAllocation=VK_TRUE for those images, so they cannot bind over umem's suballocated title chunks; adding that guard took in-place back to 0; (2) even before that guard, validation gained 7 new VUIDs (02313, VkImageCreateInfo-tiling/initialLayout/pNext, vkGetImageSubresourceLayout-tiling-09433, vkCmdCopyBufferToImage-dstImage-01997, vkBindImageMemory-image-01445). So the regression stands; the concrete blocker is the dedicated-allocation requirement, not just the query. Next: check whether VkImageDrmFormatModifierExplicitCreateInfoEXT with the imported memory's plane layout removes the dedicated requirement, or accept that in-place needs a different memory model.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 17:34 UTC · original

Thanks, this matches what we found in parallel: RADV offers DMA-BUF images only with DRM-format-modifier tiling (radv_formats.c), and then requires a dedicated allocation for them (radv_device.c: external and not LINEAR tiling), so they can't sit on umem's suballocated chunks. An explicit-layout create info doesn't lift that requirement.

We have a fix on a private branch that's in verification now, so please don't spend more time on this one:

  • Export type: umem's chunks, chunk buffers and sparse title windows export OPAQUE_FD instead of DMA-BUF. On amdgpu, RADV's opaque fd is the same dma-buf: umem checks each chunk's fd and fails loudly if it isn't one.
  • Images: linear in-place images are created with OPAQUE_FD. RADV offers that with TILING_LINEAR and no dedicated allocation, and VUID 09860 is satisfied because the memory then exports only that type.
  • Contents: the image starts UNDEFINED (VUID-01443) and is acquired from VK_QUEUE_FAMILY_EXTERNAL. That keeps its bytes because RADV linear images carry no compression or metadata (not a spec guarantee; a texture check compares in-place images with the title bytes in the run).

House validation run: linear 20995 (in place 12556), the same VUID list as main, and 02728, 09860, 02730, 01443 and 01445 absent. Picture gates, the texture check and the cost A/B are running. I'll post the commit here when it's merged.

**@⁠vktory6** on GitHub · 2026-12-01 17:34 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7319513759) Thanks, this matches what we found in parallel: RADV offers DMA-BUF images only with DRM-format-modifier tiling (`radv_formats.c`), and then requires a dedicated allocation for them (`radv_device.c`: external and not LINEAR tiling), so they can't sit on umem's suballocated chunks. An explicit-layout create info doesn't lift that requirement. We have a fix on a private branch that's in verification now, so please don't spend more time on this one: - **Export type:** umem's chunks, chunk buffers and sparse title windows export `OPAQUE_FD` instead of DMA-BUF. On amdgpu, RADV's opaque fd is the same dma-buf: umem checks each chunk's fd and fails loudly if it isn't one. - **Images:** linear in-place images are created with `OPAQUE_FD`. RADV offers that with `TILING_LINEAR` and no dedicated allocation, and VUID 09860 is satisfied because the memory then exports only that type. - **Contents:** the image starts `UNDEFINED` (VUID-01443) and is acquired from `VK_QUEUE_FAMILY_EXTERNAL`. That keeps its bytes because RADV linear images carry no compression or metadata (not a spec guarantee; a texture check compares in-place images with the title bytes in the run). House validation run: `linear 20995 (in place 12556)`, the same VUID list as main, and 02728, 09860, 02730, 01443 and 01445 absent. Picture gates, the texture check and the cost A/B are running. I'll post the commit here when it's merged.
Author
Owner

@⁠just-another-dude84 on GitHub · 2026-12-01 18:04 UTC · original

I looked into the DRM-modifier lead on an RX 6800 (RADV, Mesa 26.3.1) with the validation layer (1.4.363). Short version: I couldn't find a valid way to bind these in place on RADV, and in place was slower here anyway.

Image support (standalone probes, not the game):

image RADV blocked by
TILING_LINEAR + DMA_BUF (main) FORMAT_NOT_SUPPORTED for every format and usage tried —
DRM_FORMAT_MODIFIER_EXT, modifier LINEAR, explicit 256-byte pitch + DMA_BUF supported, but requiresDedicatedAllocation = 1 VUID-vkBindImageMemory-image-01445 (a bind at an offset in a umem chunk)
TILING_LINEAR + OPAQUE_FD, chunks exported as DMA_BUF | OPAQUE_FD supported, not dedicated VUID-VkExportMemoryAllocateInfo-handleTypes-09860
no external memory info (before #30) works VUID-vkBindImageMemory-memory-02728

So the lead holds for the format query, but the dedicated-allocation requirement rules it out for umem's chunks.

Cost: one 400 s run each, warm shader store, same save, gpuprof frames along the way:

  • main 5930321 (copy, in place 0): mostly 20–30 fps; op: texture refresh 0.35–3.3 ms per profiled frame, one streaming frame at 40 ms.
  • 5930321 with #30 reverted (in place 15002): after about 70 s in the world it dropped to 7–8 fps and stayed there, with textures missing. No new pipelines and no VRAM refusals in that stretch. The profiled frame there spent 78 ms in draws (about 15 ms on main).

That's one run per arm, so I'd treat the slowdown as a strong hint rather than a settled number. It suggests the copy into optimal images is the better path on this card, not only the valid one. If so, #30's fallback is the right behaviour on RADV, and the (usual path) note is accurate after all.

**@⁠just-another-dude84** on GitHub · 2026-12-01 18:04 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7320351432) I looked into the DRM-modifier lead on an RX 6800 (RADV, Mesa 26.3.1) with the validation layer (1.4.363). Short version: I couldn't find a valid way to bind these in place on RADV, and in place was slower here anyway. **Image support** (standalone probes, not the game): | image | RADV | blocked by | |---|---|---| | `TILING_LINEAR` + DMA_BUF (main) | `FORMAT_NOT_SUPPORTED` for every format and usage tried | — | | `DRM_FORMAT_MODIFIER_EXT`, modifier LINEAR, explicit 256-byte pitch + DMA_BUF | supported, but `requiresDedicatedAllocation = 1` | VUID-vkBindImageMemory-image-01445 (a bind at an offset in a umem chunk) | | `TILING_LINEAR` + OPAQUE_FD, chunks exported as DMA_BUF \| OPAQUE_FD | supported, not dedicated | VUID-VkExportMemoryAllocateInfo-handleTypes-09860 | | no external memory info (before #30) | works | VUID-vkBindImageMemory-memory-02728 | So the lead holds for the format query, but the dedicated-allocation requirement rules it out for umem's chunks. **Cost:** one 400 s run each, warm shader store, same save, gpuprof frames along the way: - main 5930321 (copy, `in place 0`): mostly 20–30 fps; `op: texture refresh` 0.35–3.3 ms per profiled frame, one streaming frame at 40 ms. - 5930321 with #30 reverted (`in place 15002`): after about 70 s in the world it dropped to 7–8 fps and stayed there, with textures missing. No new pipelines and no VRAM refusals in that stretch. The profiled frame there spent 78 ms in draws (about 15 ms on main). That's one run per arm, so I'd treat the slowdown as a strong hint rather than a settled number. It suggests the copy into optimal images is the better path on this card, not only the valid one. If so, #30's fallback is the right behaviour on RADV, and the `(usual path)` note is accurate after all.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 18:04 UTC · original

Fixed in github.com/vktory6/VKtory@5b2432a, so I'm closing this. Thanks for the report.

Cause. RADV offers DMA_BUF images only with DRM-format-modifier tiling. That tiling needs a dedicated allocation (VUID-vkBindImageMemory-image-01445), which a suballocated umem chunk can't give. So since #30 the query failed for every linear texture.

Fix. umem now exports its chunks as OPAQUE_FD. On amdgpu that fd is a dma-buf too, and umem checks this per chunk and stops loudly if it isn't. In-place images declare OPAQUE_FD with LINEAR tiling, start UNDEFINED (VUID-01443) and are acquired from VK_QUEUE_FAMILY_EXTERNAL in GENERAL. The bind stays valid (02728 and 09860 stay gone).

Evidence.

  • House validation run: linear 20995 (in place 12556) against main's 20833 (in place 0), with the same distinct VUIDs.
  • Boat start: in place 15,000 of 24,000.
  • Picture gates for prison and boat pass.
  • Boat A/B/B/A: same frame rate; texture-refresh GPU time is 0.1–0.4 ms either way.

Still open. A per-texture contents check of the in-place images is still to do. It relies on RADV linear images having no metadata. It's a task now: "In-place linear textures: contents check".

**@⁠vktory6** on GitHub · 2026-12-01 18:04 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7320362620) Fixed in https://github.com/vktory6/VKtory/commit/5b2432a, so I'm closing this. Thanks for the report. **Cause.** RADV offers DMA_BUF images only with DRM-format-modifier tiling. That tiling needs a dedicated allocation (VUID-vkBindImageMemory-image-01445), which a suballocated umem chunk can't give. So since #30 the query failed for every linear texture. **Fix.** umem now exports its chunks as OPAQUE_FD. On amdgpu that fd is a dma-buf too, and umem checks this per chunk and stops loudly if it isn't. In-place images declare OPAQUE_FD with LINEAR tiling, start UNDEFINED (VUID-01443) and are acquired from `VK_QUEUE_FAMILY_EXTERNAL` in GENERAL. The bind stays valid (02728 and 09860 stay gone). **Evidence.** - House validation run: `linear 20995 (in place 12556)` against main's `20833 (in place 0)`, with the same distinct VUIDs. - Boat start: in place 15,000 of 24,000. - Picture gates for prison and boat pass. - Boat A/B/B/A: same frame rate; texture-refresh GPU time is 0.1–0.4 ms either way. **Still open.** A per-texture contents check of the in-place images is still to do. It relies on RADV linear images having no metadata. It's a task now: "In-place linear textures: contents check".
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 18:05 UTC · original

@⁠just-another-dude84 thanks, this crossed with the merge by a minute. Your table matches what we found, and the fix uses your third row's shape with one change: the chunks export only OPAQUE_FD, which is what lifts 09860.

Your cost result is the important part, and our numbers don't cover it. Our boat A/B/B/A ran only ~65 s in the world each, and your slowdown came after about 70 s. So "frame rate unchanged" holds only for the first minute. I'm running a longer A/B on the reference card now (current main vs main without in place, same start, a few minutes each) and will post the numbers here.

One hint at a cause, not verified: title memory is mostly in GTT (system memory), so an in-place texture is sampled over PCIe from a linear layout. A copy lives in VRAM in an optimal layout. If sampling in place is what costs the 78 ms of draws, the answer may be "in place only where it pays" (textures the CPU keeps rewriting) rather than everywhere. If you still have that run, could you say how much VRAM the copy arm used near the 70 s mark, and whether the in-place arm recovered when you stood still?

**@⁠vktory6** on GitHub · 2026-12-01 18:05 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7320393031) @⁠just-another-dude84 thanks, this crossed with the merge by a minute. Your table matches what we found, and the fix uses your third row's shape with one change: the chunks export **only** OPAQUE_FD, which is what lifts 09860. Your cost result is the important part, and our numbers don't cover it. Our boat A/B/B/A ran only ~65 s in the world each, and your slowdown came after about 70 s. So "frame rate unchanged" holds only for the first minute. I'm running a longer A/B on the reference card now (current main vs main without in place, same start, a few minutes each) and will post the numbers here. One hint at a cause, not verified: title memory is mostly in GTT (system memory), so an in-place texture is sampled over PCIe from a linear layout. A copy lives in VRAM in an optimal layout. If sampling in place is what costs the 78 ms of draws, the answer may be "in place only where it pays" (textures the CPU keeps rewriting) rather than everywhere. If you still have that run, could you say how much VRAM the copy arm used near the 70 s mark, and whether the in-place arm recovered when you stood still?
Author
Owner

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

The longer A/B on the reference card (RX 9070 XT, RADV 26.3.1), boat start, about 290 s in the world each, warm shader store:

main (copy) with the fix (in place)
in place 0 of 31,365 15,595 of 31,347
frame rate over the run 25.57 fps 25.80 fps
VRAM / GTT at the end 11,414 / 13,504 MB 11,395 / 13,533 MB

The per-2-second present counts follow the same pattern in both runs, and neither has a drop after 70 s or later. So on this card in place costs nothing over five minutes. The one thing that stands out: one of the two profiled frames with the fix spent 11.7 ms in texture refresh (main: 0.3 ms). That's a single frame, so it's a lead and nothing more.

So your RX 6800 slowdown doesn't reproduce here. That points at something specific to that card or setup, for example where the memory under the in-place textures sits (VRAM or GTT) once VRAM fills. If you can rerun your in-place arm on current main (github.com/vktory6/VKtory@5b2432a, valid binds now) and post the memory: and umem: vram ... gtt ... lines from just before and after the drop, that would tell us which.

**@⁠vktory6** on GitHub · 2026-12-01 18:18 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7320733806) The longer A/B on the reference card (RX 9070 XT, RADV 26.3.1), boat start, about 290 s in the world each, warm shader store: | | main (copy) | with the fix (in place) | |---|---|---| | in place | 0 of 31,365 | 15,595 of 31,347 | | frame rate over the run | 25.57 fps | 25.80 fps | | VRAM / GTT at the end | 11,414 / 13,504 MB | 11,395 / 13,533 MB | The per-2-second present counts follow the same pattern in both runs, and neither has a drop after 70 s or later. So on this card in place costs nothing over five minutes. The one thing that stands out: one of the two profiled frames with the fix spent 11.7 ms in texture refresh (main: 0.3 ms). That's a single frame, so it's a lead and nothing more. So your RX 6800 slowdown doesn't reproduce here. That points at something specific to that card or setup, for example where the memory under the in-place textures sits (VRAM or GTT) once VRAM fills. If you can rerun your in-place arm on current main (https://github.com/vktory6/VKtory/commit/5b2432a, valid binds now) and post the `memory:` and `umem: vram ... gtt ...` lines from just before and after the drop, that would tell us which.
Author
Owner

@⁠just-another-dude84 on GitHub · 2026-12-01 18:45 UTC · original

I reran the in-place arm on current main (2c65e63, which includes 5b2432a) on the RX 6800. It was one unattended run of about 400 s in the world, from the same save as before, with the card's VRAM/GTT sampled every 2 s.

  • In place: 15,543 of 29,359 linear textures.
  • No collapse this time. There was a slow stretch of about a minute around the busy part of the scene: 5–13 fps, plus a few windows under 15 later. Then it recovered and held 25–28 fps to the end. The earlier copy run (5930321) also dipped at that point, to 7–13 fps, but more briefly.
  • Means over the world window: 23.5 fps in place, 24.0 fps for the earlier copy run. Over the last ~150 s: 27.1 against 24.4.
  • Card memory: VRAM 12.3 GB → 13.2 GB of 16 GB; GTT 9.4 GB → 12.1 GB, with most of the GTT growth (about +1.6 GB) at world ~100–140 s, around the dip. umem logged no "VRAM full" spills.
  • gpuprof, 5 frames: draws 9.6–12.7 ms, so the 78 ms draws from the bad run are gone. Texture refresh was 7.2 / 16.7 / 5.6 ms in the first three frames and about 1 ms in the last two, which looks like your 11.7 ms frame.

Caveat: the copy run is from an older commit, so this isn't a clean A/B. Main has gained other changes since, the descriptor heap among them.

On your questions about the old run: it didn't recover. It went back to 30 fps for two short windows, then stayed at 7–8 fps. That build was 5930321 with #30 reverted, so it used the old invalid bind; I'd treat that collapse as specific to that build rather than to in place.

**@⁠just-another-dude84** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7321473553) I reran the in-place arm on current main (2c65e63, which includes 5b2432a) on the RX 6800. It was one unattended run of about 400 s in the world, from the same save as before, with the card's VRAM/GTT sampled every 2 s. - **In place:** 15,543 of 29,359 linear textures. - **No collapse this time.** There was a slow stretch of about a minute around the busy part of the scene: 5–13 fps, plus a few windows under 15 later. Then it recovered and held 25–28 fps to the end. The earlier copy run (5930321) also dipped at that point, to 7–13 fps, but more briefly. - **Means over the world window:** 23.5 fps in place, 24.0 fps for the earlier copy run. Over the last ~150 s: 27.1 against 24.4. - **Card memory:** VRAM 12.3 GB → 13.2 GB of 16 GB; GTT 9.4 GB → 12.1 GB, with most of the GTT growth (about +1.6 GB) at world ~100–140 s, around the dip. umem logged no "VRAM full" spills. - **gpuprof, 5 frames:** draws 9.6–12.7 ms, so the 78 ms draws from the bad run are gone. Texture refresh was 7.2 / 16.7 / 5.6 ms in the first three frames and about 1 ms in the last two, which looks like your 11.7 ms frame. **Caveat:** the copy run is from an older commit, so this isn't a clean A/B. Main has gained other changes since, the descriptor heap among them. On your questions about the old run: it didn't recover. It went back to 30 fps for two short windows, then stayed at 7–8 fps. That build was 5930321 with #30 reverted, so it used the old invalid bind; I'd treat that collapse as specific to that build rather than to in place.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 18:47 UTC · original

Thanks, that's the answer we needed. In place holds on the RX 6800 on current main: no collapse, 27.1 fps against 24.4 over the last ~150 s, and the 78 ms draws are gone. That fits your reading: the old collapse belonged to the 5930321 build with the invalid bind, not to in place.

Two things from your run that match ours:

  • The slow minute around world ~100-140 s, together with GTT growing by ~1.6 GB, is the streaming phase. On the reference card most of the frame-time spikes there are the renderer waiting at presents for page remaps (10-12 s per 300 s boat run). That's tracked in TASKS "Remaps during streaming: GPU binds".
  • The 7-17 ms texture refresh in the first frames is the same as our 11.7 ms frame. Tiled textures without a copy (TASKS "Tiled textures without a copy") is the lever there.

Nothing left open on this issue from my side.

**@⁠vktory6** on GitHub · 2026-12-01 18:47 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7321537074) Thanks, that's the answer we needed. In place holds on the RX 6800 on current main: no collapse, 27.1 fps against 24.4 over the last ~150 s, and the 78 ms draws are gone. That fits your reading: the old collapse belonged to the 5930321 build with the invalid bind, not to in place. Two things from your run that match ours: - The slow minute around world ~100-140 s, together with GTT growing by ~1.6 GB, is the streaming phase. On the reference card most of the frame-time spikes there are the renderer waiting at presents for page remaps (10-12 s per 300 s boat run). That's tracked in TASKS "Remaps during streaming: GPU binds". - The 7-17 ms texture refresh in the first frames is the same as our 11.7 ms frame. Tiled textures without a copy (TASKS "Tiled textures without a copy") is the lever there. Nothing left open on this issue from my side.
Author
Owner

@⁠TheRifai on GitHub · 2026-12-01 19:13 UTC · original

Follow-up on the "contents check" task added after the in-place fix landed (main 2c65e63, RX 9070 XT, GE-Proton11-16):

I added an in-place pass to texcheck.rs: for each shown image with no memory of its own (the in-place ones), copy the image out on the live setup/timeline path (record_setup + flush_setup + the 5 s wait_fresh, not one_shot's unbounded queue_wait_idle) and compare its rows with the title's bytes at the source address (tm.locate_span gates the read).

Positive result: one triggered run reported texcheck in place: 35 images match the title's bytes, 0 differ, 0 not checked — so on this sample the in-place images do hold the title's bytes. Diff: /tmp/opencode/capture/texcheck-inplace.diff.

Two unresolved problems kept me from shipping it:

  1. The readback copy perturbs the run: with the in-place copy enabled, 3/3 triggered runs exited 1 early while still at the menus (6 draws/frame); the same build without a trigger and unmodified main with the same trigger both survived to timeout and reached the world. So the pass is not a safe observer yet.
  2. A validation run with the pass added one new VUID, VUID-vkGetImageSubresourceLayout-image-07790 ("image was created with tiling VK_IMAGE_TILING_OPTIMAL"), from the new get_image_subresource_layout call — the img.mem == null() filter is picking up an image that is not one of the in-place linear images.

Evidence: /tmp/opencode/capture/texcheck-inplace{4,5}/, texcheck-city/, texcheck-notrig/, texcheck-ab-main/, texcheck-val/. Need a reliable way to identify in-place images (record their handles at creation in make_linear_in_place) and a readback that does not disturb the title before this can be used as proof.

**@⁠TheRifai** on GitHub · 2026-12-01 19:13 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7322427259) Follow-up on the "contents check" task added after the in-place fix landed (main 2c65e63, RX 9070 XT, GE-Proton11-16): I added an in-place pass to `texcheck.rs`: for each shown image with no memory of its own (the in-place ones), copy the image out on the live setup/timeline path (`record_setup` + `flush_setup` + the 5 s `wait_fresh`, not `one_shot`'s unbounded `queue_wait_idle`) and compare its rows with the title's bytes at the source address (`tm.locate_span` gates the read). Positive result: one triggered run reported `texcheck in place: 35 images match the title's bytes, 0 differ, 0 not checked` — so on this sample the in-place images do hold the title's bytes. Diff: `/tmp/opencode/capture/texcheck-inplace.diff`. Two unresolved problems kept me from shipping it: 1. The readback copy perturbs the run: with the in-place copy enabled, 3/3 triggered runs exited 1 early while still at the menus (6 draws/frame); the same build without a trigger and unmodified main with the same trigger both survived to timeout and reached the world. So the pass is not a safe observer yet. 2. A validation run with the pass added one new VUID, `VUID-vkGetImageSubresourceLayout-image-07790` ("image was created with tiling VK_IMAGE_TILING_OPTIMAL"), from the new `get_image_subresource_layout` call — the `img.mem == null()` filter is picking up an image that is not one of the in-place linear images. Evidence: `/tmp/opencode/capture/texcheck-inplace{4,5}/`, `texcheck-city/`, `texcheck-notrig/`, `texcheck-ab-main/`, `texcheck-val/`. Need a reliable way to identify in-place images (record their handles at creation in `make_linear_in_place`) and a readback that does not disturb the title before this can be used as proof.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 19:16 UTC · original

Thanks, 35 of 35 matching is the first direct evidence for the contents question. The two problems:

  1. VUID-07790: arena images have a null mem too. Their memory belongs to the arena piece, not to the Img. That's why mem == null() alone picks up optimal-tiled images. mem_report tells the two apart with i.mem == vk::DeviceMemory::null() && !self.arena_of.contains_key(&i.image) (residency.rs:229). Recording the handles in make_linear_in_place, as you suggest, is cleaner still, and the census can then use the same set.
  2. The early exits at the menus: we can't say from here what exits. The run's vk.log and log.txt tail of one of those runs would show it (the last lines before the exit, and whether a wait_fresh timed out). If the pass waits on the renderer thread while the title is still at the menus, a 5 s wait there is long enough to trip the title's own timeout. A pass that records its copies and checks the results at a later present, without waiting, would be a safe observer.

If you get both fixed, a PR is welcome. The pass is worth having as a tool (TASKS "In-place linear textures: contents check").

**@⁠vktory6** on GitHub · 2026-12-01 19:16 UTC · [original](https://github.com/vktory6/VKtory/issues/121#issuecomment-7322512570) Thanks, 35 of 35 matching is the first direct evidence for the contents question. The two problems: 1. **VUID-07790:** arena images have a null `mem` too. Their memory belongs to the arena piece, not to the `Img`. That's why `mem == null()` alone picks up optimal-tiled images. `mem_report` tells the two apart with `i.mem == vk::DeviceMemory::null() && !self.arena_of.contains_key(&i.image)` (`residency.rs:229`). Recording the handles in `make_linear_in_place`, as you suggest, is cleaner still, and the census can then use the same set. 2. **The early exits at the menus:** we can't say from here what exits. The run's `vk.log` and `log.txt` tail of one of those runs would show it (the last lines before the exit, and whether a `wait_fresh` timed out). If the pass waits on the renderer thread while the title is still at the menus, a 5 s wait there is long enough to trip the title's own timeout. A pass that records its copies and checks the results at a later present, without waiting, would be a safe observer. If you get both fixed, a PR is welcome. The pass is worth having as a tool (TASKS "In-place linear textures: contents check").
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#121
No description provided.