mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
refactor: Add helper to control flat ring buffer
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
277a0b9f1f
commit
6d1a3d404e
@@ -269,7 +269,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
||||
this->csr &&
|
||||
this->csr->isAnyDirectSubmissionEnabled() &&
|
||||
!neoDevice->getExecutionEnvironment()->areMetricsEnabled() &&
|
||||
neoDevice->getMemoryManager()->isLocalMemorySupported(neoDevice->getRootDeviceIndex());
|
||||
neoDevice->getMemoryManager()->isLocalMemorySupported(neoDevice->getRootDeviceIndex()) &&
|
||||
productHelper.isFlatRingBufferSupported();
|
||||
|
||||
if (NEO::debugManager.flags.DirectSubmissionFlatRingBuffer.get() != -1) {
|
||||
createSecondaryCmdBufferInHostMem &= !!NEO::debugManager.flags.DirectSubmissionFlatRingBuffer.get();
|
||||
|
||||
@@ -880,9 +880,9 @@ HWTEST_F(CommandListCreate, givenImmediateCopyOnlySingleTileDirectSubmissionComm
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::copy, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
auto localMemSupported = device->getHwInfo().featureTable.flags.ftrLocalMemory;
|
||||
EXPECT_EQ(reinterpret_cast<CmdContainerMock *>(&commandList->getCmdContainer())->secondaryCommandStreamForImmediateCmdList.get() != nullptr, localMemSupported);
|
||||
if (localMemSupported) {
|
||||
auto flatRingSupported = device->getHwInfo().featureTable.flags.ftrLocalMemory && device->getProductHelper().isFlatRingBufferSupported();
|
||||
EXPECT_EQ(reinterpret_cast<CmdContainerMock *>(&commandList->getCmdContainer())->secondaryCommandStreamForImmediateCmdList.get() != nullptr, flatRingSupported);
|
||||
if (flatRingSupported) {
|
||||
EXPECT_TRUE(MemoryPoolHelper::isSystemMemoryPool(reinterpret_cast<CmdContainerMock *>(&commandList->getCmdContainer())->secondaryCommandStreamForImmediateCmdList->getGraphicsAllocation()->getMemoryPool()));
|
||||
}
|
||||
}
|
||||
@@ -905,7 +905,7 @@ HWTEST_F(CommandListCreate, givenMetricsImmediateCopyOnlySingleTileDirectSubmiss
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenSecondaryCommandStreamForImmediateCmdListWhenCheckAvailableSpaceThenSwapCommandStreams, IsAtLeastSkl) {
|
||||
if (!device->getHwInfo().featureTable.flags.ftrLocalMemory) {
|
||||
if (!device->getHwInfo().featureTable.flags.ftrLocalMemory || !device->getProductHelper().isFlatRingBufferSupported()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
DebugManagerStateRestore restorer;
|
||||
@@ -933,7 +933,7 @@ HWTEST2_F(CommandListCreate, givenSecondaryCommandStreamForImmediateCmdListWhenC
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenNoSecondaryCommandStreamForImmediateCmdListWhenCheckAvailableSpaceThenNotSwapCommandStreams, IsAtLeastSkl) {
|
||||
if (!device->getHwInfo().featureTable.flags.ftrLocalMemory) {
|
||||
if (!device->getHwInfo().featureTable.flags.ftrLocalMemory || !device->getProductHelper().isFlatRingBufferSupported()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
DebugManagerStateRestore restorer;
|
||||
|
||||
Reference in New Issue
Block a user