)]}'
{
  "commit": "ffbe1004cf97f23a22368e640282c4158d65b94c",
  "tree": "4d993c8d4595ed927d52de1adec31d8fff4ee7b9",
  "parents": [
    "f4cae4afdd4bca082d36025c66c7c284ed16a67f"
  ],
  "author": {
    "name": "Le Hoang Quyen",
    "email": "lehoangquyen@chromium.org",
    "time": "Fri May 09 13:26:59 2025 -0700"
  },
  "committer": {
    "name": "Dawn LUCI CQ",
    "email": "dawn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Fri May 09 13:26:59 2025 -0700"
  },
  "message": "D3D11: Add a toggle to delay D3D11\u0027s Flush.\n\nD3D11\u0027s Flush/Signal calls have fixed costs. Calling them too frequently\ncould be expensive. Ideally we should only call them once per frame in\napplications such as chrome. However, that is not always possible\nbecause some times chrome\u0027s renderer process has to call\nRasterInterface::Flush() that triggers Queue::Submit() which ultimately\nleads to D3D11\u0027s Flush/Signal.\n\nThis CL adds a toggle to prevents Queue::Submit() from automatically\ntriggering D3D11\u0027s Flush. What this means is that Queue::Submmit() won\u0027t\nsend the commands to the GPU immediately. It will still do other things\nsuch as converting Dawn\u0027s commands to D3D11 commands and queue them in\nthe driver\u0027s internal command buffer. In order to send the commands to\nthe GPU for good, clients will need to either:\n- Call IDXGISwapChain::Present either via SwapChain class or\nexternally.\n- Use WaitAny() to wait for a GPU work/buffer mapping to complete.\n- Repeatedly call Device::Tick() or Queue::Submit().\n\nWithout Flush, we need other ways to track the work completions.\nPreviously SystemEvent would be used, but it would require a Flush.\nThis CL will utilize another primitive (ID3D11Query) to track the works.\nIt won\u0027t require a Flush.\n\nNotes:\n- This CL would make RasterInterface::Flush()\u0027s behaviors with Dawn\nsimilar to when it uses ANGLE. With ANGLE, RasterInterface::Flush()\ndoesn\u0027t send the commands to the GPU. It only issues GL draw calls but\ndoesn\u0027t trigger glFlush().\n- The new toggle won\u0027t eliminate the Signal() calls in Queue::Submit()\nentirely. However, Signal() is only triggered when applications use\nDXGISharedHandle textures, so the frequency of this happening is not\nhigh.\n\nBug: chromium:377716220\nBug: 416736350\nChange-Id: I5cb1c9c73d24fa63c6fe7dfcb7308cb0c3343049\nReviewed-on: https://dawn-review.googlesource.com/c/dawn/+/235134\nCommit-Queue: Quyen Le \u003clehoangquyen@chromium.org\u003e\nReviewed-by: Geoff Lang \u003cgeofflang@chromium.org\u003e\nAuto-Submit: Quyen Le \u003clehoangquyen@chromium.org\u003e\nReviewed-by: Loko Kung \u003clokokung@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0815ee81d43ce9dfbc8e8612510d36fb732856eb",
      "old_mode": 33188,
      "old_path": "src/dawn/native/Toggles.cpp",
      "new_id": "7d7324fcf2449cf541175f02b7cb9031a52fdf45",
      "new_mode": 33188,
      "new_path": "src/dawn/native/Toggles.cpp"
    },
    {
      "type": "modify",
      "old_id": "ffd3695c7b652e766e6157c2eeb4be049ca3f569",
      "old_mode": 33188,
      "old_path": "src/dawn/native/Toggles.h",
      "new_id": "92ac3599b96efb0e7c21ca851b19e5021010424e",
      "new_mode": 33188,
      "new_path": "src/dawn/native/Toggles.h"
    },
    {
      "type": "modify",
      "old_id": "9524c645f3d565d909b427046e3266e3234697e8",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/CommandRecordingContextD3D11.cpp",
      "new_id": "aa7125ebb2ab4d51d8d4b23436e60b955e8670f1",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/CommandRecordingContextD3D11.cpp"
    },
    {
      "type": "modify",
      "old_id": "15988f36098fea9d58565d717c16425fdcab6ba0",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/CommandRecordingContextD3D11.h",
      "new_id": "3a8c5ff0b7ee0e2ebf810dbb66fde8e9b2a6aa15",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/CommandRecordingContextD3D11.h"
    },
    {
      "type": "modify",
      "old_id": "677fc527c85cc74743babeae0751978a9902215d",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/QueueD3D11.cpp",
      "new_id": "3a206544a5b6e75807fefc7d23752df150aa8dda",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/QueueD3D11.cpp"
    },
    {
      "type": "modify",
      "old_id": "d04f17133144fb55e3c4ae88a8e396edb47e3118",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/QueueD3D11.h",
      "new_id": "40eef2931116071a94828bcf665d38222bc9a7b3",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/QueueD3D11.h"
    },
    {
      "type": "modify",
      "old_id": "71633d750e2c2480bf0983425ae50497d95412a3",
      "old_mode": 33188,
      "old_path": "src/dawn/tests/end2end/EventTests.cpp",
      "new_id": "c041a34de586ed2928871b380e50d2d024cf0806",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/end2end/EventTests.cpp"
    },
    {
      "type": "modify",
      "old_id": "3e983c9051dd7256c850674c22b138bd2f613004",
      "old_mode": 33188,
      "old_path": "src/dawn/tests/end2end/QueueTests.cpp",
      "new_id": "ae1c93ed19b6a2851773d349b12e84169f8a3f2a",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/end2end/QueueTests.cpp"
    },
    {
      "type": "modify",
      "old_id": "93d6e87af92bc81b0e8df39531951b03bd356756",
      "old_mode": 33188,
      "old_path": "src/dawn/tests/end2end/SurfaceTests.cpp",
      "new_id": "37801074da7d8204f2ba17a9a031724b515cb532",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/end2end/SurfaceTests.cpp"
    },
    {
      "type": "modify",
      "old_id": "9eaddb27d36eaeb6ab56ac46d943d09cd88b7647",
      "old_mode": 33188,
      "old_path": "src/dawn/tests/white_box/SharedTextureMemoryTests_win.cpp",
      "new_id": "d232e0d8466db5abfce385e8358d5dcf951804a6",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/white_box/SharedTextureMemoryTests_win.cpp"
    }
  ]
}
