The resource SPI's isComplete and isWriteComplete answered YES, and its
waitUntilComplete returned at once, as an M3 probe measured right after a
commit. Apple's GL renderer on macOS 11.7.11 reads a drawable back with the
texture's waitUntilComplete after commitAndWaitUntilSubmitted, then a
synchronizeTexture: on a queue of its own and getBytes:. On a unified-memory
host that synchronize has nothing to copy and finished before the draw, so
about 2.5% of Safari's WebGL readPixels on a 780M returned the canvas as it
was before the draw.
What the guest sees now: once a command buffer that names a resource, or a
view of its memory, is submitted (commitAndWaitUntilSubmitted returned, or it
is scheduled), the resource answers isComplete and isWriteComplete NO and its
waitUntilComplete waits, until the bundle takes the buffer's completion and
has written back its copies; for any use. That is the Intel 630's answer once
the buffer is scheduled (macOS 26.7.1, oracle_complete, dgpu-oracle.md Q26).
The M3 answers the same, except isWriteComplete YES for a read-only use,
which arm64 guests do not get: it only adds waiting for readers, and the
register lists it as a gap. Before submission, and for a resource no buffer in
flight names, the answers stay YES at once, as all three Macs answer. The wait
ends at the completion's take, not behind an earlier buffer's handlers, as the
630's returns with the buffer still Scheduled; where no thread takes the
completions any more, waits end. A debug line counts the waits and the NO
answers.
The tests that held the old answers keep them for a resource no buffer in
flight names; test_resources_wait_for_their_buffers_in_flight holds the new
ones, with the draw's buffer unretained as the GL renderer's is, and
resource_tests holds a view's and a buffer texture's shared count.