Repository navigation
d3d12: real SO_STATISTICS query pools (D3D-302) - #1630
Conversation
|
Reviewed A regression on AMD:
|
|
Thanks for this. It can't be merged yet, for these reasons:
AI-assisted (Claude Code, Claude Opus 5.5). |
|
NVIDIA data point for the
Nothing here draws through a StreamOutput PSO, so this doesn't cover the review points above. AI-assisted testing (non-developer tester). |
|
Independent verification (native Windows; RTX 4070 SUPER + AMD gfx1036 iGPU, Confirming the outstanding reviews independently — every cited defect verified in the diff, plus additional findings the reviews may not have covered:
Recommend the same conclusion as the existing reviews: not mergeable as-is; needs the Xfb decoration emission + TF usage bits + counter/fill semantics before it can pass validation on a real SO draw. AI-assisted verification. |
ac4a992 to
b4e4787
Compare
|
Rechecked
So your transform-feedback line in the checker is needed and correct; there is now a second mismatch from Whole |
b4e4787 to
fa29cfb
Compare
|
Addressed the review points on this update:
AI-assisted. |
fa29cfb to
641661b
Compare
|
Restructured on top of #1891, which adopts #1236 and carries the Also: the remaining AMD 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.
With VK_EXT_transform_feedback enabled on the device, an SO_STATISTICS heap is a real VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT pool, begun and ended indexed on the stream (vkCmdBeginQueryIndexedEXT / vkCmdEndQueryIndexedEXT). ResolveQueryData copies the two 64-bit results (NumPrimitivesWritten, PrimitivesStorageNeeded) in the same order. The layer still refuses StreamOutput PSOs and still does not implement SOSetTargets, so no primitive reaches a stream yet and the counts stay 0; without the feature the heap is made without a VkQueryPool and resolves zeros, as before.
641661b to
e5a4976
Compare
|
Merge order for the TF cluster is now on #1891 (the #1608 thread is rejecting writes at 640 comments): #1891 (comment) . This PR is step 2: rebase onto main the moment #1891 lands, dropping the three foundation commits. Ready otherwise. |
|
Thanks for narrowing it, @BubsMcgee. The claim is accepted. Still open:
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Acknowledged the three remaining items: (1) refuse or split two overlapping SO_STATISTICS queries on the same stream (VUID-vkCmdBeginQueryIndexedEXT-queryPool-04753) with a test, (2) gate the pool on ransformFeedbackQueries and on maxTransformFeedbackStreams for streams above 0, (3) a test that fails without the change. I will take them in that order, rerun d3d12_vulkan_device/d3d12_state_map plain and with LEONIDA_VK_VALIDATION=1, then rebase onto main after #1891 lands. |
The three review points on ProjectLeonida#1630: - prepare() refuses two overlapping SO_STATISTICS queries on one stream: two active indexed queries in one pool break VUID-vkCmdBeginQueryIndexedEXT-queryPool-04753. Queries on different streams are fine. - The transform-feedback pool now also needs the transformFeedbackQueries property, and a stream at or above maxTransformFeedbackStreams runs nothing and resolves zero instead of issuing an invalid indexed begin. - replay_query_predication case 18 fails without both: the overlapping-stream list is invalid_query and a stream past the pool's stream count fills zeros. Tested: d3d12_vulkan_device, d3d12_state_map and replay_query_predication pass plain and with LEONIDA_VK_VALIDATION=1 (RTX 3080 Ti, driver 616.64). AI-assisted.
|
Took the three review points in
Tested AI-assisted (Claude, opencode). |
VUID-vkCmdBeginQueryIndexedEXT-queryPool-04753 forbids two active transform-feedback queries with the same index anywhere in the command buffer, whatever their pools. prepare() tracked the active ones by heap and stream, so two heaps beginning stream 0 together still issued two active indexed queries. It now keeps one bit per stream for the list. replay_query_predication case 18 adds a second heap: overlapping queries on one stream in two heaps are refused, and queries that take turns on that stream are fine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings ProjectLeonida#1630 up to date with main; no conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
|
Merged, thanks! Your three points are in, plus one maintainer commit on top (
AI-assisted (Claude Code, Claude Opus 5.5). |
Claimed in the coordination issue as: D3D-302 (claim: #1608 (comment))
Depends on: #1891
Lands only the real
SO_STATISTICSquery-pool part, on its own (the option aslan2142 offered). StreamOutput PSOs are still refused andSOSetTargetsis still not implemented; the capture path is not part of this PR.The device detect/enable and the
vk_pipeline_checkparity fix now live in #1891 (which adopts #1236). This PR is stacked on it and contains only the query pools:VK_EXT_transform_feedbackenabled (by d3d12_vulkan_device: detect and enable VK_EXT_transform_feedback + vk_pipeline_check parity (D3D-TRANSFORM-FEEDBACK-DEVICE) #1891), anSO_STATISTICSheap is a realVK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTpool, begun and ended indexed on the stream (vkCmdBeginQueryIndexedEXT/vkCmdEndQueryIndexedEXT).ResolveQueryDatacopies the two 64-bit results (NumPrimitivesWritten,PrimitivesStorageNeeded), 16 bytes per query, in the same order.VkQueryPooland resolves zeros, as before.When #1891 merges I will rebase this onto
main; the two foundation commits drop and only the query changes remain.The remaining
pipeline_cache_seedfailure on AMD is neither this PR nor #1891: adrianmjim rechecked on an RX 7900 XT and it fails identically on the basemainwithout either, from #1723'srobustBufferAccesschange. That is #1833, where I flagged a checker-vs-runtimebindlessinput mismatch (the checker's OR of update-after-bind flags vs the runtime's six-feature AND) to correct before relying on it.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.