File tree Expand file tree Collapse file tree
GPU/GPUTracking/Base/metal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,14 +116,14 @@ uint32_t metalGPUCoreCount()
116116 }
117117
118118 // We only support internal GPUs, so the ownership of the memory is always shared
119- mInternals ->mem_gpu = [mInternals->device newBufferWithLength: mDeviceMemorySize options: MTLResourceStorageModeShared ];
119+ mInternals ->mem_gpu = [mInternals->device newBufferWithLength: mDeviceMemorySize options: MTLResourceStorageModeShared | MTLResourceHazardTrackingModeUntracked ];
120120 if (mInternals ->mem_gpu == nil ) {
121121 GPUErrorReturn (" Metal Memory Allocation Error" );
122122 }
123123
124124 // FIXME: until I understand how to enable the gGPUConstantMemBufferSize constexpr
125125 int32_t tmpGPUConstantMemBufferSize = 100000 ; // gGPUConstantMemBufferSize
126- mInternals ->mem_constant = [mInternals->device newBufferWithLength: tmpGPUConstantMemBufferSize options: MTLResourceStorageModeShared ];
126+ mInternals ->mem_constant = [mInternals->device newBufferWithLength: tmpGPUConstantMemBufferSize options: MTLResourceStorageModeShared | MTLResourceHazardTrackingModeUntracked ];
127127 if (mInternals ->mem_constant == nil ) {
128128 GPUErrorReturn (" Metal Constant Memory Allocation Error" );
129129 }
@@ -143,7 +143,7 @@ uint32_t metalGPUCoreCount()
143143 mInternals ->streamHasWork [i] = false ;
144144 }
145145
146- mInternals ->mem_host = [mInternals->device newBufferWithLength: mHostMemorySize options: MTLResourceStorageModeShared ];
146+ mInternals ->mem_host = [mInternals->device newBufferWithLength: mHostMemorySize options: MTLResourceStorageModeShared | MTLResourceHazardTrackingModeUntracked ];
147147 if (mInternals ->mem_host == nil ) {
148148 GPUErrorReturn (" Error allocating pinned host memory" );
149149 }
You can’t perform that action at this time.
0 commit comments