)]}'
{
  "commit": "391d8302b60f7665fd092e8a6d323f73b70be317",
  "tree": "6a4ac19e762231f48c13b11237e8494ef58ba595",
  "parents": [
    "613c2e847af7362417e79c0d518aa877f4726fbc"
  ],
  "author": {
    "name": "Le Hoang Quyen",
    "email": "lehoangquyen@chromium.org",
    "time": "Tue Apr 08 08:56:50 2025 -0700"
  },
  "committer": {
    "name": "Dawn LUCI CQ",
    "email": "dawn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Apr 08 08:56:50 2025 -0700"
  },
  "message": "D3D11: Cache last created SRV and RTV in the Texture class.\n\nIt\u0027s a common scenario that users create a texture\u0027s view transiently\nonce per frame and never cache it.\ne.g:\nvoid renderStep() {\n    // Create a view and attach it to a render pass.\n    wgpu::RenderPassDescriptor renderPassDesc \u003d ...;\n    renderPassDesc.colorAttachments[0].view \u003d texture.CreateView();\n\n    // Draw the render pass.\n}\n\nIn this case, D3D11 has to repeatedly re-create the texture\u0027s D3D native\nview every frame. This is not a cheap operation. Unlike metal backend,\nwhere the view creation could be skipped entirely in some simple\nscenarios:\nSee: https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/src/dawn/native/metal/TextureMTL.mm;drc\u003d5ca64904963dc4676216ddfd226779522c271540;l\u003d104\n\nThis CL adds a small optimization for this scenario by:\n- Caching last created D3D views within the wgpu::Texture object.\n- Checking the cache for an existing D3D view before creating a new one\nwhen a wgpu::TextureView is initialized.\n\nBug: chromium:377716220\nBug: 409035452\nChange-Id: Id99c38f8c91dc441f9a6ba92ca888dea3e8d37dc\nReviewed-on: https://dawn-review.googlesource.com/c/dawn/+/234254\nReviewed-by: Geoff Lang \u003cgeofflang@chromium.org\u003e\nReviewed-by: Corentin Wallez \u003ccwallez@chromium.org\u003e\nCommit-Queue: Quyen Le \u003clehoangquyen@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7fbe37ce11d443493355ee8974259d6a1471155a",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/TextureD3D11.cpp",
      "new_id": "ea1f482d6b0ee64bb1f4cd0d53501c0e2e9fb718",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/TextureD3D11.cpp"
    },
    {
      "type": "modify",
      "old_id": "3f9b21f25df8aad8b2a842aa358efb449fec7828",
      "old_mode": 33188,
      "old_path": "src/dawn/native/d3d11/TextureD3D11.h",
      "new_id": "770c676cea9fc4486c6a9f947dfa4d5b082d72f8",
      "new_mode": 33188,
      "new_path": "src/dawn/native/d3d11/TextureD3D11.h"
    }
  ]
}
