Improve ftr/wa flags packing

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2021-11-25 09:31:14 +00:00
committed by Compute-Runtime-Automation
parent 1da896bee0
commit 995cb88bfa
160 changed files with 1777 additions and 1765 deletions

View File

@@ -26,7 +26,7 @@ HWTEST_F(AubCsrTest, givenLocalMemoryEnabledWhenGettingAddressSpaceForRingDataTy
DebugManagerStateRestore restorer;
DebugManager.flags.EnableLocalMemory.set(1);
auto hwInfo = *NEO::defaultHwInfo.get();
hwInfo.featureTable.ftrLocalMemory = true;
hwInfo.featureTable.flags.ftrLocalMemory = true;
std::unique_ptr<ExecutionEnvironment> executionEnvironment(new ExecutionEnvironment);
DeviceBitfield deviceBitfield(1);

View File

@@ -369,7 +369,7 @@ using XeHPAndLaterAubCommandStreamReceiverTests2 = HwHelperTest;
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests2, givenLocalMemoryEnabledInCSRWhenGetGTTDataIsCalledThenLocalMemoryIsSet) {
DebugManagerStateRestore debugRestorer;
DebugManager.flags.EnableLocalMemory.set(1);
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo));
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(std::make_unique<MockAubCsrXeHPAndLater<FamilyType>>("", true, *device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield()));

View File

@@ -429,7 +429,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, whenSamplerCach
commandStreamReceiver.setSamplerCacheFlushRequired(CommandStreamReceiver::SamplerCacheFlushState::samplerCacheFlushNotRequired);
configureCSRtoNonDirtyState<FamilyType>(false);
commandStreamReceiver.taskLevel = taskLevel;
waTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
waTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
flushTask(commandStreamReceiver);
EXPECT_EQ(commandStreamReceiver.commandStream.getUsed(), 0u);
@@ -449,7 +449,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, whenSamplerCacheFlushBeforeThenSen
commandStreamReceiver.taskLevel = taskLevel;
NEO::WorkaroundTable *waTable = &pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable;
waTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
waTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
flushTask(commandStreamReceiver);
@@ -472,7 +472,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, whenSamplerCach
commandStreamReceiver.taskLevel = taskLevel;
NEO::WorkaroundTable *waTable = &pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable;
waTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = false;
waTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = false;
flushTask(commandStreamReceiver);
@@ -493,7 +493,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, whenSamplerCacheFlushAfterThenSend
commandStreamReceiver.taskLevel = taskLevel;
NEO::WorkaroundTable *waTable = &pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable;
waTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
waTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
flushTask(commandStreamReceiver);

View File

@@ -1172,7 +1172,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrWhenSamplerCacheFlushSentT
EXPECT_EQ(samplerCacheNotFlushedSize, samplerCacheFlushBeforeSize);
NEO::WorkaroundTable *waTable = &pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable;
waTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
waTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
samplerCacheFlushBeforeSize = commandStreamReceiver.getRequiredCmdStreamSize(flags, *pDevice);

View File

@@ -493,7 +493,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverFlushTaskXeHPAndLaterTests, wh
commandStreamReceiver.setSamplerCacheFlushRequired(CommandStreamReceiver::SamplerCacheFlushState::samplerCacheFlushNotRequired);
configureCSRtoNonDirtyState<FamilyType>(true);
commandStreamReceiver.taskLevel = taskLevel;
waTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
waTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
flushTask(commandStreamReceiver);
EXPECT_EQ(commandStreamReceiver.commandStream.getUsed(), 0u);
@@ -513,7 +513,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverFlushTaskXeHPAndLaterTests, wh
commandStreamReceiver.taskLevel = taskLevel;
NEO::WorkaroundTable *waTable = &pDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable;
waTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = false;
waTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = false;
flushTask(commandStreamReceiver);

View File

@@ -32,7 +32,7 @@ using CommandStreamSimulatedTests = HwHelperTest;
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndAllocationWithStorageInfoNonZeroWhenMemoryBankIsQueriedThenBankForAllocationDeviceIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -51,7 +51,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndAllocationWithStorageIn
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndNonLocalMemoryAllocationWithStorageInfoNonZeroWhenMemoryBankIsQueriedThenMainBankIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
@@ -67,7 +67,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndNonLocalMemoryAllocatio
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndAllocationWithStorageInfoZeroWhenMemoryBankIsQueriedThenBankForCsrIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -86,7 +86,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndAllocationWithStorageIn
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndNonLocalMemoryAllocationWithStorageInfoNonZeroWhenMemoryBanksBitfieldIsQueriedThenBanksBitfieldForSystemMemoryIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -105,7 +105,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndNonLocalMemoryAllocatio
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryNoncloneableAllocationWithManyBanksWhenMemoryBanksBitfieldIsQueriedThenSingleMemoryBankIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -129,7 +129,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryNoncloneableAllocationWith
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryCloneableAllocationWithManyBanksWhenMemoryBanksBitfieldIsQueriedThenAllMemoryBanksAreReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -153,7 +153,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryCloneableAllocationWithMan
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryNoncloneableAllocationWithManyBanksWhenMemoryBanksBitfieldIsQueriedOnSpecialCsrThenAllMemoryBanksAreReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -178,7 +178,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryNoncloneableAllocationWith
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndAllocationWithStorageInfoZeroWhenMemoryBanksBitfieldIsQueriedThenBanksBitfieldForCsrDeviceIndexIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -200,7 +200,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryAndAllocationWithStorageIn
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryWhenSimulatedCsrGetAddressSpaceIsCalledWithDifferentHintsThenCorrectSpaceIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -228,7 +228,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryWhenSimulatedCsrGetAddress
HWTEST_F(CommandStreamSimulatedTests, givenLocalMemoryDisabledWhenSimulatedCsrGetAddressSpaceIsCalledWithDifferentHintsThenCorrectSpaceIsReturned) {
ExecutionEnvironment executionEnvironment;
hardwareInfo.featureTable.ftrLocalMemory = false;
hardwareInfo.featureTable.flags.ftrLocalMemory = false;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);
executionEnvironment.initializeMemoryManager();
@@ -252,7 +252,7 @@ HWTEST_F(CommandStreamSimulatedTests, givenAUBDumpForceAllToLocalMemoryWhenSimul
DebugManagerStateRestore debugRestorer;
DebugManager.flags.AUBDumpForceAllToLocalMemory.set(true);
hardwareInfo.featureTable.ftrLocalMemory = false;
hardwareInfo.featureTable.flags.ftrLocalMemory = false;
ExecutionEnvironment executionEnvironment;
executionEnvironment.prepareRootDeviceEnvironments(1);
executionEnvironment.rootDeviceEnvironments[0]->setHwInfo(&hardwareInfo);

View File

@@ -91,7 +91,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterTbxCommandStreamReceiverTests, givenLoc
setUpImpl<FamilyType>();
DebugManagerStateRestore debugRestorer;
DebugManager.flags.EnableLocalMemory.set(1);
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo));
auto tbxCsr = std::make_unique<MockTbxCommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
@@ -106,7 +106,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterTbxCommandStreamReceiverTests, givenLoc
setUpImpl<FamilyType>();
DebugManagerStateRestore debugRestorer;
DebugManager.flags.EnableLocalMemory.set(1);
hardwareInfo.featureTable.ftrLocalMemory = true;
hardwareInfo.featureTable.flags.ftrLocalMemory = true;
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo));
auto tbxCsr = std::make_unique<MockTbxCommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());