Repository navigation
honeykrisp: accept a NULL array of transform feedback counter buffers - #10
joshuaswarren wants to merge 1 commit into
Conversation
vkCmdBeginTransformFeedbackEXT and vkCmdEndTransformFeedbackEXT take pCounterBuffers as NULL or as an array of handles. With NULL, Begin starts every transform feedback buffer at byte offset zero. End writes nothing. The conformance test passes NULL with a count of 1 for this case. The driver read the first element of the NULL array and crashed. Skip the loop over the counter buffers when the array is NULL. Begin still zeroes the four offsets, and End still copies nothing. A call with an array, and an array with a null handle in it, behave as before.
|
GREEN at b87e745, with two non-blocking notes. I read the full diff against main (7cda785) and ran no build. Checked:
Notes:
Merging is the maintainers' call. |
|
Both notes are open items. I did not change the branch.
|
|
Maintainer routing request for PR 10. This is a request for a merge contact, not a claim that review is finished. It fixes a crash when Question: who can merge into this repository's |
|
Second routing request for PR 10, about 14 hours after the first. It is still a request for a merge contact, not a claim that review is finished. Nothing on the head has changed since my first note above. The review notes and the list of what was run are in the description and the two review comments. Question: who can merge into this repository's main branch? If there is a different place to ask, a link is enough. My account has pull access only, so I cannot merge or mark anything ready. |
|
Status, 25 Oct, for the landing order (#10 first, then #8, then #9, then #6). Head MEASURED: the whole-suite CTS of the stack that contains this change (#8, #9, #10 plus #6, sha NOT measured: the CTS with only this change, and a vkQuake or vkmark run. |
|
Batch 1 for main: #10, then #8, then #9, in that order. All three apply to main at
Stack check, one boot on a 13-inch M1, These are targeted checks, not the full conformance suite. The CTS binary's source commit is not independently verified. #6 is not part of this batch. Its run over the touched test groups at its current head has not finished, and three The author account on these PRs has pull-only access, so a maintainer has to merge. Tell us if you want a different order or a different check first. |
|
@maralcbr could you review this current head for landing first? The exact-head test evidence and remaining scope limits are in the PR body. The requested landing order is #10, then #8, then #9. Our account cannot assign formal reviewers or merge here; please route this to a main-branch maintainer if needed. |
READY TO MERGE
Head:
b87e7456cdbb7abdea2f360cdcba0e2a56316f3f.GitHub reports MERGEABLE against
main: no text conflicts. This is not a test pass.The exact-head package and native tests are recorded below. The three transform-feedback CTS chunks cover 2,719 cases on both M1 chips: all 18 former crashes pass, with no other result changes. The six submitted-call probes also pass. The head-bound source review is GREEN. No build/test CI is configured for this head. These are targeted checks, not full CTS. Land this first in the agreed order: #10, #8, #9, then #6. An authorized maintainer must merge it; the author account has pull-only access.
Earlier review, source and test notes are kept below with their original bindings. They do not change this status.
What this fixes
vkCmdBeginTransformFeedbackEXTandvkCmdEndTransformFeedbackEXTcrash the application whenpCounterBuffersis NULL andcounterBufferCountis not zero. The driver readspCounterBuffers[0]and faults at address 0.The reference page for
vkCmdBeginTransformFeedbackEXTsayspCounterBuffersis NULL or a pointer to an array of handles. It also says that with NULL, transform feedback starts at byte offset zero in all bound transform feedback buffers. The reference page forvkCmdEndTransformFeedbackEXTallows NULL in the same way, but it does not say what NULL means for End. Here End then records no counter.In the conformance group
transform_feedback, 18 cases pass NULL with a count of 1 and crash. They areresume_1_131072,resume_1_256andresume_1_512, each in thenull_counter_buffersand thenull_ptrs_end_xfbvariant, in thesimple,simple_fast_gplandsimple_optimized_gplgroups. In the test source at VK-GL-CTS commit 9335a4e4e455,vktTransformFeedbackSimpleTests.cpplines 1420 and 1433 to 1443, thenull_counter_buffersvariant calls Begin with a count of 1 and NULL arrays, and thenull_ptrs_end_xfbvariant calls End with a count of 1 and NULL arrays. I did not check that the test binary on my machines was built from that unmodified tree.Stored core files of four of these crashes on the 16-inch M1 Max show the same fault. The first frame is the load of
pCounterBuffers[0]inhk_begin_end_xfb, withpCounterBuffersequal to 0 and the count equal to 1.What this changes
The loop over the counter buffers in
hk_begin_end_xfbnow runs only whenpCounterBuffersis not NULL. Begin still sets the four offsets to zero, because the copy to the offsets runs with no source for each of them. End still copies nothing. A call with an array, and an array with a null handle in it, take the same path as before.Test results
A small test program, run on the 16-inch M1 Max, one boot, one fresh process per case. It records and submits Begin and End with a bound counter buffer that starts at 0x1000, and reads the buffer after the wait.
Main crashes the same way as a package build and as a native build. The program draws nothing, so "Begin starts at zero" is shown by the End copy reading 0 and not by a captured draw.
Three chunks of the
transform_feedbackgroup that hold the 18 cases: chunk 117, chunk 125 and chunk 133, with the library bytes of built packages, one run per arm. The 16-inch M1 Max and the 13-inch M1 give the same tables.The other cases in each chunk are NotSupported: 278, 285 and 175. Exactly 18 of the 2719 cases differ on both chips, all from Crash to Pass, and 2701 are unchanged. No row gets worse.
The control is the package of main. The candidate is the package of this commit on main. Both packages were built with the same build options.
What this does not show