Remove constant cache invalidation from Gen12LP

Change-Id: Ia63bd0296689c3f059f1debfdffdbca3e041e3c3
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz 2020-03-19 15:08:02 +01:00 committed by sys_ocldev
parent 80b7e1ef46
commit 052271c458
7 changed files with 33 additions and 3 deletions

View File

@ -138,6 +138,7 @@ std::string HwHelperHw<Family>::getExtensions() const {
template <>
void MemorySynchronizationCommands<Family>::setExtraCacheFlushFields(Family::PIPE_CONTROL *pipeControl) {
pipeControl->setHdcPipelineFlush(true);
pipeControl->setConstantCacheInvalidationEnable(false);
}
template class AubHelperHw<Family>;

View File

@ -46,3 +46,13 @@ GEN11TEST_F(HwHelperTestGen11, whenGetGpgpuEnginesThenReturnThreeRcsEngines) {
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
EXPECT_EQ(3u, pDevice->engines.size());
}
using MemorySynchronizatiopCommandsTestsGen11 = ::testing::Test;
GEN11TEST_F(MemorySynchronizatiopCommandsTestsGen11, WhenProgrammingCacheFlushThenExpectConstantCacheFieldSet) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
std::unique_ptr<uint8_t> buffer(new uint8_t[128]);
LinearStream stream(buffer.get(), 128);
PIPE_CONTROL *pipeControl = MemorySynchronizationCommands<FamilyType>::addFullCacheFlush(stream);
EXPECT_TRUE(pipeControl->getConstantCacheInvalidationEnable());
}

View File

@ -232,7 +232,8 @@ using MemorySynchronizatiopCommandsTests = ::testing::Test;
GEN12LPTEST_F(MemorySynchronizatiopCommandsTests, whenSettingCacheFlushExtraFieldsThenExpectHdcFlushSet) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
PIPE_CONTROL pipeControl = FamilyType::cmdInitPipeControl;
pipeControl.setConstantCacheInvalidationEnable(true);
MemorySynchronizationCommands<FamilyType>::setExtraCacheFlushFields(&pipeControl);
EXPECT_TRUE(pipeControl.getHdcPipelineFlush());
EXPECT_FALSE(pipeControl.getConstantCacheInvalidationEnable());
}

View File

@ -53,3 +53,13 @@ GEN8TEST_F(HwHelperTestGen8, whenGetGpgpuEnginesThenReturnTwoThreeEngines) {
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
EXPECT_EQ(3u, pDevice->engines.size());
}
using MemorySynchronizatiopCommandsTestsGen8 = ::testing::Test;
GEN8TEST_F(MemorySynchronizatiopCommandsTestsGen8, WhenProgrammingCacheFlushThenExpectConstantCacheFieldSet) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
std::unique_ptr<uint8_t> buffer(new uint8_t[128]);
LinearStream stream(buffer.get(), 128);
PIPE_CONTROL *pipeControl = MemorySynchronizationCommands<FamilyType>::addFullCacheFlush(stream);
EXPECT_TRUE(pipeControl->getConstantCacheInvalidationEnable());
}

View File

@ -53,3 +53,13 @@ GEN9TEST_F(HwHelperTestGen9, whenGetGpgpuEnginesThenReturnThreeRcsEngines) {
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
EXPECT_EQ(3u, pDevice->engines.size());
}
using MemorySynchronizatiopCommandsTestsGen9 = ::testing::Test;
GEN9TEST_F(MemorySynchronizatiopCommandsTestsGen9, WhenProgrammingCacheFlushThenExpectConstantCacheFieldSet) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
std::unique_ptr<uint8_t> buffer(new uint8_t[128]);
LinearStream stream(buffer.get(), 128);
PIPE_CONTROL *pipeControl = MemorySynchronizationCommands<FamilyType>::addFullCacheFlush(stream);
EXPECT_TRUE(pipeControl->getConstantCacheInvalidationEnable());
}

View File

@ -844,6 +844,5 @@ HWTEST_F(PipeControlHelperTests, WhenProgrammingCacheFlushThenExpectBasicFieldsS
EXPECT_TRUE(pipeControl->getInstructionCacheInvalidateEnable());
EXPECT_TRUE(pipeControl->getTextureCacheInvalidationEnable());
EXPECT_TRUE(pipeControl->getPipeControlFlushEnable());
EXPECT_TRUE(pipeControl->getConstantCacheInvalidationEnable());
EXPECT_TRUE(pipeControl->getStateCacheInvalidationEnable());
}

View File

@ -116,7 +116,6 @@ HWTEST_F(RenderDispatcheTest, givenRenderWhenAddingCacheFlushCmdThenExpectPipeCo
pipeControl->getInstructionCacheInvalidateEnable() &&
pipeControl->getTextureCacheInvalidationEnable() &&
pipeControl->getPipeControlFlushEnable() &&
pipeControl->getConstantCacheInvalidationEnable() &&
pipeControl->getStateCacheInvalidationEnable();
if (foundCacheFlush) {
break;