Repository navigation
d3d12_vulkan_device: detect and enable VK_EXT_transform_feedback + vk_pipeline_check parity (D3D-TRANSFORM-FEEDBACK-DEVICE) - #1891
Conversation
Foundation for D3D-302 (stream output): read the physical device's transformFeedback/geometryStreams features where the extension is present, record them on VulkanDeviceInfo, and enable them on the logical device when supported, exactly the same pattern the existing VK_EXT_mesh_shader detection/enable code already follows. Device-capability plumbing only: no behaviour changes yet. A graphics PSO declaring StreamOutput is still refused and SOSetTargets is still not implemented, same as before this commit. Confirmed VK_EXT_transform_feedback is available (4 streams, 4 buffers) on an NVIDIA GeForce RTX 4070 SUPER, driver 621.24. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The runtime's device enables VK_EXT_transform_feedback whenever the extension is present, and AMD's driver makes it part of a pipeline's cache key, so the cache vk_pipeline_check seeds offline no longer hit in gta6rt: pipeline_cache_seed failed 3/3 on an RX 7900 XT (adrianmjim). Link the same VkPhysicalDeviceTransformFeedbackFeaturesEXT the runtime enables, next to the mesh-shader one, and list it with the other always-enabled extensions in the header and docs/pipeline_check.md. Tested: pipeline_cache_seed passes on an NVIDIA RTX 3080 Ti (NVIDIA does not key on the extension, so it cannot reproduce the AMD failure). AI-assisted.
…g uses it yet Addresses Snooozs's review on ProjectLeonida#1236: the comments and the log line no longer claim StreamOutput PSO acceptance, SOSetTargets or capture that this foundation does not have. ProjectLeonida#1630 adds the SO_STATISTICS query pools that use it.
|
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
left a comment
There was a problem hiding this comment.
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, Vulkan1.4.351
Checks run
git diff --checkacross both commits (9315a96ed,34ab89f89): clean- Built
d3d12_vulkan_device_test,d3d12_mesh_test,vk_pipeline_check, andpipeline_cache_seed_testcleanly 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_feedbackfeature detection and logical device chaining (transformFeedback+ conditionalgeometryStreams) cleanly mirror the existingVK_EXT_mesh_shaderpattern ind3d12_vulkan_device.cppandvk_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).
|
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:
#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. |
1 similar comment
|
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:
#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. |
|
Thanks for the parity fix. This can't merge yet:
@Miici0, are you fine with #1891 replacing #1236? If not, #1236 goes first, and the AI-assisted (Claude Code, Claude Opus 5.5). |
|
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. |
|
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. |
|
Merged, thanks! This lands the transform-feedback device work from Miici0's #1236 (
AI-assisted (Claude Code, Claude Opus 5.5). |
Brings in main after ProjectLeonida#1891, so main's tip is the single merge base; no conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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_checkparity 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_checkparity part is mine).VK_EXT_transform_feedbackon the physical device, readtransformFeedback/geometryStreams, record them onVulkanDeviceInfo, and enable the extension and features on the logical device — this is d3d12_vulkan_device: detect and enable VK_EXT_transform_feedback (D3D-TRANSFORM-FEEDBACK-DEVICE) #1236's commit, verbatim.VK_EXT_transform_feedbackinvk_pipeline_check, next to the mesh-shader feature, and list it indocs/pipeline_check.md("The cache and the runtime's device"). AMD makes the extension part of a pipeline's cache key, so without thispipeline_cache_seedmisses on AMD.pipeline_cache_seedmismatch from Integrate post-story-load memory, queue and Vulkan fixes (RT-POST-STORY-RUNTIME) #1723'srobustBufferAccesschoice is vk_pipeline_check: choose robustBufferAccess and VK_EXT_robustness2 as the runtime does (RT-PIPELINE-CHECK-ROBUSTNESS) #1833, not this PR.This is foundation-only: StreamOutput PSOs are still refused and
SOSetTargetsis still not implemented. #1630 lands the realSO_STATISTICSquery pools on top and depends on this.Tested on
main71a769d7d(Windows 11 Pro 26300, MSVC RelWithDebInfo, NVIDIA RTX 3080 Ti, driver 616.64, Vulkan SDK 1.4.363.0):d3d12_vulkan_device,d3d12_meshandpipeline_cache_seedpass, plain and withLEONIDA_VK_VALIDATION=1. AI-assisted.