Fix #107704: Release infrequently used memory in Metal buffer pools #108083

Merged
Jeroen Bakker merged 5 commits from Jason-Fielder/blender:MetalMemoryPool_Flushing into blender-v3.6-release 2023-06-01 15:48:36 +02:00

5 Commits

Author SHA1 Message Date
Michael Parkin-White 9b3fac4a20 Merge branch 'blender-v3.6-release' into MetalMemoryPool_Flushing 2023-05-30 16:59:07 +02:00
Michael Parkin-White 7821c016c8 Replace memory values with macros for readability 2023-05-23 11:48:20 +01:00
Michael Parkin-White a20cb89173 Merge branch 'blender-v3.6-release' into MetalMemoryPool_Flushing 2023-05-22 13:13:02 +02:00
Jason Fielder 11d6917ac9 Merge branch 'blender-v3.6-release' into MetalMemoryPool_Flushing 2023-05-19 16:14:36 +02:00
Michael Parkin-White 5bc8fb4fdc Fix #107704: Release infrequently used memory in Metal buffer pools
Excessive memory pool bloating could occur for certain workloads in
Metal. Particularly those which continuously allocate increasingly
large buffers with minimal re-use of existing buffers.

New logic added to the memory pool flushes old buffers if they
have not been used for a set period of time. Timing is calibrated
against system resources and overall memory pressure.

Metal memory pressure will run higher than OpenGL, however,
this is an active decision to provide significant performance
improvements for scenarios which allocate lots of memory and
for keeping frames queued in flight without stalling on pending
GPU work.

Authored by Apple: Michael Parkin-White
2023-05-19 15:11:02 +01:00