From 6f29ec3f67f6ac664fabb3bd4ed3eee4e9fd427b Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 12 Nov 2026 14:35:38 -0800 Subject: [PATCH] RUNTIME_VERSION 2151: GPU times from the host start at the first submission that carried the work The commits before this one. On a device made with DeviceOptions::gpu_times_from_host, a command buffer's GPUStartTime was its kernel end, the call of its LAST submission, so a command buffer whose batches went as several submissions dropped its earlier work from its GPU window (a consumer's profile: 2-8 s of work reported as 0-240 ms, kernel end to GPU start 0.00 ms). KernelTimes now records the first driver submission call that carried a batch of the command buffer (its own vkQueueSubmit or its group's call); the host-clock start is that call where it came before the kernel end, else the kernel end as before, raised to the queue's latest GPU end where later. A command buffer of one submission answers as before; devices that write timestamps were already right. Docs: gpu_time.rs, gpu_start_time, DeviceOptions::gpu_times_from_host, the GpuTimesFromHost cost text and its API.md entry. Also: the queue-times test holds heads, kernel starts and ends, and returns each in commit order (grouped batches can return from one call). Verified (on the branch): runtime_lane::gpu_times::a_command_buffer_of_two_submissions_is_timed_from_its_first_work_to_its_last (a fill, a wait for an event the host signals 200 ms after the commit, a fill; timestamps and host times): lavapipe (m3-max-22756) fails before the fix with host times (start +0.376 ms after the signal, the kernel end) and passes after (-199.8 ms); Radeon 780M (m3-max-22792) passes both ways. lavapipe gpu_time + kernel_end_device 16/16, lane gpu_times 12/12 (22782), degradation catalogue 17/17 (22797); 780M lane gpu_times 12/12, runtime 16/16 (22811). Lint (m3-max-22812): clippy every feature, m2v_gpu, m2v_cpu_icd, rustdoc, api tests. --- crates/metal2vulkan/src/cache/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 2554f84e8..7ef291273 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 508; /// changes no behaviour, and then updates that hash alone with the commit saying why, or changes /// behaviour and also bumps this version. The commit that bumps it says what changed; this comment /// keeps no history. -pub const RUNTIME_VERSION: u32 = 2150; +pub const RUNTIME_VERSION: u32 = 2151; /// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex, /// of the manifest, the build script, and exactly the files the crate roots' module tree compiles