Fix direct submission initialization
Related-To: NEO-6057 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
parent
5aeae0cf99
commit
cdb7287816
|
@ -92,9 +92,11 @@ class CommandQueueHw : public CommandQueue {
|
||||||
|
|
||||||
gpgpuEngine->osContext->ensureContextInitialized();
|
gpgpuEngine->osContext->ensureContextInitialized();
|
||||||
gpgpuEngine->commandStreamReceiver->initDirectSubmission(device->getDevice(), *gpgpuEngine->osContext);
|
gpgpuEngine->commandStreamReceiver->initDirectSubmission(device->getDevice(), *gpgpuEngine->osContext);
|
||||||
if (const EngineControl *mainBcsEngine = bcsEngines[0]; mainBcsEngine != nullptr) {
|
for (const EngineControl *engine : bcsEngines) {
|
||||||
mainBcsEngine->osContext->ensureContextInitialized();
|
if (engine != nullptr) {
|
||||||
mainBcsEngine->commandStreamReceiver->initDirectSubmission(device->getDevice(), *mainBcsEngine->osContext);
|
engine->osContext->ensureContextInitialized();
|
||||||
|
engine->commandStreamReceiver->initDirectSubmission(device->getDevice(), *engine->osContext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,16 @@ HWTEST_F(CommandQueueHwTest, GivenCommandQueueWhenProcessDispatchForMarkerCalled
|
||||||
EXPECT_GT(csr.makeResidentCalledTimes, 0u);
|
EXPECT_GT(csr.makeResidentCalledTimes, 0u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWTEST_F(CommandQueueHwTest, GivenCommandQueueWhenItIsCreatedThenInitDirectSubmissionIsCalledOnAllBcsEngines) {
|
||||||
|
MockCommandQueueHw<FamilyType> queue(pContext, pClDevice, nullptr);
|
||||||
|
for (auto engine : queue.bcsEngines) {
|
||||||
|
if (engine != nullptr) {
|
||||||
|
auto csr = static_cast<UltCommandStreamReceiver<FamilyType> *>(engine->commandStreamReceiver);
|
||||||
|
EXPECT_EQ(1u, csr->initDirectSubmissionCalled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HWTEST_F(CommandQueueHwTest, givenCommandQueueWhenAskingForCacheFlushOnBcsThenReturnTrue) {
|
HWTEST_F(CommandQueueHwTest, givenCommandQueueWhenAskingForCacheFlushOnBcsThenReturnTrue) {
|
||||||
auto pHwQ = static_cast<CommandQueueHw<FamilyType> *>(pCmdQ);
|
auto pHwQ = static_cast<CommandQueueHw<FamilyType> *>(pCmdQ);
|
||||||
|
|
||||||
|
|
|
@ -254,6 +254,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
||||||
if (ultHwConfig.csrFailInitDirectSubmission) {
|
if (ultHwConfig.csrFailInitDirectSubmission) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
initDirectSubmissionCalled++;
|
||||||
return BaseClass::CommandStreamReceiver::initDirectSubmission(device, osContext);
|
return BaseClass::CommandStreamReceiver::initDirectSubmission(device, osContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,6 +296,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
||||||
uint32_t latestSentTaskCountValueDuringFlush = 0;
|
uint32_t latestSentTaskCountValueDuringFlush = 0;
|
||||||
uint32_t blitBufferCalled = 0;
|
uint32_t blitBufferCalled = 0;
|
||||||
uint32_t createPerDssBackedBufferCalled = 0;
|
uint32_t createPerDssBackedBufferCalled = 0;
|
||||||
|
uint32_t initDirectSubmissionCalled = 0;
|
||||||
int ensureCommandBufferAllocationCalled = 0;
|
int ensureCommandBufferAllocationCalled = 0;
|
||||||
DispatchFlags recordedDispatchFlags;
|
DispatchFlags recordedDispatchFlags;
|
||||||
BlitPropertiesContainer receivedBlitProperties = {};
|
BlitPropertiesContainer receivedBlitProperties = {};
|
||||||
|
|
Loading…
Reference in New Issue