vulkan: classify command batches in one pass #1264

Open
github-bot wants to merge 1 commit from github-bot/gh-1264 into main AGit
Owner

@⁠Kadamitas on GitHub · 2026-11-24 21:03 UTC · original
Kadamitas:perf/classify-queue-batch-once → main · +12 −15 · 1 files · 1 commits · open

Claimed in the coordination issue as: queue command classification

What and why

Calculate the shader-use flag, predication capture count and queue-specific clear rejection during the existing pre-lock scan. Classification remains linear and avoids later command traversals inside the queue setup.

Tested

  • All 1,581 CPU behavior comparisons matched the existing classifiers.
  • The native Vulkan queue test passed on SwiftShader on Windows 11 x64.
  • For 4,096 synthetic commands, median classification time was 3.31 to 3.08 microseconds on the direct-queue path and 4.87 to 3.76 microseconds on the compute-queue path.

GPUs tested: SwiftShader software Vulkan on Windows 11 x64.

AI-assisted: yes

  • One topic with synthetic inputs and no game data.
**@⁠Kadamitas** on GitHub · 2026-11-24 21:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1264) `Kadamitas:perf/classify-queue-batch-once` → `main` · +12 −15 · 1 files · 1 commits · open Claimed in the coordination issue as: [queue command classification](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Calculate the shader-use flag, predication capture count and queue-specific clear rejection during the existing pre-lock scan. Classification remains linear and avoids later command traversals inside the queue setup. ### Tested - All 1,581 CPU behavior comparisons matched the existing classifiers. - The native Vulkan queue test passed on SwiftShader on Windows 11 x64. - For 4,096 synthetic commands, median classification time was 3.31 to 3.08 microseconds on the direct-queue path and 4.87 to 3.76 microseconds on the compute-queue path. GPUs tested: SwiftShader software Vulkan on Windows 11 x64. AI-assisted: yes - [x] One topic with synthetic inputs and no game data.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:44:58 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 14:41 UTC · original

Reviewed e13477cb4: read the change (three command-list scans folded into one in execute_now — clear refusal,
predication captures, runs_shaders) — a semantics-preserving code motion. Verified by building and running the 14
CPU-side replay/queue tests that drive execute_now (replay_query_edges, clear gate, predication, zero-init,
cpu-bench self-test) on the branch and on its merge base 0b45fdc21: identical, all passing on both (GPU queue tests
skipped, no device). The branch conflicts with current main (merge-tree: one region at the head of execute_now);
main's execute_now has since gained execute_call, before_execute_/input_probe_ and queue_unsupported —
please redo the fold on top of that.
AI-assisted review.

Recommendation: Fix first

**@⁠PierreEbele** on GitHub · 2026-11-25 14:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1264#issuecomment-7165671576) Reviewed e13477cb4: read the change (three command-list scans folded into one in `execute_now` — clear refusal, predication captures, runs_shaders) — a semantics-preserving code motion. Verified by building and running the 14 CPU-side replay/queue tests that drive `execute_now` (replay_query_edges, clear gate, predication, zero-init, cpu-bench self-test) on the branch and on its merge base 0b45fdc21: identical, all passing on both (GPU queue tests skipped, no device). The branch conflicts with current main (merge-tree: one region at the head of `execute_now`); main's `execute_now` has since gained `execute_call`, `before_execute_`/`input_probe_` and `queue_unsupported` — please redo the fold on top of that. AI-assisted review. **Recommendation:** Fix first
This pull request has changes conflicting with the target branch.
  • runtime/src/vulkan_backend.h
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1264/head:github-bot/gh-1264'
git switch 'github-bot/gh-1264'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1264'
git switch 'github-bot/gh-1264'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1264'
git switch 'github-bot/gh-1264'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1264'
git switch 'main'
git merge --squash 'github-bot/gh-1264'
git switch 'main'
git merge --ff-only 'github-bot/gh-1264'
git switch 'main'
git merge 'github-bot/gh-1264'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.