Skip to content

Commit

Permalink
Avoid Metal validation error on MTLBuffer.contents access from privat…
Browse files Browse the repository at this point in the history
…e storage.
  • Loading branch information
billhollings committed Jun 5, 2018
1 parent 0c854c5 commit c2324a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MoltenVK/MoltenVK/GPUObjects/MVKDeviceMemory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
} else {
_mtlBuffer = [getMTLDevice() newBufferWithLength: memLen options: _mtlResourceOptions]; // retained
}
_pMemory = _mtlBuffer.contents;
_pMemory = isMemoryHostAccessible() ? _mtlBuffer.contents : nullptr;

return true;
}
Expand Down

0 comments on commit c2324a5

Please sign in to comment.