Skip to content

Commit 548f93c

Browse files
Revert "performance: enable staging read for images"
This reverts commit 6aeb8df. Signed-off-by: Szymon Morek <[email protected]>
1 parent 83b7143 commit 548f93c

File tree

2 files changed

+13
-45
lines changed

2 files changed

+13
-45
lines changed

opencl/source/api/api.cpp

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2892,22 +2892,19 @@ cl_int CL_API_CALL clEnqueueReadImage(cl_command_queue commandQueue,
28922892
TRACING_EXIT(ClEnqueueReadImage, &retVal);
28932893
return retVal;
28942894
}
2895-
if (pCommandQueue->isValidForStagingTransferImage(pImage, ptr, numEventsInWaitList > 0)) {
2896-
retVal = pCommandQueue->enqueueStagingReadImage(pImage, blockingRead, origin, region, rowPitch, slicePitch, ptr, event);
2897-
} else {
2898-
retVal = pCommandQueue->enqueueReadImage(
2899-
pImage,
2900-
blockingRead,
2901-
origin,
2902-
region,
2903-
rowPitch,
2904-
slicePitch,
2905-
ptr,
2906-
nullptr,
2907-
numEventsInWaitList,
2908-
eventWaitList,
2909-
event);
2910-
}
2895+
2896+
retVal = pCommandQueue->enqueueReadImage(
2897+
pImage,
2898+
blockingRead,
2899+
origin,
2900+
region,
2901+
rowPitch,
2902+
slicePitch,
2903+
ptr,
2904+
nullptr,
2905+
numEventsInWaitList,
2906+
eventWaitList,
2907+
event);
29112908
}
29122909
DBG_LOG_INPUTS("event", getClFileLogger().getEvents(reinterpret_cast<const uintptr_t *>(event), 1u));
29132910
TRACING_EXIT(ClEnqueueReadImage, &retVal);

opencl/test/unit_test/api/cl_enqueue_read_image_tests.inl

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -205,33 +205,4 @@ TEST_F(ClEnqueueReadImageYuv, GivenInvalidRegionWhenReadingYuvImageThenInvalidVa
205205
retVal = clReleaseMemObject(image);
206206
EXPECT_EQ(CL_SUCCESS, retVal);
207207
}
208-
209-
TEST_F(ClEnqueueReadImageTests, givenStagingEnabledWhenEnqueueReadImageCalledThenReadSuccesfullAndStagingBufferAllocated) {
210-
DebugManagerStateRestore restorer;
211-
debugManager.flags.EnableCopyWithStagingBuffers.set(1);
212-
imageFormat.image_channel_order = CL_RGBA;
213-
auto image = Image::validateAndCreateImage(pContext, nullptr, CL_MEM_READ_WRITE, 0, &imageFormat, &imageDesc, nullptr, retVal);
214-
ASSERT_EQ(CL_SUCCESS, retVal);
215-
EXPECT_NE(nullptr, image);
216-
const size_t origin[] = {2, 2, 0};
217-
const size_t region[] = {2, 2, 1};
218-
char nonUsmPtr[1024];
219-
auto retVal = clEnqueueReadImage(
220-
pCommandQueue,
221-
image,
222-
false,
223-
origin,
224-
region,
225-
0,
226-
0,
227-
nonUsmPtr,
228-
0,
229-
nullptr,
230-
nullptr);
231-
auto unifiedMemoryManager = pContext->getSVMAllocsManager();
232-
EXPECT_EQ(1u, unifiedMemoryManager->getNumAllocs());
233-
EXPECT_EQ(CL_SUCCESS, retVal);
234-
retVal = clReleaseMemObject(image);
235-
EXPECT_EQ(CL_SUCCESS, retVal);
236-
}
237208
} // namespace ULT

0 commit comments

Comments
 (0)