)]}'
{
  "commit": "4a5ccd7b61e6ea3bf8bb1c486ac5f92ee7bf4f67",
  "tree": "727c87701dd7e39d4f38a10bf5fd4fedfabdaa14",
  "parents": [
    "8dbe0d1d74a31b2e8b7ca91dcec7f956eba12149"
  ],
  "author": {
    "name": "Charlie Lao",
    "email": "cclao@google.com",
    "time": "Wed Oct 28 16:48:19 2026 -0700"
  },
  "committer": {
    "name": "angle-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "angle-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Fri Oct 30 22:28:53 2026 -0700"
  },
  "message": "Vulkan: Protect Volk loads in Renderer initialization\n\ncrrev.com/c/8570704 (\"Avoid taking the Display lock in eglMakeCurrent\")\nmade vk::Renderer::reloadVolkIfNeeded() check and reload Volk under a\nstatic mutex.  Volk keeps the loaded VkInstance and VkDevice, and all of\nits vk* function pointers, in process-wide globals that every Renderer\nshares.  However, the mutex was local to reloadVolkIfNeeded(), and\nRenderer initialization still called volkInitializeCustom(),\nvolkLoadInstance() and volkLoadDevice() without it.  eglInitialize()\nonly locks the display that it initializes, and eglMakeCurrent() no\nlonger locks the display at all, so a thread initializing a second\nRenderer could write the Volk globals while another thread was reloading\nthem for a different Renderer in eglMakeCurrent().\n\nReplace the function-local mutex with ScopedVolkLock, which owns the\nmutex and holds it for its lifetime.  The Volk calls that write the\nglobals (volkInitializeCustom(), volkLoadInstance() and\nvolkLoadDevice()) and the volkGetLoaded*() checks are only reachable\nthrough its member functions, so they can no longer be made without\nholding the lock.  Renderer initialization and reloadVolkIfNeeded() now\nuse it for every load.  The promoted *KHR/*EXT entry points that are\naliased from the core ones after a load are Volk globals too, so they\nare also assigned with the lock held.  vkCreateInstance() and\nvkCreateDevice() stay outside of the lock.\n\nNote that the lock only serializes the writers.  Vulkan calls made\nthrough the Volk function pointers are not synchronized with it.\n\nBug: b/42266581\nChange-Id: I79fcb21210ab53f07d7e70a8b787ecf8c855a7e6\nReviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/8679058\nCommit-Queue: Shahbaz Youssefi \u003csyoussefi@chromium.org\u003e\nReviewed-by: Yuxin Hu \u003cyuxinhu@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "977d64a310ca4ffa2b1c2806c8dbfaa387f02e38",
      "old_mode": 33188,
      "old_path": "src/libANGLE/renderer/vulkan/vk_api_perf_counters.h",
      "new_id": "0abec198cd502f8d6cbcfa82c7f47b0a56ff48c3",
      "new_mode": 33188,
      "new_path": "src/libANGLE/renderer/vulkan/vk_api_perf_counters.h"
    },
    {
      "type": "modify",
      "old_id": "1c9d37a4a248e428a560b803b218414cad43f5a7",
      "old_mode": 33188,
      "old_path": "src/libANGLE/renderer/vulkan/vk_renderer.cpp",
      "new_id": "9ccd874aed9bf474aa4575f6ceaab0f144df72ae",
      "new_mode": 33188,
      "new_path": "src/libANGLE/renderer/vulkan/vk_renderer.cpp"
    }
  ]
}
