diff --git a/unit_tests/aub_tests/command_queue/enqueue_kernel_aub_tests.cpp b/unit_tests/aub_tests/command_queue/enqueue_kernel_aub_tests.cpp index 8959053983..be43177fdc 100644 --- a/unit_tests/aub_tests/command_queue/enqueue_kernel_aub_tests.cpp +++ b/unit_tests/aub_tests/command_queue/enqueue_kernel_aub_tests.cpp @@ -120,14 +120,25 @@ struct AUBHelloWorldIntegrateTest : public HelloWorldFixturegetCommandStreamReceiver(); - commandStreamReceiver.createAllocationAndHandleResidency(pDestMemory, sizeUserMemory); - commandStreamReceiver.createAllocationAndHandleResidency(pSrcMemory, sizeUserMemory); } void TearDown() override { ParentClass::TearDown(); } + + template + void writeMemory(GraphicsAllocation *allocation) { + AUBCommandStreamReceiverHw *aubCsr = nullptr; + if (testMode == TestMode::AubTests) { + aubCsr = reinterpret_cast *>(pCommandStreamReceiver); + } else if (testMode == TestMode::AubTestsWithTbx) { + auto tbxWithAubCsr = reinterpret_cast> *>(pCommandStreamReceiver); + aubCsr = reinterpret_cast *>(tbxWithAubCsr->aubCSR); + tbxWithAubCsr->writeMemory(*allocation); + } + + aubCsr->writeMemory(*allocation); + } TestParam param; }; @@ -140,6 +151,9 @@ HWTEST_P(AUBHelloWorldIntegrateTest, simple) { cl_event *eventWaitList = nullptr; cl_event *event = nullptr; + writeMemory(destBuffer->getGraphicsAllocation()); + writeMemory(srcBuffer->getGraphicsAllocation()); + auto retVal = this->pCmdQ->enqueueKernel( this->pKernel, workDim,