![Radeon Pro Solid State Graphics Скачать руководство пользователя страница 21](http://html.mh-extra.com/html/radeon/pro-solid-state-graphics/pro-solid-state-graphics_api-user-manual_776864021.webp)
Rev. 1.01
21
9.8
ReadBufferFromFile
The
ReadBufferFromFile
function transfers file information to the D3D11 buffer. The call can be
synchronous or asynchronous, and it takes one or more regions to fill the destination buffer. Splitting
the request into multiple smaller regions can improve performance.
Note: During asynchronous transfers (between the transfer call and the
WaitEvent
call), avoid using the
D3D buffer in the D3D pipeline or lock/unlock. Also note that
WaitEvent
is required for every
asynchronous transfer. Do not assume that waiting for the last issued transfer means all asynchronous
transfers are complete.
pBuffer
[in]
The D3D11 buffer that will be the transfer destination.
hFile
[in]
SSG file handle that will be the data-transfer source.
numRegions
[in]
Number of elements in
pRegions
array.
pRegions
[in]
Array of regions for the data transfer. Each region contains the file offset to read from, the buffer offset to
write to and the size of the data to write, in bytes.
They must be a multiple of sector-size
.
hEvent
[in]
SSG event handle to wait on. If the call omits an event, the function will be synchronous and will return
after the data transfer is complete. If the call includes an event, the function will return immediately, and
the caller is responsible for waiting on this event to ensure the data transfer is complete.
Return Value
Description
S_OK
The function succeeded.
E_HANDLE
The file object is invalid.
E_INVALIDARG
The file object is invalid.
E_FAIL
The sum of
dstOffset
and
length
exceeds the size of the target buffer.
E_FAIL
The value of
srcOffset, length
or
dstOffset
is not a multiple of
GL_FILE_BLOCK_SIZE_AMD.
E_FAIL
The function failed to access the file with the specified
srcOffset
and
length
values.
C++
HRESULT ReadBufferFromFile(ID3D11Buffer* pBuffer,
AmdDxLfFileHandle hFile,
UINT
numRegions,
AmdDxLfRegionDesc* pRegions,
AmdDxLfEventHandle hEvent);
Содержание Pro Solid State Graphics
Страница 1: ...Solid State Graphics SSG API User Manual ...