Skip to content

Commit 2ca541a

Browse files
Revert "Allow for blit enqueue on read/write buffer operations"
This reverts commit dd75cdc. Change-Id: I0e653d25b190036cc0fdbc6765dd79a5646df3d8
1 parent 6f08328 commit 2ca541a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

runtime/command_queue/command_queue.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,11 @@ bool CommandQueue::queueDependenciesClearRequired() const {
578578
}
579579

580580
bool CommandQueue::blitEnqueueAllowed(cl_command_type cmdType) const {
581-
bool blitAllowed = device->getExecutionEnvironment()->getHardwareInfo()->capabilityTable.blitterOperationsSupported;
581+
bool blitAllowed = false;
582582

583583
if (DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.get() != -1) {
584-
blitAllowed &= !!DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.get();
584+
blitAllowed = !!DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.get() &&
585+
device->getExecutionEnvironment()->getHardwareInfo()->capabilityTable.blitterOperationsSupported;
585586
}
586587

587588
bool commandAllowed = (CL_COMMAND_READ_BUFFER == cmdType) || (CL_COMMAND_WRITE_BUFFER == cmdType);

unit_tests/mem_obj/buffer_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,14 +757,14 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenBcsSupportedWhenEnqueueReadWriteBufferIs
757757
commandQueue->enqueueWriteBuffer(bufferForBlt.get(), CL_TRUE, 0, 1, &hostPtr, nullptr, 0, nullptr, nullptr);
758758
commandQueue->enqueueReadBuffer(bufferForBlt.get(), CL_TRUE, 0, 1, &hostPtr, nullptr, 0, nullptr, nullptr);
759759

760-
EXPECT_EQ(2u, bcsCsr->blitBufferCalled);
760+
EXPECT_EQ(0u, bcsCsr->blitBufferCalled);
761761

762762
DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.set(1);
763763
hwInfo->capabilityTable.blitterOperationsSupported = true;
764764
commandQueue->enqueueWriteBuffer(bufferForBlt.get(), CL_TRUE, 0, 1, &hostPtr, nullptr, 0, nullptr, nullptr);
765-
EXPECT_EQ(3u, bcsCsr->blitBufferCalled);
765+
EXPECT_EQ(1u, bcsCsr->blitBufferCalled);
766766
commandQueue->enqueueReadBuffer(bufferForBlt.get(), CL_TRUE, 0, 1, &hostPtr, nullptr, 0, nullptr, nullptr);
767-
EXPECT_EQ(4u, bcsCsr->blitBufferCalled);
767+
EXPECT_EQ(2u, bcsCsr->blitBufferCalled);
768768
}
769769

770770
HWTEST_TEMPLATED_F(BcsBufferTests, givenBcsSupportedWhenQueueIsBlockedThenDispatchBlitWhenUnblocked) {

0 commit comments

Comments
 (0)