d3d12: accept StreamOutput PSOs, implement SOSetTargets, capture draws via VK_EXT_transform_feedback (D3D-STREAMOUTPUT-RUNTIME) #1884

Closed
Miici0 wants to merge 3 commits from upstream-pr/1884 into main
Miici0 commented 2026-11-25 14:15:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Miici0 on 2026-11-25T14:15:41Z.


Claimed in the coordination issue as: D3D-STREAMOUTPUT-RUNTIME (https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7164990951)

Depends on: none (its foundation, #1236, landed through #1891)

What and why

The capture path #1630 (D3D-302) left out: StreamOutput PSOs were refused and SOSetTargets was not implemented. This PR adds that capture path.

A graphics PSO that declares StreamOutput is now accepted instead of refused. The supported case is RasterizedStream 0 with NumStrides within the device's maxTransformFeedbackBuffers. SOSetTargets stores the bound buffers on the command list, the way IASetVertexBuffers already does. A draw whose pipeline has StreamOutput, with every declared buffer slot bound, is wrapped in vkCmdBindTransformFeedbackBuffersEXT + vkCmdBeginTransformFeedbackEXT/vkCmdEndTransformFeedbackEXT, so the captured data reaches the bound buffers.

Rebased onto main f44904d21. Three commits:

  1. The capture path. emit_commands now keeps a rendering scope open across draws, so Begin/End wrap only the draw call itself. Transform feedback is never active when the scope ends or when the next draw binds its pipeline (VUID-vkCmdBindPipeline-None-02323).
  2. BubsMcgee's review: buffers are now created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT and VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT at the six creation sites that gate CONDITIONAL_RENDERING the same way (VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360). The BufferFilledSizeLocation counter is resolved as 4 bytes (a D3D12 UINT), not 8.
  3. The test now also draws through a real, zeroed 4-byte BufferFilledSizeLocation counter, and it fails on any validation error when run with LEONIDA_VK_VALIDATION=1.

The counter test settles the open question from the review. After 3 vertices at a 16-byte stride, the counter reads 48. Vulkan's counter records a byte position, the same quantity as D3D12's filled size. So binding BufferFilledSizeLocation directly as the Vulkan counter buffer needs no conversion.

#1630's SO_STATISTICS pools are on main now, and this PR only touches that case's comment: the pool now counts what these draws capture.

Left as follow-up:

  • RasterizedStream other than 0 is #1986, stacked on this PR.
  • Matching a real translated game shader's outputs to StreamOutput buffer slots. That needs Xfb decorations patched into its SPIR-V at PSO creation, because the translator runs before any PSO exists.

Tested

  • d3d12_stream_output passes with LEONIDA_VK_VALIDATION=1 (Khronos validation, 0 errors) and without it. Both draws capture 3 vertices with 0 mismatches, and the counter reads 48 bytes.
  • Full ctest (runtime/build, RelWithDebInfo): 568 of 570 pass. The 2 failures are on main too. I built main f44904d21 without this PR and ran them there, and they fail the same way:
    • xbox_present (VK_ERROR_FORMAT_NOT_SUPPORTED), already reported in #2570.
    • gta6rt_no_tls_callbacks, which only fails with MSVC 19.42. Details in #2570.

GPU: NVIDIA GeForce RTX 4070 SUPER, driver 621.24, Windows 11 26300.9974, Vulkan SDK 1.4.363.1, MSVC 19.42.34435 (VS 2022 Build Tools).

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work (RasterizedStream != 0, real-shader SPIR-V patching) goes in new pull requests.
  • No game data, keys or decryption, including in logs or reports quoted here.
  • N/A: no new translator rule.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5493063386 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1884). Originally posted by [Miici0](https://github.com/Miici0) on 2026-11-25T14:15:41Z. --- Claimed in the coordination issue as: D3D-STREAMOUTPUT-RUNTIME (https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7164990951) Depends on: none (its foundation, #1236, landed through #1891) ### What and why The capture path #1630 (D3D-302) left out: StreamOutput PSOs were refused and `SOSetTargets` was not implemented. This PR adds that capture path. A graphics PSO that declares `StreamOutput` is now accepted instead of refused. The supported case is `RasterizedStream` 0 with `NumStrides` within the device's `maxTransformFeedbackBuffers`. `SOSetTargets` stores the bound buffers on the command list, the way `IASetVertexBuffers` already does. A draw whose pipeline has `StreamOutput`, with every declared buffer slot bound, is wrapped in `vkCmdBindTransformFeedbackBuffersEXT` + `vkCmdBeginTransformFeedbackEXT`/`vkCmdEndTransformFeedbackEXT`, so the captured data reaches the bound buffers. **Rebased onto `main` `f44904d21`.** Three commits: 1. The capture path. `emit_commands` now keeps a rendering scope open across draws, so Begin/End wrap only the draw call itself. Transform feedback is never active when the scope ends or when the next draw binds its pipeline (VUID-vkCmdBindPipeline-None-02323). 2. BubsMcgee's review: buffers are now created with `VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT` and `VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT` at the six creation sites that gate `CONDITIONAL_RENDERING` the same way (VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360). The `BufferFilledSizeLocation` counter is resolved as 4 bytes (a D3D12 `UINT`), not 8. 3. The test now also draws through a real, zeroed 4-byte `BufferFilledSizeLocation` counter, and it fails on any validation error when run with `LEONIDA_VK_VALIDATION=1`. The counter test settles the open question from the review. After 3 vertices at a 16-byte stride, the counter reads **48**. Vulkan's counter records a byte position, the same quantity as D3D12's filled size. So binding `BufferFilledSizeLocation` directly as the Vulkan counter buffer needs no conversion. #1630's `SO_STATISTICS` pools are on `main` now, and this PR only touches that case's comment: the pool now counts what these draws capture. **Left as follow-up:** - `RasterizedStream` other than 0 is #1986, stacked on this PR. - Matching a real translated game shader's outputs to StreamOutput buffer slots. That needs `Xfb` decorations patched into its SPIR-V at PSO creation, because the translator runs before any PSO exists. ### Tested - `d3d12_stream_output` passes with `LEONIDA_VK_VALIDATION=1` (Khronos validation, 0 errors) and without it. Both draws capture 3 vertices with 0 mismatches, and the counter reads 48 bytes. - Full `ctest` (`runtime/build`, RelWithDebInfo): 568 of 570 pass. The 2 failures are on `main` too. I built `main` `f44904d21` without this PR and ran them there, and they fail the same way: - `xbox_present` (`VK_ERROR_FORMAT_NOT_SUPPORTED`), already reported in #2570. - `gta6rt_no_tls_callbacks`, which only fails with MSVC 19.42. Details in #2570. GPU: NVIDIA GeForce RTX 4070 SUPER, driver 621.24, Windows 11 26300.9974, Vulkan SDK 1.4.363.1, MSVC 19.42.34435 (VS 2022 Build Tools). AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work (RasterizedStream != 0, real-shader SPIR-V patching) goes in new pull requests. - [x] No game data, keys or decryption, including in logs or reports quoted here. - [ ] N/A: no new translator rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
BubsMcgee commented 2026-11-25 15:18:36 +00:00 (Migrated from github.com)

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


Nice work — this is the capture path we were also poking at. Two concrete gaps from our own capture work (BubsMcgee/leonida:stream-output-capture-wip, commit 4f05ff666), both static (I couldn't run this branch: it conflicts with current main).

1. The TF buffer usage bits are missing. vkCmdBindTransformFeedbackBuffersEXT requires every bound buffer to have been created with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, and the counter buffers passed to begin/end with VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT. Current main has no TRANSFORM_FEEDBACK_*_BIT_EXT usage anywhere (git grep over runtime/), and this PR binds the SOSetTargets buffers and the filled-size counters without adding them. The new test creates its SO buffer directly in D3D12_RESOURCE_STATE_STREAM_OUT, but that is only a barrier layout (s::stream_out in command_list.h / vulkan_replay.h), not a creation usage, so it does not get the bit either. The test passes on the 4070 SUPER because NVIDIA does not enforce it; with LEONIDA_VK_VALIDATION=1 (and on stricter drivers / the real title's buffers, which are created in other states) the bind is invalid. Fix: add both bits to every buffer when info.transform_feedback is on. Our WIP commit has the six creation sites in runtime/shims/d3d12_vulkan_device.cpp:

if (info.transform_feedback)
    result.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT |
                    VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT;

2. Counter width. D3D12_STREAM_OUTPUT_BUFFER_VIEW::BufferFilledSizeLocation points to a 32-bit UINT, so counter_size should be sizeof(std::uint32_t), not sizeof(std::uint64_t); with 8, buffer_at can reject a 4-byte counter buffer. (Our WIP used 4.)

Also, the test passes BufferFilledSizeLocation = 0, so the counter path is not exercised at all — worth a second case with a real 4-byte filled-size buffer, under validation.

One semantic question: Vulkan writes a primitive/vertex count to the counter buffer, while D3D12's filled size is bytes. Binding the BufferFilledSizeLocation as the Vulkan counter writes a different quantity, so if the title reads the filled size it needs its own mapping. (Our WIP made the same binding, so this is an open question we share, not a regression you introduced.)

Coordination: #1891 adopts #1236 (with the Snooozs comment/log fix) and has an NVIDIA LGTM; once it lands, this can rebase onto main and drop the #1236 copy. #1630 (SO_STATISTICS) is also stacked and touches the same files, so one of us rebases after the other. Happy to hand over the WIP commit or test this once it rebases.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166638089 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1884#issuecomment-7166638089). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T15:18:36Z. --- Nice work — this is the capture path we were also poking at. Two concrete gaps from our own capture work (`BubsMcgee/leonida:stream-output-capture-wip`, commit `4f05ff666`), both static (I couldn't run this branch: it conflicts with current `main`). **1. The TF buffer usage bits are missing.** `vkCmdBindTransformFeedbackBuffersEXT` requires every bound buffer to have been created with `VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT`, and the counter buffers passed to begin/end with `VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT`. Current `main` has no `TRANSFORM_FEEDBACK_*_BIT_EXT` usage anywhere (`git grep` over `runtime/`), and this PR binds the `SOSetTargets` buffers and the filled-size counters without adding them. The new test creates its SO buffer directly in `D3D12_RESOURCE_STATE_STREAM_OUT`, but that is only a barrier layout (`s::stream_out` in `command_list.h` / `vulkan_replay.h`), not a creation usage, so it does not get the bit either. The test passes on the 4070 SUPER because NVIDIA does not enforce it; with `LEONIDA_VK_VALIDATION=1` (and on stricter drivers / the real title's buffers, which are created in other states) the bind is invalid. Fix: add both bits to every buffer when `info.transform_feedback` is on. Our WIP commit has the six creation sites in `runtime/shims/d3d12_vulkan_device.cpp`: ```cpp if (info.transform_feedback) result.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT | VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT; ``` **2. Counter width.** `D3D12_STREAM_OUTPUT_BUFFER_VIEW::BufferFilledSizeLocation` points to a 32-bit UINT, so `counter_size` should be `sizeof(std::uint32_t)`, not `sizeof(std::uint64_t)`; with 8, `buffer_at` can reject a 4-byte counter buffer. (Our WIP used 4.) Also, the test passes `BufferFilledSizeLocation = 0`, so the counter path is not exercised at all — worth a second case with a real 4-byte filled-size buffer, under validation. One semantic question: Vulkan writes a primitive/vertex count to the counter buffer, while D3D12's filled size is bytes. Binding the `BufferFilledSizeLocation` as the Vulkan counter writes a different quantity, so if the title reads the filled size it needs its own mapping. (Our WIP made the same binding, so this is an open question we share, not a regression you introduced.) Coordination: #1891 adopts #1236 (with the Snooozs comment/log fix) and has an NVIDIA LGTM; once it lands, this can rebase onto `main` and drop the #1236 copy. #1630 (`SO_STATISTICS`) is also stacked and touches the same files, so one of us rebases after the other. Happy to hand over the WIP commit or test this once it rebases. AI-assisted.
BubsMcgee commented 2026-11-25 15:26:23 +00:00 (Migrated from github.com)

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


Verified the usage-bit finding end to end on Windows 11 / NVIDIA RTX 3080 Ti (driver 616.64, Vulkan SDK 1.4.363.0, Khronos validation layer), by rebasing the capture commit onto our #1891 foundation and running the new test.

  • Without the TF usage bits (the branch as it stands): d3d12_stream_output fails under LEONIDA_VK_VALIDATION=1 with
    VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360 — "pBuffers[0] was created with ..." and no VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT.
  • With the fix (the six creation sites in d3d12_vulkan_device.cpp, counter_size = sizeof(std::uint32_t), and EXPECT(vk.validation_errors() == 0) in the test): passes plain and with validation, no errors.

Branch to cherry-pick: BubsMcgee/leonida:cap-1884-fixed (head e79908b9e):

  • 2fc3f1f0e — the capture commit rebased onto #1891's foundation (adopted #1236 + vk_pipeline_check + Snooozs's comment fix), with the six usage-bit sites and the 4-byte counter.
  • e79908b9e — the test now asserts validation_errors() == 0.

The usage-bit hunk is the same at every site:

if (<info>.transform_feedback)
    <usage> |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT |
               VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT;

(result.usage in DeviceState, create.usage for the heap, info.usage at the three resource sites, state_.info for the default-heap buffers.)

The counter semantics note from before still stands (Vulkan's counter is a primitive/vertex count; D3D12's filled size is bytes). Happy to open a PR against your branch if that is easier, or you can cherry-pick the two commits.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166844196 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1884#issuecomment-7166844196). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T15:26:23Z. --- Verified the usage-bit finding end to end on Windows 11 / NVIDIA RTX 3080 Ti (driver 616.64, Vulkan SDK 1.4.363.0, Khronos validation layer), by rebasing the capture commit onto our #1891 foundation and running the new test. - **Without the TF usage bits** (the branch as it stands): `d3d12_stream_output` fails under `LEONIDA_VK_VALIDATION=1` with `VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360` — "pBuffers[0] was created with ..." and no `VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT`. - **With the fix** (the six creation sites in `d3d12_vulkan_device.cpp`, `counter_size = sizeof(std::uint32_t)`, and `EXPECT(vk.validation_errors() == 0)` in the test): passes plain and with validation, no errors. Branch to cherry-pick: `BubsMcgee/leonida:cap-1884-fixed` (head `e79908b9e`): - `2fc3f1f0e` — the capture commit rebased onto #1891's foundation (adopted #1236 + `vk_pipeline_check` + Snooozs's comment fix), with the six usage-bit sites and the 4-byte counter. - `e79908b9e` — the test now asserts `validation_errors() == 0`. The usage-bit hunk is the same at every site: ```cpp if (<info>.transform_feedback) <usage> |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT | VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT; ``` (`result.usage` in `DeviceState`, `create.usage` for the heap, `info.usage` at the three resource sites, `state_.info` for the default-heap buffers.) The counter semantics note from before still stands (Vulkan's counter is a primitive/vertex count; D3D12's filled size is bytes). Happy to open a PR against your branch if that is easier, or you can cherry-pick the two commits. AI-assisted.
BubsMcgee commented 2026-11-25 17:11:45 +00:00 (Migrated from github.com)

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


Heads-up: this is CONFLICTING with main (our duplicate copy, #1925, is closed, so there is no competing implementation). The vk_pipeline_check parity hunk this feature needs is already in #1891; everything else here — StreamOutput PSO acceptance, SOSetTargets, the capture path and the tests — is unique to this branch. A rebase onto current main should be all that is left.

(Correction to my first version: #1148 is another older conflicting PR, so this is not the only one; both need a rebase.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7169147448 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1884#issuecomment-7169147448). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T17:11:45Z. --- Heads-up: this is CONFLICTING with main (our duplicate copy, #1925, is closed, so there is no competing implementation). The `vk_pipeline_check` parity hunk this feature needs is already in #1891; everything else here — StreamOutput PSO acceptance, `SOSetTargets`, the capture path and the tests — is unique to this branch. A rebase onto current main should be all that is left. (Correction to my first version: #1148 is another older conflicting PR, so this is not the only one; both need a rebase.)
BubsMcgee commented 2026-11-25 17:28:11 +00:00 (Migrated from github.com)

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


Merge order for the TF cluster is on #1891: https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7167501016 . This PR is step 3: rebase onto main after #1891 lands (your first commit is #1236, which #1891 adopts, so that copy drops). The TF buffer-usage + 4-byte counter fixes, with the test passing under validation, are in BubsMcgee/leonida:cap-1884-fixed.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7169548155 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1884#issuecomment-7169548155). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T17:28:11Z. --- Merge order for the TF cluster is on #1891: https://github.com/ubiquitarianism/leonida/pull/1891#issuecomment-7167501016 . This PR is step 3: rebase onto main after #1891 lands (your first commit is #1236, which #1891 adopts, so that copy drops). The TF buffer-usage + 4-byte counter fixes, with the test passing under validation, are in BubsMcgee/leonida:cap-1884-fixed.
MoonEyes commented 2026-11-28 18:02:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T18:02:31Z.


Hi @Miici0, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/shims/d3d12_com.h, runtime/shims/d3d12_vulkan_device.cpp, runtime/src/vulkan_backend.h, runtime/src/vulkan_replay.h, runtime/test/vk_test_device.h), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243482883 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1884#issuecomment-7243482883). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T18:02:31Z. --- Hi @Miici0, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/shims/d3d12_com.h`, `runtime/shims/d3d12_vulkan_device.cpp`, `runtime/src/vulkan_backend.h`, `runtime/src/vulkan_replay.h`, `runtime/test/vk_test_device.h`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
Miici0 commented 2026-11-30 15:44:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Miici0 on 2026-11-30T15:44:20Z.


@BubsMcgee thanks for the review and the fixed branch. Both points are in, rebased onto main f44904d21. #1236's copy is dropped since #1891 landed.

  • Usage bits: 79ad1c0e9 adds the transform-feedback buffer and counter usage bits at the six creation sites you listed, behind the same transform_feedback flag that gates CONDITIONAL_RENDERING.
  • Counter width: the counter is resolved as 4 bytes.
  • Test: 6de8bf43b adds a second draw through a real, zeroed 4-byte BufferFilledSizeLocation, and the test now fails on any validation error.

On the open question about counter semantics: after 3 vertices at a 16-byte stride the counter reads 48. Vulkan's counter is a byte position, the same quantity as D3D12's filled size, so binding BufferFilledSizeLocation directly as the counter buffer needs no conversion.

d3d12_stream_output passes with LEONIDA_VK_VALIDATION=1 (0 validation errors) on an RTX 4070 SUPER (driver 621.24). The full suite is 568 of 570. The 2 failures are on main too; see the PR description.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7283498094 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1884#issuecomment-7283498094). Originally posted by [Miici0](https://github.com/Miici0) on 2026-11-30T15:44:20Z. --- @BubsMcgee thanks for the review and the fixed branch. Both points are in, rebased onto `main` `f44904d21`. #1236's copy is dropped since #1891 landed. - **Usage bits:** `79ad1c0e9` adds the transform-feedback buffer and counter usage bits at the six creation sites you listed, behind the same `transform_feedback` flag that gates `CONDITIONAL_RENDERING`. - **Counter width:** the counter is resolved as 4 bytes. - **Test:** `6de8bf43b` adds a second draw through a real, zeroed 4-byte `BufferFilledSizeLocation`, and the test now fails on any validation error. On the open question about counter semantics: after 3 vertices at a 16-byte stride the counter reads **48**. Vulkan's counter is a byte position, the same quantity as D3D12's filled size, so binding `BufferFilledSizeLocation` directly as the counter buffer needs no conversion. `d3d12_stream_output` passes with `LEONIDA_VK_VALIDATION=1` (0 validation errors) on an RTX 4070 SUPER (driver 621.24). The full suite is 568 of 570. The 2 failures are on `main` too; see the PR description. AI-assisted (Claude Code).
aslan2142 commented 2026-12-01 16:38:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:38:29Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317945794 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1884#issuecomment-7317945794). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:38:29Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

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!1884
No description provided.