Repository navigation
Conversation
kawaii-shakal
left a comment
There was a problem hiding this comment.
Review (read-only, not run). I traced the merge and the early-out:
index - 1is the previous mip of the same layer, andindex - e.mipsis the previous layer of the same plane, only read whenmip/layeris past the range base, so both are in bounds;last_runis keyed by mip with the aspect compared, so a depth run and a stencil run never merge;UNDEFINEDcells keep one piece each, soinitialize()still gets its per-piece transfer regions.
Looks correct to me. Two small things:
areawithVK_REMAINING_MIP_LEVELS/VK_REMAINING_ARRAY_LAYERSis about 2^64. It only feeds the<= 2test, so it is harmless, butvisitclamps the range and this doesn't, which reads oddly. Clamping it the same way would make the intent obvious.- "GPUs tested: none on this exact head". The replay emits fewer, larger barriers now, so one
replay_texture_barrier+d3d12_msaa_drawrun on a GPU with the sync validation layer would be worth it. I ran both on an RTX 5070 Ti for #778's merge with main; I can run this head the same way if useful.
AI-assisted review (Claude Code, Claude Opus 5.5).
|
Thanks for tracing the merge, @kawaii-shakal. Your RTX 5070 Ti run would be useful. Please use the unchanged Agreed that clamping the AI-assisted (Codex drafted this reply). |
|
Tested the unchanged head
AI-assisted testing (non-developer tester). |
|
DadaCap, thank you for suggesting that the equal-layout change stand on its own. kawaii-shakal, your review caught the difference between the range used by the early-out and the clamped range used for the visit. potatoe0100, the deliberate validation hazard in your RTX 4060 control makes your clean replay and MSAA results particularly valuable. I’m moving PortBridge to passive support and leaving this head at |
Claimed in the coordination issue as: VK-IMAGE-LAYOUT-RANGE-COALESCING
What and why
Merge adjacent initialized rectangles with the same prior Vulkan image layout and aspect. The replay still issues the same ordered calls and synchronization scopes. Mixed first-use cells keep individual pieces. Uniform, small mixed, and singleton-only ranges retain fast paths. There is a regression case for a two-mip, two-layer stripe beside first-use cells.
DadaCap suggested a separate follow-up in #1284. This change applies to main itself, and a local combination with #1284 also passed.
Tested
On Windows, Clang 23.1.6 built and ran
d3d12_state_map_test,replay_texture_barrier_test, and 96 seeded per-cell geometry cases on current main626d1281and on this patch. The same tests and a rollback/commit fixture passed on both arms of the combined tree with #1284 head2c178819. The combined partial-release case uses 3 instead of 12 image barriers. The ordered fixture uses 5 instead of 14 with the same per-cell layouts and scopes. Same-layout recording allocates zero in both arms.The earlier two-core CPU benchmark measured 640 to 2 records and 41.7–47.1% less partition time on stripes. Mostly-undefined and checkerboard partitions did not improve in that benchmark. Pinned benchmark and fixture sources
GPUs tested: none on this exact head. The linked earlier Vulkan readback used RTX 4070 Ti SUPER and tested a different revision.
AI-assisted: yes (Codex). PortBridge
Checklist