Merge pull request #1323 from billhollings/tmp-buff-alloc

Enhancements and fixes to temporary MTLBuffer allocation.