mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:25:52 +01:00
[PR #1713] vulkan: coalesce equal image layout ranges (VK-IMAGE-LAYOUT-RANGE-COALESCING) #1726
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1726
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1713
Author: @akimfomin
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:codex/vulkan-image-layout-range-coalescing📝 Commits (1)
ef9ae1fvulkan: coalesce equal layout ranges (VK-IMAGE-LAYOUT-RANGE-COALESCING)📊 Changes
2 files changed (+90 additions, -15 deletions)
View changed files
📝
runtime/src/vulkan_replay.h(+59 -7)📝
runtime/test/d3d12_state_map_test.cpp(+31 -8)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.