Skip to content

Commit ff1dcc1

Browse files
performance: adust copy from image to host logic
Related-To: NEO-14569 Signed-off-by: Szymon Morek <[email protected]>
1 parent c493799 commit ff1dcc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared/source/utilities/staging_buffer_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ StagingTransferStatus StagingBufferManager::performBufferTransfer(const void *pt
270270
void StagingBufferManager::copyImageToHost(void *dst, const void *stagingBuffer, size_t size, const ImageMetadata &imageData) const {
271271
auto sliceSize = imageData.rowSize * imageData.rowsInChunk;
272272

273-
if (imageData.rowSize < imageData.rowPitch || sliceSize < imageData.slicePitch) {
273+
if (imageData.rowSize < imageData.rowPitch || (sliceSize < imageData.slicePitch && imageData.slicesInChunk > 1)) {
274274
for (auto sliceId = 0u; sliceId < imageData.slicesInChunk; sliceId++) {
275275
auto sliceOffset = sliceId * imageData.slicePitch;
276276
for (auto rowId = 0u; rowId < imageData.rowsInChunk; rowId++) {

0 commit comments

Comments
 (0)