[PR #1196] vulkan: copy descriptor table slots directly into mapped staging #1228

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

📋 Pull Request Information

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

Base: main ← Head: perf/descriptor-table-staging


📝 Commits (1)

  • 2fd49df vulkan: copy the descriptor table directly into mapped staging

📊 Changes

1 file changed (+15 additions, -17 deletions)

View changed files

📝 runtime/src/descriptor_table.h (+15 -17)

📄 Description

Claimed in the coordination issue as bulk-copy occupied descriptor staging slots.

What and why

Full bindless table uploads currently write every slot in small fragments, even though the descriptor and value records are already laid out in upload order. Copy the occupied slot range directly into mapped staging and use the same serializer for both the span and pointer entry points. The cleared-marker form still clears those words, and the upload layout and tombstone values are preserved.

Tested

  • The existing descriptor_table_test passed on Windows.
  • A synthetic byte comparison matched 2,309,432 bytes across aligned and unaligned destinations, with marker clearing enabled and disabled, including insert, erase, clear and rehash.
  • On a Ryzen 9 7950X with MSVC /O2, a 40 MiB write-combined staging copy took 5.49–5.64 ms before and 1.39–1.44 ms after. Each result is the median of nine groups of four copies, with baseline and patch measured in alternating order. This measures CPU staging time.

GPUs tested: N/A. The benchmark used native Windows write-combined host pages.

AI-assisted: yes.

Checklist

  • Based on current main (6293c1c4f).
  • One topic.
  • No game data, keys or decryption.

🔄 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/1196 **Author:** [@Kadamitas](https://github.com/Kadamitas) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `perf/descriptor-table-staging` --- ### 📝 Commits (1) - [`2fd49df`](https://github.com/ubiquitarianism/leonida/commit/2fd49df8f71b83d2da88c264db3673650aa8b465) vulkan: copy the descriptor table directly into mapped staging ### 📊 Changes **1 file changed** (+15 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `runtime/src/descriptor_table.h` (+15 -17) </details> ### 📄 Description Claimed in the coordination issue as [bulk-copy occupied descriptor staging slots](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7142898070). ### What and why Full bindless table uploads currently write every slot in small fragments, even though the descriptor and value records are already laid out in upload order. Copy the occupied slot range directly into mapped staging and use the same serializer for both the span and pointer entry points. The cleared-marker form still clears those words, and the upload layout and tombstone values are preserved. ### Tested - The existing `descriptor_table_test` passed on Windows. - A synthetic byte comparison matched 2,309,432 bytes across aligned and unaligned destinations, with marker clearing enabled and disabled, including insert, erase, clear and rehash. - On a Ryzen 9 7950X with MSVC /O2, a 40 MiB write-combined staging copy took 5.49–5.64 ms before and 1.39–1.44 ms after. Each result is the median of nine groups of four copies, with baseline and patch measured in alternating order. This measures CPU staging time. GPUs tested: N/A. The benchmark used native Windows write-combined host pages. AI-assisted: yes. ### Checklist - [x] Based on current `main` (`6293c1c4f`). - [x] One topic. - [x] No game data, keys or decryption. --- <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#1228
No description provided.