Skip to content

Commit dfa3b96

Browse files
committed
doc: update
1 parent 31e8fd8 commit dfa3b96

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,12 +1203,6 @@ and both `OIDN_EXTERNAL_MEMORY_TYPE_FLAG_OPAQUE_FD` and
12031203
`OIDN_EXTERNAL_MEMORY_TYPE_FLAG_DMA_BUF` on Linux. All possible external
12041204
memory types are listed in the table below.
12051205
1206-
Metal buffers can be used directly using
1207-
1208-
``` cpp
1209-
OIDNBuffer oidnNewSharedBufferFromMetal(OIDNDevice device, MTLBuffer_id buffer);
1210-
```
1211-
12121206
| Name | Description |
12131207
| :-------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- |
12141208
| `OIDN_EXTERNAL_MEMORY_TYPE_FLAG_NONE` | |
@@ -1226,6 +1220,16 @@ OIDNBuffer oidnNewSharedBufferFromMetal(OIDNDevice device, MTLBuffer_id buffer);
12261220
Supported external memory type flags, i.e., valid constants of type
12271221
`OIDNExternalMemoryTypeFlag`.
12281222
1223+
Metal buffers can be imported directly with
1224+
1225+
``` cpp
1226+
OIDNBuffer oidnNewSharedBufferFromMetal(OIDNDevice device, MTLBuffer_id buffer);
1227+
```
1228+
1229+
Note that if a buffer with an `MTLStorageModeManaged` storage mode is
1230+
imported, it is the responsibility of the user to synchronize the
1231+
contents of the buffer between the host and the device.
1232+
12291233
Similar to device objects, buffer objects are also reference-counted and
12301234
can be retained and released by calling the following functions:
12311235

doc/api.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,12 +770,13 @@ Name Description
770770
--------------------------------------------------- ----------------------------------------------------------
771771
: Supported external memory type flags, i.e., valid constants of type `OIDNExternalMemoryTypeFlag`.
772772

773-
Metal buffers can be used directly with
773+
Metal buffers can be imported directly with
774774

775775
OIDNBuffer oidnNewSharedBufferFromMetal(OIDNDevice device, MTLBuffer_id buffer);
776776

777777
Note that if a buffer with an `MTLStorageModeManaged` storage mode is imported, it is the
778-
responsibility of the user to synchronize the contents of the buffer between the CPU and the GPU.
778+
responsibility of the user to synchronize the contents of the buffer between the
779+
host and the device.
779780

780781
Similar to device objects, buffer objects are also reference-counted and can be
781782
retained and released by calling the following functions:

readme.pdf

346 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)