Set indirect flags upon command list reset
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
parent
ebf6c241b4
commit
6c6a9b27f5
|
@ -80,6 +80,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::reset() {
|
||||||
indirectAllocationsAllowed = false;
|
indirectAllocationsAllowed = false;
|
||||||
unifiedMemoryControls.indirectHostAllocationsAllowed = false;
|
unifiedMemoryControls.indirectHostAllocationsAllowed = false;
|
||||||
unifiedMemoryControls.indirectSharedAllocationsAllowed = false;
|
unifiedMemoryControls.indirectSharedAllocationsAllowed = false;
|
||||||
|
unifiedMemoryControls.indirectDeviceAllocationsAllowed = false;
|
||||||
commandListPreemptionMode = device->getDevicePreemptionMode();
|
commandListPreemptionMode = device->getDevicePreemptionMode();
|
||||||
commandListPerThreadScratchSize = 0u;
|
commandListPerThreadScratchSize = 0u;
|
||||||
requiredStreamState = {};
|
requiredStreamState = {};
|
||||||
|
|
|
@ -47,8 +47,10 @@ struct WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>
|
||||||
using BaseClass::getAllocationFromHostPtrMap;
|
using BaseClass::getAllocationFromHostPtrMap;
|
||||||
using BaseClass::getHostPtrAlloc;
|
using BaseClass::getHostPtrAlloc;
|
||||||
using BaseClass::hostPtrMap;
|
using BaseClass::hostPtrMap;
|
||||||
|
using BaseClass::indirectAllocationsAllowed;
|
||||||
using BaseClass::initialize;
|
using BaseClass::initialize;
|
||||||
using BaseClass::requiredStreamState;
|
using BaseClass::requiredStreamState;
|
||||||
|
using BaseClass::unifiedMemoryControls;
|
||||||
using BaseClass::updateStreamProperties;
|
using BaseClass::updateStreamProperties;
|
||||||
|
|
||||||
WhiteBox() : ::L0::CommandListCoreFamily<gfxCoreFamily>(BaseClass::defaultNumIddsPerBlock) {}
|
WhiteBox() : ::L0::CommandListCoreFamily<gfxCoreFamily>(BaseClass::defaultNumIddsPerBlock) {}
|
||||||
|
|
|
@ -804,5 +804,32 @@ HWTEST_F(CommandListCreate, givenAsyncCmdQueueAndCopyOnlyImmediateCommandListWhe
|
||||||
EXPECT_EQ(used, commandContainer.getCommandStream()->getUsed());
|
EXPECT_EQ(used, commandContainer.getCommandStream()->getUsed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWTEST2_F(CommandListCreate, givenIndirectAccessFlagsAreChangedWhenResetingCommandListThenExpectAllFlagsSetToDefault, TestPlatforms) {
|
||||||
|
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||||
|
|
||||||
|
auto commandList = std::make_unique<::L0::ult::CommandListCoreFamily<gfxCoreFamily>>();
|
||||||
|
ASSERT_NE(nullptr, commandList);
|
||||||
|
ze_result_t returnValue = commandList->initialize(device, NEO::EngineGroupType::Compute, 0u);
|
||||||
|
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||||
|
|
||||||
|
EXPECT_FALSE(commandList->indirectAllocationsAllowed);
|
||||||
|
EXPECT_FALSE(commandList->unifiedMemoryControls.indirectHostAllocationsAllowed);
|
||||||
|
EXPECT_FALSE(commandList->unifiedMemoryControls.indirectSharedAllocationsAllowed);
|
||||||
|
EXPECT_FALSE(commandList->unifiedMemoryControls.indirectDeviceAllocationsAllowed);
|
||||||
|
|
||||||
|
commandList->indirectAllocationsAllowed = true;
|
||||||
|
commandList->unifiedMemoryControls.indirectHostAllocationsAllowed = true;
|
||||||
|
commandList->unifiedMemoryControls.indirectSharedAllocationsAllowed = true;
|
||||||
|
commandList->unifiedMemoryControls.indirectDeviceAllocationsAllowed = true;
|
||||||
|
|
||||||
|
returnValue = commandList->reset();
|
||||||
|
EXPECT_EQ(ZE_RESULT_SUCCESS, returnValue);
|
||||||
|
|
||||||
|
EXPECT_FALSE(commandList->indirectAllocationsAllowed);
|
||||||
|
EXPECT_FALSE(commandList->unifiedMemoryControls.indirectHostAllocationsAllowed);
|
||||||
|
EXPECT_FALSE(commandList->unifiedMemoryControls.indirectSharedAllocationsAllowed);
|
||||||
|
EXPECT_FALSE(commandList->unifiedMemoryControls.indirectDeviceAllocationsAllowed);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ult
|
} // namespace ult
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|
Loading…
Reference in New Issue