Altered unit tests to suit new MiFlushDwWA() workaround.

Related-To: NEO-4426
Change-Id: Ib13719a711adda6fb3da3c2893898f0f31418508
This commit is contained in:
Sebastian Luzynski
2020-03-12 10:49:20 +01:00
committed by sys_ocldev
parent c1aabdf51c
commit 6eae7fc3c7
8 changed files with 85 additions and 17 deletions

View File

@@ -8,6 +8,7 @@
#include "shared/source/command_container/command_encoder.h"
#include "opencl/test/unit_test/fixtures/device_fixture.h"
#include "opencl/test/unit_test/helpers/unit_test_helper.h"
#include "test.h"
using namespace NEO;
@@ -37,7 +38,19 @@ HWTEST_F(CommandEncoderTests, givenImmDataWriteWhenProgrammingMiFlushDwThenSetAl
EncodeMiFlushDW<FamilyType>::programMiFlushDw(linearStream, gpuAddress, immData);
auto miFlushDwCmd = reinterpret_cast<MI_FLUSH_DW *>(buffer);
EXPECT_EQ(sizeof(MI_FLUSH_DW), linearStream.getUsed());
unsigned int sizeMultiplier = 1;
if (UnitTestHelper<FamilyType>::additionalMiFlushDwRequired) {
sizeMultiplier = 2;
uint64_t gpuAddress = 0x0;
uint64_t immData = 0;
EXPECT_EQ(MI_FLUSH_DW::POST_SYNC_OPERATION_NO_WRITE, miFlushDwCmd->getPostSyncOperation());
EXPECT_EQ(gpuAddress, miFlushDwCmd->getDestinationAddress());
EXPECT_EQ(immData, miFlushDwCmd->getImmediateData());
miFlushDwCmd++;
}
EXPECT_EQ(sizeMultiplier * sizeof(MI_FLUSH_DW), linearStream.getUsed());
EXPECT_EQ(MI_FLUSH_DW::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA_QWORD, miFlushDwCmd->getPostSyncOperation());
EXPECT_EQ(gpuAddress, miFlushDwCmd->getDestinationAddress());
EXPECT_EQ(immData, miFlushDwCmd->getImmediateData());