[PR #1284] vulkan: a barrier that keeps an image's layout adds no tracker journal entry, and tests for the journal (VK-TRACKER-NO-COPY) #1316

Open
opened 2026-11-26 20:20:50 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1284
Author: @DadaCap
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: vk-tracker-undo


📝 Commits (6)

  • c74f8f3 vulkan: a submission changes the layout tracker in place and takes its changes back (VK-TRACKER-NO-COPY)
  • 5959a09 vulkan: a barrier that keeps the layout leaves the tracker alone
  • ddda285 Merge main into vk-tracker-undo: the tracker is told of a real layout change only, never of a release
  • 2c17881 Merge origin/main into vk-tracker-undo
  • 8532369 Merge main into vk-tracker-undo: main's journal (#1723) replaces ours; the same-layout skip and the tests stay
  • 7358f32 Merge main into vk-tracker-undo: main's depth-UAV barrier statistics arguments with the same-layout skip

📊 Changes

2 files changed (+89 additions, -2 deletions)

View changed files

📝 runtime/src/vulkan_replay.h (+7 -2)
📝 runtime/test/replay_texture_barrier_test.cpp (+82 -0)

📄 Description

Claimed in the coordination issue as: VK-TRACKER-NO-COPY

Narrowed on 2026-11-25. This pull request replaced the copy of the whole LayoutTracker per submission with an undo journal. #1723 merged the same journal into main, so after merging main (its version taken in both files) only the part it does not have is left: 7 net lines in vulkan_replay.h and the tests.

What

  • A change to the layout an image already has adds no journal entry. to_attachment and the texture barrier in emit_commands called LayoutTracker::set even when every piece already had the new layout. With the journal open, the first such call per image and submission copies that image's entry (two allocations). They now call set only when a piece really changes, or for a discard. The barrier itself is still recorded. initialize() updates the tracker itself for an image's first use.
  • Tests for the journal, which main has none of: begin/rollback/commit (a changed layout put back, a second change keeping the first note, an image tracked since begin forgotten again, a forgotten image brought back, commit keeping the change), and a same-layout barrier or attachment reuse allocating nothing while still recording its barrier.

Tests

RTX 5080, NVIDIA 621.24, Windows 11, VS 18 RelWithDebInfo, head 8532369aa (main 0d80bc5df merged in): ctest without the tests that match present|window|splash|pad|xinput|movie (they open windows): 423 of 423 pass, replay_texture_barrier_test among them. Not run: those excluded tests, other GPUs, Linux, a retail boot of this head.

AI-assisted (Claude Code).

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1284 **Author:** [@DadaCap](https://github.com/DadaCap) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `vk-tracker-undo` --- ### 📝 Commits (6) - [`c74f8f3`](https://github.com/ubiquitarianism/leonida/commit/c74f8f38340f91218b16b31926a12e240f7f91f3) vulkan: a submission changes the layout tracker in place and takes its changes back (VK-TRACKER-NO-COPY) - [`5959a09`](https://github.com/ubiquitarianism/leonida/commit/5959a09f53223eb26dad2c02da340d8045d66b11) vulkan: a barrier that keeps the layout leaves the tracker alone - [`ddda285`](https://github.com/ubiquitarianism/leonida/commit/ddda285799feda76da87c074f6919c493007e90f) Merge main into vk-tracker-undo: the tracker is told of a real layout change only, never of a release - [`2c17881`](https://github.com/ubiquitarianism/leonida/commit/2c178819ff68e82ba27ce0677f84b812576ad8bb) Merge origin/main into vk-tracker-undo - [`8532369`](https://github.com/ubiquitarianism/leonida/commit/8532369aa65f44640154353cd974207b67718464) Merge main into vk-tracker-undo: main's journal (#1723) replaces ours; the same-layout skip and the tests stay - [`7358f32`](https://github.com/ubiquitarianism/leonida/commit/7358f3261fd73c5477f984c78fffd623d0a4acc7) Merge main into vk-tracker-undo: main's depth-UAV barrier statistics arguments with the same-layout skip ### 📊 Changes **2 files changed** (+89 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `runtime/src/vulkan_replay.h` (+7 -2) 📝 `runtime/test/replay_texture_barrier_test.cpp` (+82 -0) </details> ### 📄 Description Claimed in the coordination issue as: VK-TRACKER-NO-COPY **Narrowed on 2026-11-25.** This pull request replaced the copy of the whole `LayoutTracker` per submission with an undo journal. #1723 merged the same journal into `main`, so after merging `main` (its version taken in both files) only the part it does not have is left: 7 net lines in `vulkan_replay.h` and the tests. ## What - **A change to the layout an image already has adds no journal entry.** `to_attachment` and the texture barrier in `emit_commands` called `LayoutTracker::set` even when every piece already had the new layout. With the journal open, the first such call per image and submission copies that image's entry (two allocations). They now call `set` only when a piece really changes, or for a discard. The barrier itself is still recorded. `initialize()` updates the tracker itself for an image's first use. - **Tests for the journal**, which `main` has none of: `begin`/`rollback`/`commit` (a changed layout put back, a second change keeping the first note, an image tracked since `begin` forgotten again, a forgotten image brought back, `commit` keeping the change), and a same-layout barrier or attachment reuse allocating nothing while still recording its barrier. ## Tests RTX 5080, NVIDIA 621.24, Windows 11, VS 18 RelWithDebInfo, head 8532369aa (`main` 0d80bc5df merged in): `ctest` without the tests that match `present|window|splash|pad|xinput|movie` (they open windows): **423 of 423 pass**, `replay_texture_barrier_test` among them. Not run: those excluded tests, other GPUs, Linux, a retail boot of this head. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#1316
No description provided.