)]}'
{
  "commit": "7bfca34d0244f24982f36f5fc2179a73242e3d0f",
  "tree": "0c58aa174ff9a51823d2538858409cb82104c7d4",
  "parents": [
    "3b17341a7a8e1ecab6a28adc72c5e2b8db0f498d"
  ],
  "author": {
    "name": "Arman Uguray",
    "email": "armansito@google.com",
    "time": "Tue Feb 13 00:46:52 2024 -0800"
  },
  "committer": {
    "name": "Arman Uguray",
    "email": "armansito@google.com",
    "time": "Tue Mar 12 12:46:55 2024 -0700"
  },
  "message": "[encoding] BumpEstimator utility\n\nSeveral vello stages dynamically bump allocate intermediate data\nstructures. Due to graphics API limitations the backing memory\nfor these data structures must have been allocated at the time of\ncommand submission even though the precise memory requirements\nare unknown.\n\nVello currently works around this issue in two ways (see #366):\n1. Vello currently prescribes a mechanism in which allocation failures\n   get detected by fencing back to the CPU. The client responds to\n   this event by creating larger GPU buffers using the bump\n   allocator state obtained via read-back. The client has the\n   choice of dropping skipping a frame or submitting the fine\n   stage only after any allocations failures get resolved.\n\n2. The encoding crate hard-codes the buffers to be large enough to be\n   able to render paris-30k, making it unlikely for simple scenes to\n   under-allocate. This comes at the cost of a fixed memory watermark\n   of \u003e50MB.\n\nThere may be situations when neither of these solutions are desirable\nwhile the cost of additional CPU-side pre-processing is not considered\nprohibitive for performance. It may also be acceptable to pay the cost\nof generally allocating more than what\u0027s required in order to make the\nthis problem go away entirely (except perhaps for OOM situations).\n\nIn that spirit, this change introduces the beginnings of a\nheuristic-based conservative memory estimation utility. It currently\nestimates only the LineSoup buffer (which contains the curve flattening\noutput) within a factor of 1.1x-3.3x on the Vello test scenes (paris-30k\nis estimated at 1.5x the actual requirement).\n\n- Curves are estimated using Wang\u0027s formula which is fast to evaluate\n  but produces a less optimal result than Vello\u0027s analytic approach.\n  The overestimation is more pronounced with increased curvature\n  variation.\n\n- Explicit lines (such as line-tos) get estimated precisely\n\n- Only the LineSoup buffer is supported.\n\n- A BumpEstimator is integrated with the Scene API (gated by a feature\n  flag) but the results are currently unused. Glyph runs are not\n  supported as the estimator is not yet aware of the path data stored\n  in glyph cache.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7c5cbc8f8ba2fcd87021133136b082f1895b7229",
      "old_mode": 33188,
      "old_path": "Cargo.toml",
      "new_id": "99abdc86b3799bd0de0869d8e042bcc636ef2f96",
      "new_mode": 33188,
      "new_path": "Cargo.toml"
    },
    {
      "type": "modify",
      "old_id": "f7868a8b38ce3c803a4b27bcd32bfe67f54db1b0",
      "old_mode": 33188,
      "old_path": "crates/encoding/Cargo.toml",
      "new_id": "c9032f7df64a2a068da98e093c29171a59a6ae94",
      "new_mode": 33188,
      "new_path": "crates/encoding/Cargo.toml"
    },
    {
      "type": "modify",
      "old_id": "37b1906ac24aac6be27cd29252ac750a520c2b8c",
      "old_mode": 33188,
      "old_path": "crates/encoding/src/config.rs",
      "new_id": "b6ef8857ada035eb2e01baaa57537f9c8a097b13",
      "new_mode": 33188,
      "new_path": "crates/encoding/src/config.rs"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8cb21dacb03189e7c6bf56719e950dad1f54d30d",
      "new_mode": 33188,
      "new_path": "crates/encoding/src/estimate.rs"
    },
    {
      "type": "modify",
      "old_id": "2ace2819aee51cf06c7c65f6289a6b4dd41487a6",
      "old_mode": 33188,
      "old_path": "crates/encoding/src/lib.rs",
      "new_id": "30db95000a8e307cb8a9ef1f0d153cb0d869752b",
      "new_mode": 33188,
      "new_path": "crates/encoding/src/lib.rs"
    },
    {
      "type": "modify",
      "old_id": "6fffd358da6d61b7956a557728ee481684f66804",
      "old_mode": 33188,
      "old_path": "src/scene.rs",
      "new_id": "4e2c0d7fc100944b0659ce593d8274c53780552c",
      "new_mode": 33188,
      "new_path": "src/scene.rs"
    }
  ]
}
