)]}'
{
  "commit": "28b86033edbc1ea85b117aa8e22dcb06831571dd",
  "tree": "bdac1e81a3480f70d41d7a7b9d478f003d0dc40e",
  "parents": [
    "8c7af65088cfc40bd36f91f8a7263a722b07e772"
  ],
  "author": {
    "name": "Le Hoang Quyen",
    "email": "lehoangquyen@chromium.org",
    "time": "Thu Feb 05 05:47:40 2026 -0800"
  },
  "committer": {
    "name": "Dawn LUCI CQ",
    "email": "dawn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Feb 05 05:47:40 2026 -0800"
  },
  "message": "D3D11: Implement automatic backend buffer mapping\n\nThis CL introduces a new device toggle \"auto_map_backend_buffer\" that\nenables automatic buffer mapping management in the D3D11 backend. When\nenabled, the backend maintains buffers in a mapped state whenever\npossible, allowing the frontend\u0027s MapAsync and Unmap operations to\nbecome lightweight operations that only update buffer state without\nacquiring backend locks such as the D3D11 device context lock.\n\nImplementation:\n- Backend automatically maps buffers when they are not in use by the GPU\n- Before GPU usage, TrackUsage() automatically unmaps buffers\n- After GPU operations complete, the queue automatically re-maps buffers\n  via scheduled mapping operations\n- Frontend\u0027s MapAsync and Unmap operations become cheap state-only\n  updates that do not interact with the D3D11 device context.\n\nKey components:\n- Buffer::TryMapNow(): Performs actual D3D11 mapping after GPU usage\n  completes\n- Queue::ScheduleBufferMapping(): Schedules buffer for re-mapping after\n  queue submission\n- Queue::CheckScheduledBufferMappings(): Processes and executes\n  scheduled buffer mappings\n- mAutoMapMode: Stores the computed map mode (Read/Write/Both) per\n  buffer based on usage flags\n\nBenefits:\nThis optimization eliminates lock contention between the frontend\u0027s\nfrequent MapAsync/Unmap calls and the backend\u0027s Queue::Submit\noperations. By centralizing all D3D11 mapping operations within the\nQueue\u0027s execution context, the frontend no longer needs to acquire the\nD3D11 device context lock during map/unmap operations, significantly\nreducing synchronization overhead.\n\nBug: 481158754\nChange-Id: If8ebcad133c73db4b0b5b65d56b19cf63c22d362\nReviewed-on: https://dawn-review.googlesource.com/c/dawn/+/286675\nCommit-Queue: Quyen Le \u003clehoangquyen@chromium.org\u003e\nReviewed-by: Corentin Wallez \u003ccwallez@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a6172c5e3cbd37c77119708bcc387ae294f04928",
      "old_mode": 33188,
      "old_path": "src/dawn/native/Toggles.cpp",
      "new_id": "8bd39277737537eaa154c4f438cb06af36667873",
      "new_mode": 33188,
      "new_path": "src/dawn/native/Toggles.cpp"
    },
    {
      "type": "modify",
      "old_id": "6fa08f2602ebd7b185942c187d0521414ee3f8c2",
      "old_mode": 33188,
      "old_path": "src/dawn/native/Toggles.h",
      "new_id": "cba66d36a95978dc9ac8b503e72005bf1d8aaa5e",
      "new_mode": 33188,
      "new_path": "src/dawn/native/Toggles.h"
    },
    {
      "type": "modify",
      "old_id": "2a0ede16b27828e334c540b490d1bb479e4989c4",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/BufferD3D11.cpp",
      "new_id": "276bd4d05ff1e7ffc6de8305f61906105a5fda8c",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/BufferD3D11.cpp"
    },
    {
      "type": "modify",
      "old_id": "16ff0698eef10a6e1966eda559a92cc00b96d450",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/BufferD3D11.h",
      "new_id": "98b6cec7d603275fe65b099121484889dcdb0bdc",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/BufferD3D11.h"
    },
    {
      "type": "modify",
      "old_id": "2a850e778d1f8497e964c10d0898246c6143e20b",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/QueueD3D11.cpp",
      "new_id": "abb06fc6a856756dd69f5921cfc49461b5c66bca",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/QueueD3D11.cpp"
    },
    {
      "type": "modify",
      "old_id": "2f3b5b4966ebcc25fc2c59d9f2bb5d2c9af0c410",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/QueueD3D11.h",
      "new_id": "37ac47eb4f8dd64e3ca998b496f3c34786a9d004",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/QueueD3D11.h"
    },
    {
      "type": "modify",
      "old_id": "2fd14b6899d81d673eebd9ffc9010ade65b583d9",
      "old_mode": 33188,
      "old_path": "src/dawn/tests/end2end/BufferTests.cpp",
      "new_id": "7ddf3bf0d0d1fa50c78e42f94928b7de3b676ca7",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/end2end/BufferTests.cpp"
    },
    {
      "type": "modify",
      "old_id": "8520024bf53b592eea1797e142ca4c1d127392c3",
      "old_mode": 33188,
      "old_path": "src/dawn/tests/end2end/BufferZeroInitTests.cpp",
      "new_id": "8d0e73244945d0086777c879a098353f5a083be9",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/end2end/BufferZeroInitTests.cpp"
    },
    {
      "type": "modify",
      "old_id": "674a8454065c6c71a25df01a8d3832e71ffafbad",
      "old_mode": 33188,
      "old_path": "src/dawn/tests/end2end/MultithreadTests.cpp",
      "new_id": "04b328b06b64d1ac9f214728a73e9e85f4fbdbad",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/end2end/MultithreadTests.cpp"
    }
  ]
}
