A PS5 measurement already recorded in the debt note shows queue 0x58 succeeds; raise the exclusive SubmissionQueueEnd and cover it in agc_driver_tests.
Wait-free submissions on other queues ran on their own workers with no
order against queue 0, so a queue 0 submission received after them
could execute first. Uncharted: The Lost Legacy submits small compute
jobs on queue 0x50 and reuses their command and descriptor memory once
later queue 0 work has passed; with the async job up to a second late,
it read recycled memory (garbage descriptors, BDA faults, a zeroed PM4
buffer) while loading Sri Lanka. A queue 0 submission now waits until
no wait-free submission received before it is pending or executing on
another queue. Submissions that wait for something, and the wait-free
ones queued behind them, are not waited for, since they can wait for
this queue 0 work.
Uncharted 4's menu fps is unchanged (10.21 vs 10.24, two runs each).
Tests: testQueue0SubmissionAfterEarlierWaitFreeWork and
testQueue0SubmissionBehindWaitingQueue.
AI-assisted: yes
SPIRV-Cross emits the lock's acquire compare-exchange and release
exchange as relaxed Metal atomics, so the plain LDS loads and stores of
a locked 64-bit update were not ordered against the lock and contended
ds_add_u64 lost updates on an Apple M5 Pro. On MoltenVK the driver now sets
SpirvTarget::ldsLockFences, and the lock brackets its critical section
with workgroup-scope acquire and release OpMemoryBarriers, which become
threadgroup atomic_thread_fence with no execution barrier.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
waitMemory skipped the collect epoch bump for a WAIT_REG_MEM satisfied by a
label its own queue stored after the wait was received only while that label
was still pending. When the label had already reached memory, the at-entry
return and the poll loop exit bumped anyway, so whether the wait was an
ordering point depended on whether the GPU finished before the queue worker
reached the wait. On the Linux CI runner (llvmpipe) the spin dispatch of
agc_driver_same_queue_label_wait sometimes finished first and the test failed
with 8 to 12 extra bumps for 16 waits.
Both memory-satisfied returns now consult the label-store history the same
way. The test gains a gated submission in which every label is in memory
before its wait.
agc_driver_pipelined_metadata_pass went straight to the driver, so a
missing Vulkan driver failed it with vkCreateInstance result -9 instead
of returning 77. It now probes the device with OpenVulkanTestDevice()
first, as the other pipelined tests do.
agc_submit_progress and agc_submit_progress_no_timeline set
ANYPS5_REQUIRE_VULKAN=1 in their own ctest environment, which turned
the test's own skip into a failure on every host. CI sets the variable
for the whole Linux job, so a missing device still fails there.
OpenVulkanTestDevice() skipped on any exception from the VulkanDevice
constructor, so a construction failure on a host that has a device was
reported as a skip. The constructor now throws VulkanUnavailable when
the loader cannot be loaded, vkCreateInstance returns
VK_ERROR_INCOMPATIBLE_DRIVER, or no Vulkan 1.1 graphics and compute
device exists, and the helper skips only on that. Any other failure,
including ANYPS5_GPU naming no device, fails the test.
agc_driver_vulkan_test_device covers the healthy device, the required
device and a construction failure with a device present;
agc_driver_vulkan_test_device_no_driver hides the ICD and covers the
skip and the ANYPS5_REQUIRE_VULKAN=1 failure.
Main took request serialization version 48 for the fragment barycentric
built-ins flag (#9193). The depth export clamp bounds are now written at
version 49 and read only for versions from 49, so a version 48 request as main
writes it still decodes, with default bounds. Tests: version 49 is the
emitted prefix, 50 the first unsupported one, a depth exporting request
without its bounds decodes at 48, 47 and 46 (the last two without main's
barycentric byte), and a version 48 two-sample dithered request decodes as
written.
ReadProcessPrivateBytes reads RssAnon and VmSwap from /proc/self/status
on every host other than Windows. macOS has no /proc, so the overlay's
RAM line stays empty and agc_performance_overlay_statistics fails with
"the process's private memory cannot be read". On macOS it now returns
the task's phys_footprint from task_info(TASK_VM_INFO): its resident and
compressed private memory, which is what Activity Monitor shows.
jotitadev measured that this makes the test pass on macOS (#7886).
The same change is part of the macOS port in #8658.
Co-Authored-By: iamthehimansh <[email protected]>
Co-Authored-By: jotitadev <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main took request serialization version 47 for the two-sample dithered
alpha-to-coverage value. The depth export clamp bounds are now written at
version 48 and read only for versions from 48, so a version 47 request as main
writes it still decodes, with default bounds. Tests: version 48 is the
emitted prefix, 49 the first unsupported one, and a version 47 two-sample
dithered request (with and without depth export) decodes as written.
MoltenVK exposes VK_KHR_fragment_shader_barycentric but its MSL step
rejects PerVertexKHR, so the extension is disabled there and a pixel
shader whose I/J VGPRs outlive their v_interp_p1/p2 pairs takes the
generated barycentric stages, which accept only triangle lists without
primitive restart on a device without geometry shaders.
A new target flag, fragmentBarycentricBuiltins, enables the extension
for its built-ins only. The host interpolation check then keeps the
leftover I/J reads (all perspective or all linear, at the fragment's
default position) and reads them from BaryCoordKHR or
BaryCoordNoPerspKHR, while the interpolated attributes stay hardware
varyings. Raw vertex parameters and I/J at an offset or a sample
position still take the generated stages. Apple GPUs return
unnormalized perspective weights unless the fragment function reads
[[position]], so each perspective read keeps a neutral use of
gl_FragCoord.w, loaded as a float. Devices with the full extension are
unaffected; the request serialization moves to version 45.
Co-authored-by: yripper <[email protected]>