------------------------------------------------------------------------------------------------ Row-by-row memcpy
| 1393 | //------------------------------------------------------------------------------------------------ |
| 1394 | // Row-by-row memcpy |
| 1395 | void MemcpySubresource( |
| 1396 | _In_ const D3D12_MEMCPY_DEST* pDest, |
| 1397 | _In_ const D3D12_SUBRESOURCE_DATA* pSrc, |
| 1398 | SIZE_T RowSizeInBytes, |
| 1399 | UINT NumRows, |
| 1400 | UINT NumSlices ) |
| 1401 | { |
| 1402 | for( UINT z = 0; z < NumSlices; ++z ) |
| 1403 | { |
| 1404 | BYTE* pDestSlice = reinterpret_cast<BYTE*>( pDest->pData ) + pDest->SlicePitch * z; |
| 1405 | const BYTE* pSrcSlice = reinterpret_cast<const BYTE*>( pSrc->pData ) + pSrc->SlicePitch * z; |
| 1406 | for( UINT y = 0; y < NumRows; ++y ) |
| 1407 | { |
| 1408 | memcpy( pDestSlice + pDest->RowPitch * y, |
| 1409 | pSrcSlice + pSrc->RowPitch * y, |
| 1410 | RowSizeInBytes ); |
| 1411 | } |
| 1412 | } |
| 1413 | } |
| 1414 | |
| 1415 | //------------------------------------------------------------------------------------------------ |
| 1416 | // All arrays must be populated (e.g. by calling GetCopyableFootprints) |
no outgoing calls
no test coverage detected