graphicsdriver/metal: Add comments

This commit is contained in:
Hajime Hoshi 2019-02-03 23:58:45 +09:00
parent 882d0c0bc8
commit f29337dc93

View File

@ -28,6 +28,7 @@ import (
// #import <CoreFoundation/CoreFoundation.h> // #import <CoreFoundation/CoreFoundation.h>
// //
// static int count(void* obj) { // static int count(void* obj) {
// // TODO: Don't rely on the number of ref counts. CFGetRetainCount should be used only for debugging.
// return CFGetRetainCount(obj); // return CFGetRetainCount(obj);
// } // }
import "C" import "C"
@ -72,6 +73,7 @@ func getBuffer(device mtl.Device, data unsafe.Pointer, lengthInBytes uintptr) *b
func putBuffer(buf *buffer) { func putBuffer(buf *buffer) {
buf.b.Release() buf.b.Release()
// The buffer will be actually released after all the current command buffers are finished.
gcBufferPool() gcBufferPool()
} }