)]}'
{
  "commit": "82d268b5c55bb0d8ecd678207faf2ff38a501276",
  "tree": "38191ad0dbc67ace5035b7ec4b441f483d288d3a",
  "parents": [
    "f066e650472d78e506317e505d21fe1e7f6d9619",
    "90daf4833d473689d63639cd1b54a8e9eafc319f"
  ],
  "author": {
    "name": "Ben Vanik",
    "email": "benvanik@google.com",
    "time": "Tue Jan 04 12:07:02 2022 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jan 04 12:07:02 2022 -0800"
  },
  "message": "Merge pull request #7998 from google/benvanik-resource-retain\n\nCommand buffers that execute asynchronously now need to ensure the lifetime of all referenced resources extends for as long as the command buffer lives. Future changes will extend this to device queues/semaphores.\r\n\r\nBy tracking lifetime on command buffers we can remove the deferred release list that was performing lifetime tracking on the HAL VM module - it was using a generic VM list (24 bytes per entry vs 8 on 64-bit) and limited us to a single device/command buffer and synchronous submission: now when we get around to attaching lifetime to timepoints we can correctly track lifetime in asynchronous programs 🎉 \r\n\r\nAn important user-visible reason we bring the lifetime tracking into the HAL is that when we start to mix asynchronous host application code, compiler-generated code, and custom module code we have no good way of plumbing through the lifetimes with the current interface. A bonus of this change is that now we only pay for lifetime tracking when it\u0027s required: when running against implementations that perform their own resource lifetime tracking (WebGPU/Metal) we may be able to avoid doing the tracking. We can also avoid tracking when we are wrapping command buffers in things like the deferred command buffer (or future RPC systems) that perform the tracking themselves.\r\n\r\nThis change drops our memory consumption high-water mark in dylib-sync/embedded cases by 16-32KB as now we don\u0027t need tracking there and improves the performance (~4us -\u003e 3us per hello-world invocation) as there\u0027s no tracking logic taking place. It\u0027s better for the other backends that do require tracking (task system/GPUs/etc) due to reduced memory consumption, allocations, and a more optimized implementation.",
  "tree_diff": []
}
