mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
Small refactor getCommandStreamReceiver
Related-To: NEO-4692 Change-Id: Ie8c36982d5bd626735d1f8e6d04084bce67738e5 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
@@ -224,7 +224,9 @@ TEST_P(CommandQueueWithBlitOperationsTests, givenDeviceNotSupportingBlitOperatio
|
||||
|
||||
auto defaultCsr = mockDevice->getDefaultEngine().commandStreamReceiver;
|
||||
EXPECT_EQ(defaultCsr, &cmdQ.getGpgpuCommandStreamReceiver());
|
||||
EXPECT_EQ(defaultCsr, &cmdQ.getCommandStreamReceiverByCommandType(cmdType));
|
||||
|
||||
auto blitAllowed = cmdQ.blitEnqueueAllowed(cmdType);
|
||||
EXPECT_EQ(defaultCsr, &cmdQ.getCommandStreamReceiver(blitAllowed));
|
||||
}
|
||||
|
||||
HWTEST_P(CommandQueueWithBlitOperationsTests, givenDeviceWithSubDevicesSupportingBlitOperationsWhenQueueIsCreatedThenBcsIsTakenFromFirstSubDevice) {
|
||||
@@ -251,11 +253,12 @@ HWTEST_P(CommandQueueWithBlitOperationsTests, givenDeviceWithSubDevicesSupportin
|
||||
|
||||
MockCommandQueue cmdQ(nullptr, device.get(), 0);
|
||||
auto cmdType = GetParam();
|
||||
auto blitAllowed = cmdQ.blitEnqueueAllowed(cmdType);
|
||||
|
||||
EXPECT_NE(nullptr, cmdQ.getBcsCommandStreamReceiver());
|
||||
EXPECT_EQ(bcsEngine.commandStreamReceiver, cmdQ.getBcsCommandStreamReceiver());
|
||||
EXPECT_EQ(bcsEngine.commandStreamReceiver, &cmdQ.getCommandStreamReceiverByCommandType(cmdType));
|
||||
EXPECT_EQ(bcsEngine.osContext, &cmdQ.getCommandStreamReceiverByCommandType(cmdType).getOsContext());
|
||||
EXPECT_EQ(bcsEngine.commandStreamReceiver, &cmdQ.getCommandStreamReceiver(blitAllowed));
|
||||
EXPECT_EQ(bcsEngine.osContext, &cmdQ.getCommandStreamReceiver(blitAllowed).getOsContext());
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(uint32_t,
|
||||
|
||||
@@ -354,7 +354,9 @@ HWTEST_F(EnqueueSvmMemCopyTest, givenCommandQueueWhenEnqueueSVMMemcpyIsCalledThe
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
EXPECT_TRUE(mockCmdQ->notifyEnqueueSVMMemcpyCalled);
|
||||
|
||||
auto &csr = mockCmdQ->getCommandStreamReceiverByCommandType(CL_COMMAND_SVM_MEMCPY);
|
||||
auto blitAllowed = mockCmdQ->blitEnqueueAllowed(CL_COMMAND_SVM_MEMCPY);
|
||||
|
||||
auto &csr = mockCmdQ->getCommandStreamReceiver(blitAllowed);
|
||||
EXPECT_EQ(EngineHelpers::isBcs(csr.getOsContext().getEngineType()), mockCmdQ->useBcsCsrOnNotifyEnabled);
|
||||
|
||||
alignedFree(dstHostPtr);
|
||||
|
||||
Reference in New Issue
Block a user