mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 01:48:50 +08:00
Revert "performance: enable staging read for images"
This reverts commit 6aeb8dffa0.
Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
83b7143485
commit
548f93c55a
@@ -2892,22 +2892,19 @@ cl_int CL_API_CALL clEnqueueReadImage(cl_command_queue commandQueue,
|
|||||||
TRACING_EXIT(ClEnqueueReadImage, &retVal);
|
TRACING_EXIT(ClEnqueueReadImage, &retVal);
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
if (pCommandQueue->isValidForStagingTransferImage(pImage, ptr, numEventsInWaitList > 0)) {
|
|
||||||
retVal = pCommandQueue->enqueueStagingReadImage(pImage, blockingRead, origin, region, rowPitch, slicePitch, ptr, event);
|
retVal = pCommandQueue->enqueueReadImage(
|
||||||
} else {
|
pImage,
|
||||||
retVal = pCommandQueue->enqueueReadImage(
|
blockingRead,
|
||||||
pImage,
|
origin,
|
||||||
blockingRead,
|
region,
|
||||||
origin,
|
rowPitch,
|
||||||
region,
|
slicePitch,
|
||||||
rowPitch,
|
ptr,
|
||||||
slicePitch,
|
nullptr,
|
||||||
ptr,
|
numEventsInWaitList,
|
||||||
nullptr,
|
eventWaitList,
|
||||||
numEventsInWaitList,
|
event);
|
||||||
eventWaitList,
|
|
||||||
event);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
DBG_LOG_INPUTS("event", getClFileLogger().getEvents(reinterpret_cast<const uintptr_t *>(event), 1u));
|
DBG_LOG_INPUTS("event", getClFileLogger().getEvents(reinterpret_cast<const uintptr_t *>(event), 1u));
|
||||||
TRACING_EXIT(ClEnqueueReadImage, &retVal);
|
TRACING_EXIT(ClEnqueueReadImage, &retVal);
|
||||||
|
|||||||
@@ -205,33 +205,4 @@ TEST_F(ClEnqueueReadImageYuv, GivenInvalidRegionWhenReadingYuvImageThenInvalidVa
|
|||||||
retVal = clReleaseMemObject(image);
|
retVal = clReleaseMemObject(image);
|
||||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ClEnqueueReadImageTests, givenStagingEnabledWhenEnqueueReadImageCalledThenReadSuccesfullAndStagingBufferAllocated) {
|
|
||||||
DebugManagerStateRestore restorer;
|
|
||||||
debugManager.flags.EnableCopyWithStagingBuffers.set(1);
|
|
||||||
imageFormat.image_channel_order = CL_RGBA;
|
|
||||||
auto image = Image::validateAndCreateImage(pContext, nullptr, CL_MEM_READ_WRITE, 0, &imageFormat, &imageDesc, nullptr, retVal);
|
|
||||||
ASSERT_EQ(CL_SUCCESS, retVal);
|
|
||||||
EXPECT_NE(nullptr, image);
|
|
||||||
const size_t origin[] = {2, 2, 0};
|
|
||||||
const size_t region[] = {2, 2, 1};
|
|
||||||
char nonUsmPtr[1024];
|
|
||||||
auto retVal = clEnqueueReadImage(
|
|
||||||
pCommandQueue,
|
|
||||||
image,
|
|
||||||
false,
|
|
||||||
origin,
|
|
||||||
region,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
nonUsmPtr,
|
|
||||||
0,
|
|
||||||
nullptr,
|
|
||||||
nullptr);
|
|
||||||
auto unifiedMemoryManager = pContext->getSVMAllocsManager();
|
|
||||||
EXPECT_EQ(1u, unifiedMemoryManager->getNumAllocs());
|
|
||||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
|
||||||
retVal = clReleaseMemObject(image);
|
|
||||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
|
||||||
}
|
|
||||||
} // namespace ULT
|
} // namespace ULT
|
||||||
|
|||||||
Reference in New Issue
Block a user