Revert "performance: Remove global fence from command stream on BMG"
This reverts commit 4e823f9e6e
.
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
9c9a0a87b9
commit
4fe3bc40e3
|
@ -20,7 +20,7 @@ bool ProductHelperHw<gfxProduct>::isBlitterForImagesSupported() const {
|
|||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isGlobalFenceInCommandStreamRequired(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
return !hwInfo.capabilityTable.isIntegratedDevice;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
|
|
@ -3075,7 +3075,7 @@ HWTEST2_F(CommandStreamReceiverHwTest, givenDeviceToHostCopyWhenFenceIsRequiredT
|
|||
|
||||
fenceExpected &= getHelper<ProductHelper>().isDeviceToHostCopySignalingFenceRequired();
|
||||
size_t expectedFenceCount = fenceExpected ? 1 : 0;
|
||||
if (getHelper<ProductHelper>().isGlobalFenceInCommandStreamRequired(pDevice->getHardwareInfo())) {
|
||||
if (!pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice) {
|
||||
expectedFenceCount += 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ struct DirectSubmissionDispatchMiMemFenceTest : public DirectSubmissionDispatchB
|
|||
DirectSubmissionDispatchBufferTest::SetUp();
|
||||
|
||||
auto &productHelper = pDevice->getProductHelper();
|
||||
miMemFenceSupported = productHelper.isGlobalFenceInDirectSubmissionRequired(pDevice->getHardwareInfo());
|
||||
miMemFenceSupported = pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice ? false : productHelper.isGlobalFenceInDirectSubmissionRequired(pDevice->getHardwareInfo());
|
||||
|
||||
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
|
||||
heaplessStateInit = compilerProductHelper.isHeaplessStateInitEnabled(compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo));
|
||||
|
@ -108,18 +108,9 @@ struct DirectSubmissionDispatchMiMemFenceTest : public DirectSubmissionDispatchB
|
|||
EXPECT_EQ(expectedFenceCount, fenceCount);
|
||||
EXPECT_EQ(expectedSysMemFenceCount, sysMemFenceCount);
|
||||
} else {
|
||||
if (directSubmission.globalFenceAllocation) {
|
||||
if (expectedSysMemFenceCount > 0) {
|
||||
EXPECT_NE(-1, systemMemoryFenceId);
|
||||
} else {
|
||||
EXPECT_EQ(-1, systemMemoryFenceId);
|
||||
}
|
||||
EXPECT_EQ(expectedSysMemFenceCount, sysMemFenceCount);
|
||||
} else {
|
||||
EXPECT_EQ(-1, systemMemoryFenceId);
|
||||
EXPECT_EQ(0u, sysMemFenceCount);
|
||||
}
|
||||
EXPECT_EQ(-1, systemMemoryFenceId);
|
||||
EXPECT_EQ(0u, fenceCount);
|
||||
EXPECT_EQ(0u, sysMemFenceCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -269,7 +260,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DirectSubmissionDispatchBufferTest,
|
|||
directSubmission.getSizeSemaphoreSection(false) +
|
||||
sizeof(MI_LOAD_REGISTER_IMM) +
|
||||
sizeof(MI_LOAD_REGISTER_MEM);
|
||||
if (directSubmission.globalFenceAllocation && !heaplessStateInit) {
|
||||
if (directSubmission.miMemFenceRequired && !heaplessStateInit) {
|
||||
submitSize += directSubmission.getSizeSystemMemoryFenceAddress();
|
||||
}
|
||||
if (directSubmission.isRelaxedOrderingEnabled()) {
|
||||
|
@ -566,7 +557,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
|
|||
EXPECT_EQ(1u, directSubmission.submitCount);
|
||||
size_t submitSize = RenderDispatcher<FamilyType>::getSizePreemption() +
|
||||
directSubmission.getSizeSemaphoreSection(false);
|
||||
if (directSubmission.globalFenceAllocation && !heaplessStateInit) {
|
||||
if (directSubmission.miMemFenceRequired && !heaplessStateInit) {
|
||||
submitSize += directSubmission.getSizeSystemMemoryFenceAddress();
|
||||
}
|
||||
if (directSubmission.isRelaxedOrderingEnabled()) {
|
||||
|
@ -620,7 +611,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
|
|||
EXPECT_EQ(1u, directSubmission.handleResidencyCount);
|
||||
|
||||
size_t submitSize = directSubmission.getSizeDispatch(false, false, directSubmission.dispatchMonitorFenceRequired(false)) - directSubmission.getSizeNewResourceHandler();
|
||||
if (directSubmission.globalFenceAllocation && !heaplessStateInit) {
|
||||
if (directSubmission.miMemFenceRequired && !heaplessStateInit) {
|
||||
submitSize += directSubmission.getSizeSystemMemoryFenceAddress();
|
||||
}
|
||||
if (directSubmission.isRelaxedOrderingEnabled()) {
|
||||
|
@ -646,7 +637,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
|
|||
EXPECT_EQ(1u, directSubmission.submitCount);
|
||||
size_t submitSize = RenderDispatcher<FamilyType>::getSizePreemption() +
|
||||
directSubmission.getSizeSemaphoreSection(false);
|
||||
if (directSubmission.globalFenceAllocation && !heaplessStateInit) {
|
||||
if (directSubmission.miMemFenceRequired && !heaplessStateInit) {
|
||||
submitSize += directSubmission.getSizeSystemMemoryFenceAddress();
|
||||
}
|
||||
if (directSubmission.isRelaxedOrderingEnabled()) {
|
||||
|
@ -697,7 +688,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
|
|||
EXPECT_EQ(1u, directSubmission.handleResidencyCount);
|
||||
|
||||
size_t submitSize = directSubmission.getSizeDispatch(false, false, directSubmission.dispatchMonitorFenceRequired(false)) - directSubmission.getSizeNewResourceHandler();
|
||||
if (directSubmission.globalFenceAllocation && !heaplessStateInit) {
|
||||
if (directSubmission.miMemFenceRequired && !heaplessStateInit) {
|
||||
submitSize += directSubmission.getSizeSystemMemoryFenceAddress();
|
||||
}
|
||||
if (directSubmission.isRelaxedOrderingEnabled()) {
|
||||
|
@ -790,7 +781,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DirectSubmissionDispatchBufferTest,
|
|||
directSubmission.getSizeSemaphoreSection(false) +
|
||||
sizeof(MI_LOAD_REGISTER_IMM) +
|
||||
sizeof(MI_LOAD_REGISTER_MEM);
|
||||
if (directSubmission.globalFenceAllocation && !heaplessStateInit) {
|
||||
if (directSubmission.miMemFenceRequired && !heaplessStateInit) {
|
||||
submitSize += directSubmission.getSizeSystemMemoryFenceAddress();
|
||||
}
|
||||
|
||||
|
|
|
@ -1368,7 +1368,7 @@ HWTEST_TEMPLATED_F(WddmCommandStreamMockGdiTest, givenDirectSubmissionEnabledOnB
|
|||
auto &compilerProductHelper = device->getCompilerProductHelper();
|
||||
auto heaplessStateInit = compilerProductHelper.isHeaplessStateInitEnabled(compilerProductHelper.isHeaplessModeEnabled(*defaultHwInfo));
|
||||
|
||||
if (directSubmission->globalFenceAllocation && !heaplessStateInit) {
|
||||
if (directSubmission->miMemFenceRequired && !heaplessStateInit) {
|
||||
expectedSize += directSubmission->getSizeSystemMemoryFenceAddress();
|
||||
}
|
||||
if (directSubmission->isRelaxedOrderingEnabled()) {
|
||||
|
|
|
@ -520,14 +520,17 @@ XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenGfxCoreHelperWhenAskedIfFe
|
|||
}
|
||||
|
||||
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenDefaultMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
|
||||
EXPECT_EQ(0u, MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
|
||||
using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE;
|
||||
|
||||
EXPECT_EQ(!pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice * sizeof(MI_MEM_FENCE), MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenDebugMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.DisablePipeControlPrecedingPostSyncCommand.set(1);
|
||||
using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE;
|
||||
|
||||
EXPECT_EQ(0u, MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
|
||||
EXPECT_EQ(!pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice * 2 * sizeof(MI_MEM_FENCE), MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenDontProgramGlobalFenceAsMiMemFenceCommandInCommandStreamWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
|
||||
|
@ -677,9 +680,9 @@ XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenCallUseGem
|
|||
EXPECT_TRUE(productHelper.useGemCreateExtInAllocateMemoryByKMD());
|
||||
}
|
||||
|
||||
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForGlobalFenceSupportThenReturnFalse) {
|
||||
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForGlobalFenceSupportThenReturnTrue) {
|
||||
const auto &productHelper = getHelper<ProductHelper>();
|
||||
EXPECT_FALSE(productHelper.isGlobalFenceInCommandStreamRequired(*defaultHwInfo));
|
||||
EXPECT_EQ(productHelper.isGlobalFenceInCommandStreamRequired(*defaultHwInfo), !defaultHwInfo->capabilityTable.isIntegratedDevice);
|
||||
}
|
||||
|
||||
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForCooperativeEngineSupportThenReturnTrue) {
|
||||
|
|
Loading…
Reference in New Issue