d3d12_vulkan_device: detect and enable VK_EXT_transform_feedback + vk_pipeline_check parity (D3D-TRANSFORM-FEEDBACK-DEVICE) #1891

Merged
BubsMcgee merged 3 commits from upstream-pr/1891 into main 2026-11-25 22:32:25 +00:00
BubsMcgee commented 2026-11-25 14:37:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T14:37:09Z.


Adopts #1236 by @Miici0 — the device detect/enable commit is unchanged and credited to them — because #1236 has been stuck waiting on workflow approval. Adds the vk_pipeline_check parity fix on top so the AMD pipeline cache actually hits.

Claimed in the coordination issue as: D3D-TRANSFORM-FEEDBACK-DEVICE (adopted from #1236; the vk_pipeline_check parity part is mine).

  • Detect VK_EXT_transform_feedback on the physical device, read transformFeedback / geometryStreams, record them on VulkanDeviceInfo, and enable the extension and features on the logical device — this is #1236's commit, verbatim.
  • Enable VK_EXT_transform_feedback in vk_pipeline_check, next to the mesh-shader feature, and list it in docs/pipeline_check.md ("The cache and the runtime's device"). AMD makes the extension part of a pipeline's cache key, so without this pipeline_cache_seed misses on AMD.
  • The remaining AMD pipeline_cache_seed mismatch from #1723's robustBufferAccess choice is #1833, not this PR.

This is foundation-only: StreamOutput PSOs are still refused and SOSetTargets is still not implemented. #1630 lands the real SO_STATISTICS query pools on top and depends on this.

Tested on main 71a769d7d (Windows 11 Pro 26300, MSVC RelWithDebInfo, NVIDIA RTX 3080 Ti, driver 616.64, Vulkan SDK 1.4.363.0): d3d12_vulkan_device, d3d12_mesh and pipeline_cache_seed pass, plain and with LEONIDA_VK_VALIDATION=1. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5493438531 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T14:37:09Z. --- Adopts #1236 by @Miici0 — the device detect/enable commit is unchanged and credited to them — because #1236 has been stuck waiting on workflow approval. Adds the `vk_pipeline_check` parity fix on top so the AMD pipeline cache actually hits. Claimed in the coordination issue as: D3D-TRANSFORM-FEEDBACK-DEVICE (adopted from #1236; the `vk_pipeline_check` parity part is mine). - Detect `VK_EXT_transform_feedback` on the physical device, read `transformFeedback` / `geometryStreams`, record them on `VulkanDeviceInfo`, and enable the extension and features on the logical device — this is #1236's commit, verbatim. - Enable `VK_EXT_transform_feedback` in `vk_pipeline_check`, next to the mesh-shader feature, and list it in `docs/pipeline_check.md` ("The cache and the runtime's device"). AMD makes the extension part of a pipeline's cache key, so without this `pipeline_cache_seed` misses on AMD. - The remaining AMD `pipeline_cache_seed` mismatch from #1723's `robustBufferAccess` choice is #1833, not this PR. This is foundation-only: StreamOutput PSOs are still refused and `SOSetTargets` is still not implemented. #1630 lands the real `SO_STATISTICS` query pools on top and depends on this. Tested on `main` `71a769d7d` (Windows 11 Pro 26300, MSVC RelWithDebInfo, NVIDIA RTX 3080 Ti, driver 616.64, Vulkan SDK 1.4.363.0): `d3d12_vulkan_device`, `d3d12_mesh` and `pipeline_cache_seed` pass, plain and with `LEONIDA_VK_VALIDATION=1`. AI-assisted.
BubsMcgee commented 2026-11-25 14:58:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T14:58:09Z.


Addressed Snooozs's review from #1236 in a follow-up commit: transform_feedback/geometryStreams are now described as detected and enabled with nothing using them yet (and that #1630 adds the SO_STATISTICS pools that use it), and the stderr line no longer reads as if StreamOutput PSOs work. Rebuilt; d3d12_vulkan_device passes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166096757 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7166096757). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T14:58:09Z. --- Addressed Snooozs's review from #1236 in a follow-up commit: transform_feedback/geometryStreams are now described as detected and enabled with nothing using them yet (and that #1630 adds the SO_STATISTICS pools that use it), and the stderr line no longer reads as if StreamOutput PSOs work. Rebuilt; d3d12_vulkan_device passes.
madvillain91 commented 2026-11-25 14:58:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by madvillain91 on 2026-11-25T14:58:23Z.

Review: COMMENTED


Reviewed diff and independently verified commit 34ab89f89 on Windows 11 with an NVIDIA Ampere GPU (against main 71a769d7d):

Environment

  • OS: Windows 11 26H2 (build 26300.9711)
  • Compiler: VS 2022 Build Tools (MSVC 19.44.35230.0, Ninja, RelWithDebInfo)
  • Vulkan SDK: 1.4.363.0
  • GPU: NVIDIA GeForce RTX 3070 Ti (Ampere, 8192 MiB), driver 617.14, Vulkan 1.4.351

Checks run

  • git diff --check across both commits (9315a96ed, 34ab89f89): clean
  • Built d3d12_vulkan_device_test, d3d12_mesh_test, vk_pipeline_check, and pipeline_cache_seed_test cleanly in an isolated build: 0 errors
  • d3d12_vulkan_device_test (LEONIDA_VK_VALIDATION=1): PASS, 0 VUIDs (copy comparison: 0 of 75 cases differ from the host; Resolve comparison: 60 compared, 60 matched)
  • d3d12_mesh_test (LEONIDA_VK_VALIDATION=1): PASS, 0 VUIDs (mesh tier 1; mesh and VS PSOs from pipeline state streams... matched all 4096 pixels)
  • pipeline_cache_seed_test <vk_pipeline_check.exe> (plain & LEONIDA_VK_VALIDATION=1): PASS, 0 VUIDs (ok: vk_pipeline_check cache hits on the runtime's device (NVIDIA GeForce RTX 3070 Ti))

Diff notes

  • VK_EXT_transform_feedback feature detection and logical device chaining (transformFeedback + conditional geometryStreams) cleanly mirror the existing VK_EXT_mesh_shader pattern in d3d12_vulkan_device.cpp and vk_pipeline_check.cpp, with no behaviour change for StreamOutput PSOs yet.

Not checked

  • AMD GPU verification (since NVIDIA does not key pipeline caches on VK_EXT_transform_feedback, this confirms no regression on Ampere rather than reproducing the AMD cache-miss fix).

LGTM from this Windows 11 + NVIDIA RTX 3070 Ti verification (AI-assisted verification; synthetic test fixtures only, no game data).

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6060009223 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891#pullrequestreview-6060009223). Originally posted by [madvillain91](https://github.com/madvillain91) on 2026-11-25T14:58:23Z. **Review:** COMMENTED --- Reviewed diff and independently verified commit `34ab89f89` on Windows 11 with an NVIDIA Ampere GPU (against `main` `71a769d7d`): ### Environment - OS: Windows 11 26H2 (build 26300.9711) - Compiler: VS 2022 Build Tools (MSVC `19.44.35230.0`, Ninja, `RelWithDebInfo`) - Vulkan SDK: `1.4.363.0` - GPU: NVIDIA GeForce RTX 3070 Ti (Ampere, 8192 MiB), driver `617.14`, Vulkan `1.4.351` ### Checks run - `git diff --check` across both commits (`9315a96ed`, `34ab89f89`): clean - Built `d3d12_vulkan_device_test`, `d3d12_mesh_test`, `vk_pipeline_check`, and `pipeline_cache_seed_test` cleanly in an isolated build: 0 errors - `d3d12_vulkan_device_test` (`LEONIDA_VK_VALIDATION=1`): **PASS, 0 VUIDs** (`copy comparison: 0 of 75 cases differ from the host`; `Resolve comparison: 60 compared, 60 matched`) - `d3d12_mesh_test` (`LEONIDA_VK_VALIDATION=1`): **PASS, 0 VUIDs** (`mesh tier 1; mesh and VS PSOs from pipeline state streams... matched all 4096 pixels`) - `pipeline_cache_seed_test <vk_pipeline_check.exe>` (plain & `LEONIDA_VK_VALIDATION=1`): **PASS, 0 VUIDs** (`ok: vk_pipeline_check cache hits on the runtime's device (NVIDIA GeForce RTX 3070 Ti)`) ### Diff notes - `VK_EXT_transform_feedback` feature detection and logical device chaining (`transformFeedback` + conditional `geometryStreams`) cleanly mirror the existing `VK_EXT_mesh_shader` pattern in `d3d12_vulkan_device.cpp` and `vk_pipeline_check.cpp`, with no behaviour change for StreamOutput PSOs yet. ### Not checked - AMD GPU verification (since NVIDIA does not key pipeline caches on `VK_EXT_transform_feedback`, this confirms no regression on Ampere rather than reproducing the AMD cache-miss fix). LGTM from this Windows 11 + NVIDIA RTX 3070 Ti verification (AI-assisted verification; synthetic test fixtures only, no game data).
BubsMcgee commented 2026-11-25 15:52:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T15:52:48Z.


Merge order for this cluster (so dependent PRs can drop their foundation copies). The #1608 comment API is timing out on the 640-comment thread, so I am posting it here:

  1. This PR (#1891) — foundation: #1236's device detect/enable unchanged + the vk_pipeline_check parity fix + Snooozs's comment/log fix. MERGEABLE; NVIDIA LGTM from madvillain91 (RTX 3070 Ti, validation clean); the same device/vk_pipeline_check code was AMD-checked in #1630 by adrianmjim (RX 7900 XT). Merge first.
  2. #1630 — SO_STATISTICS query pools; stacked on this PR; MERGEABLE/CLEAN. Rebase onto main after this lands.
  3. #1884 — StreamOutput capture; stacked on #1236, CONFLICTING. Rebase after this; needs the TF buffer-usage bits (VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360) and a 4-byte counter; the fixed branch with its test passing under validation is BubsMcgee/leonida:cap-1884-fixed.
  4. #1833 — robustness/pipeline-cache parity; independent, shares one line with #1630; the six-feature bindless AND patch is BubsMcgee/leonida:fix-1833-bindless.

#1236 is superseded by this PR and can close. #1497 (bary-fallback) and #1818 (on-demand console streams) are separate and do not apply to the eager, barycentric boot.

@aslan2142 could a maintainer merge this first? If @adrianmjim or @Mby159 can re-run this exact branch on the 7900 XT / 780M, that would close the cross-GPU loop; the code is identical to the #1630 AMD check.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7167393686 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7167393686). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T15:52:48Z. --- Merge order for this cluster (so dependent PRs can drop their foundation copies). The #1608 comment API is timing out on the 640-comment thread, so I am posting it here: 1. **This PR (#1891)** — foundation: #1236's device detect/enable **unchanged** + the `vk_pipeline_check` parity fix + Snooozs's comment/log fix. `MERGEABLE`; NVIDIA LGTM from madvillain91 (RTX 3070 Ti, validation clean); the same device/`vk_pipeline_check` code was AMD-checked in #1630 by adrianmjim (RX 7900 XT). **Merge first.** 2. **#1630** — `SO_STATISTICS` query pools; stacked on this PR; `MERGEABLE`/`CLEAN`. Rebase onto main after this lands. 3. **#1884** — StreamOutput capture; stacked on #1236, `CONFLICTING`. Rebase after this; needs the TF buffer-usage bits (`VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360`) and a 4-byte counter; the fixed branch with its test passing under validation is `BubsMcgee/leonida:cap-1884-fixed`. 4. **#1833** — robustness/pipeline-cache parity; independent, shares one line with #1630; the six-feature `bindless` AND patch is `BubsMcgee/leonida:fix-1833-bindless`. #1236 is superseded by this PR and can close. #1497 (bary-fallback) and #1818 (on-demand console streams) are separate and do not apply to the eager, barycentric boot. @aslan2142 could a maintainer merge this first? If @adrianmjim or @Mby159 can re-run this exact branch on the 7900 XT / 780M, that would close the cross-GPU loop; the code is identical to the #1630 AMD check. AI-assisted.
BubsMcgee commented 2026-11-25 15:59:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T15:59:55Z.


Merge order for this cluster (so dependent PRs can drop their foundation copies). The #1608 comment API is timing out on the 640-comment thread, so I am posting it here:

  1. This PR (#1891) — foundation: #1236's device detect/enable unchanged + the vk_pipeline_check parity fix + Snooozs's comment/log fix. MERGEABLE; NVIDIA LGTM from madvillain91 (RTX 3070 Ti, validation clean); the same device/vk_pipeline_check code was AMD-checked in #1630 by adrianmjim (RX 7900 XT). Merge first.
  2. #1630 — SO_STATISTICS query pools; stacked on this PR; MERGEABLE/CLEAN. Rebase onto main after this lands.
  3. #1884 — StreamOutput capture; stacked on #1236, CONFLICTING. Rebase after this; needs the TF buffer-usage bits (VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360) and a 4-byte counter; the fixed branch with its test passing under validation is BubsMcgee/leonida:cap-1884-fixed.
  4. #1833 — robustness/pipeline-cache parity; independent, shares one line with #1630; the six-feature bindless AND patch is BubsMcgee/leonida:fix-1833-bindless.

#1236 is superseded by this PR and can close. #1497 (bary-fallback) and #1818 (on-demand console streams) are separate and do not apply to the eager, barycentric boot.

@aslan2142 could a maintainer merge this first? If @adrianmjim or @Mby159 can re-run this exact branch on the 7900 XT / 780M, that would close the cross-GPU loop; the code is identical to the #1630 AMD check.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7167501016 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7167501016). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T15:59:55Z. --- Merge order for this cluster (so dependent PRs can drop their foundation copies). The #1608 comment API is timing out on the 640-comment thread, so I am posting it here: 1. **This PR (#1891)** — foundation: #1236's device detect/enable **unchanged** + the `vk_pipeline_check` parity fix + Snooozs's comment/log fix. `MERGEABLE`; NVIDIA LGTM from madvillain91 (RTX 3070 Ti, validation clean); the same device/`vk_pipeline_check` code was AMD-checked in #1630 by adrianmjim (RX 7900 XT). **Merge first.** 2. **#1630** — `SO_STATISTICS` query pools; stacked on this PR; `MERGEABLE`/`CLEAN`. Rebase onto main after this lands. 3. **#1884** — StreamOutput capture; stacked on #1236, `CONFLICTING`. Rebase after this; needs the TF buffer-usage bits (`VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360`) and a 4-byte counter; the fixed branch with its test passing under validation is `BubsMcgee/leonida:cap-1884-fixed`. 4. **#1833** — robustness/pipeline-cache parity; independent, shares one line with #1630; the six-feature `bindless` AND patch is `BubsMcgee/leonida:fix-1833-bindless`. #1236 is superseded by this PR and can close. #1497 (bary-fallback) and #1818 (on-demand console streams) are separate and do not apply to the eager, barycentric boot. @aslan2142 could a maintainer merge this first? If @adrianmjim or @Mby159 can re-run this exact branch on the 7900 XT / 780M, that would close the cross-GPU loop; the code is identical to the #1630 AMD check. AI-assisted.
aslan2142 commented 2026-11-25 17:30:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T17:30:11Z.


Thanks for the parity fix. This can't merge yet:

  • D3D-TRANSFORM-FEEDBACK-DEVICE is Miici0's claim (#14, 2026-11-24), and #1236 is still open and active. Adopting it needs their OK.
  • A pending workflow approval is a maintainer step, not a stalled PR.

@Miici0, are you fine with #1891 replacing #1236? If not, #1236 goes first, and the vk_pipeline_check fix plus Snooozs's wording come as a small PR on top.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7169595459 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7169595459). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T17:30:11Z. --- Thanks for the parity fix. This can't merge yet: - `D3D-TRANSFORM-FEEDBACK-DEVICE` is Miici0's claim (#14, 2026-11-24), and #1236 is still open and active. Adopting it needs their OK. - A pending workflow approval is a maintainer step, not a stalled PR. @Miici0, are you fine with #1891 replacing #1236? If not, #1236 goes first, and the `vk_pipeline_check` fix plus Snooozs's wording come as a small PR on top. AI-assisted (Claude Code, Claude Opus 5.5).
BubsMcgee commented 2026-11-25 18:03:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T18:03:07Z.


Ping for merge review: this is CLEAN and is the base of #1630 (the SO query pools). It adopts #1236 by Miici0 verbatim because that one was stuck on workflow approval, and the k_pipeline_check parity is the only addition. Once this lands, #1630 can be rebased onto main and the stream-output stack is unblocked; nothing else is needed from my side unless review asks for a change.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7170369250 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7170369250). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T18:03:07Z. --- Ping for merge review: this is CLEAN and is the base of #1630 (the SO query pools). It adopts #1236 by Miici0 verbatim because that one was stuck on workflow approval, and the k_pipeline_check parity is the only addition. Once this lands, #1630 can be rebased onto main and the stream-output stack is unblocked; nothing else is needed from my side unless review asks for a change.
BubsMcgee commented 2026-11-25 19:12:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T19:12:44Z.


This is step 1 of the TF merge order (MERGEABLE/CLEAN), with NVIDIA validation from madvillain91 and the same device/ k_pipeline_check code AMD-checked by adrianmjim in #1630. No open review points here. Ready to land whenever you are; #1630 rebases onto main and drops the three foundation commits the moment this merges.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7171973492 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7171973492). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T19:12:44Z. --- This is step 1 of the TF merge order (MERGEABLE/CLEAN), with NVIDIA validation from madvillain91 and the same device/ k_pipeline_check code AMD-checked by adrianmjim in #1630. No open review points here. Ready to land whenever you are; #1630 rebases onto main and drops the three foundation commits the moment this merges.
aslan2142 commented 2026-11-25 22:32:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T22:32:28Z.


Merged, thanks! This lands the transform-feedback device work from Miici0's #1236 (D3D-TRANSFORM-FEEDBACK-DEVICE), which this adopts with the vk_pipeline_check parity fix. I'm closing #1236 as included.

  • Tested: this is the base of #1630. The full Windows suite under Wine on lavapipe and RADV (gfx1036 iGPU), on #1630 (which contains these commits) merged onto main, had no test go from pass to fail.
  • Checked on main 17b5992b8 + b9739b70d: it merges cleanly; the semantic suite passes (493 files, 6,318 tests, 0 files failed); the 15 docs and writer tests pass; check_no_game_data.py is clean on the 4 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7176490283 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7176490283). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T22:32:28Z. --- Merged, thanks! This lands the transform-feedback device work from Miici0's #1236 (`D3D-TRANSFORM-FEEDBACK-DEVICE`), which this adopts with the `vk_pipeline_check` parity fix. I'm closing #1236 as included. - **Tested:** this is the base of #1630. The full Windows suite under Wine on lavapipe and RADV (gfx1036 iGPU), on #1630 (which contains these commits) merged onto `main`, had no test go from pass to fail. - **Checked on `main` `17b5992b8` + `b9739b70d`:** it merges cleanly; the semantic suite passes (493 files, 6,318 tests, 0 files failed); the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 4 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!1891
No description provided.