mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 21:42:53 +08:00
Remove GMock: GMockProgram, MockDispatchKernelEncoder, GMockSourceLevelDebugger
New name for mock class: GMockProgram -> MockProgramAppendKernelDebugOptions Also GMockSourceLevelDebugger class body has been merged with MockSourceLevelDebugger. Related-To: NEO-4914 Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b24930a2f9
commit
76565529f6
@@ -227,7 +227,8 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
uint32_t slmTotalSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(slmTotalSize));
|
||||
|
||||
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
|
||||
|
||||
cmdContainer->setDirtyStateForAllHeaps(false);
|
||||
bool requiresUncachedMocs = false;
|
||||
@@ -284,7 +285,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeGraterThan
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
uint32_t slmTotalSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(slmTotalSize));
|
||||
|
||||
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -306,7 +308,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeEqualZeroW
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
uint32_t slmTotalSize = 0;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(slmTotalSize));
|
||||
|
||||
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -341,8 +344,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenOneBindingTableEntryWh
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.bindingTable.numEntries = numBindingTable;
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.bindingTable.tableOffset = 0U;
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -373,8 +376,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhen
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.bindingTable.numEntries = numBindingTable;
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.bindingTable.tableOffset = 0U;
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -405,7 +408,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenDispa
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.tableOffset = 0U;
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.borderColor = 0U;
|
||||
const uint8_t *dshData = reinterpret_cast<uint8_t *>(&samplerState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getDynamicStateHeapData()).WillRepeatedly(::testing::Return(dshData));
|
||||
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(dshData);
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -442,7 +445,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersZeroWhenDisp
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.tableOffset = 0U;
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.borderColor = 0U;
|
||||
const uint8_t *dshData = reinterpret_cast<uint8_t *>(&samplerState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getDynamicStateHeapData()).WillRepeatedly(::testing::Return(dshData));
|
||||
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(dshData);
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -495,8 +498,8 @@ HWTEST_F(CommandEncodeStatesTest, givenIndarectOffsetsSizeWhenDispatchingKernelT
|
||||
uint32_t offsets[] = {0x10, 0x20, 0x30};
|
||||
uint32_t lws[] = {1, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
dispatchInterface->getGroupSizeResult = lws;
|
||||
|
||||
EXPECT_CALL(*dispatchInterface.get(), getGroupSize()).WillRepeatedly(::testing::Return(lws));
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.dispatchTraits.globalWorkSize[0] = offsets[0];
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.dispatchTraits.globalWorkSize[1] = offsets[1];
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.dispatchTraits.globalWorkSize[2] = offsets[2];
|
||||
@@ -535,9 +538,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.tableOffset = 0;
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.borderColor = 0;
|
||||
unsigned char *samplerStateRaw = reinterpret_cast<unsigned char *>(&samplerState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getDynamicStateHeapData()).WillRepeatedly(::testing::Return(samplerStateRaw));
|
||||
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(samplerStateRaw);
|
||||
unsigned char *bindingTableRaw = reinterpret_cast<unsigned char *>(&bindingTable);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(bindingTableRaw));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(bindingTableRaw);
|
||||
|
||||
{
|
||||
DebugManager.flags.ForceBtpPrefetchMode.set(-1);
|
||||
@@ -636,8 +639,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
cmdContainer->slmSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(cmdContainer->slmSize));
|
||||
cmdContainer->setDirtyStateForAllHeaps(false);
|
||||
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -657,8 +660,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
cmdContainer->slmSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(cmdContainer->slmSize));
|
||||
cmdContainer->setDirtyStateForAllHeaps(false);
|
||||
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
|
||||
|
||||
bool requiresUncachedMocs = true;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -686,8 +689,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsAndSlmNotCha
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
cmdContainer->slmSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(cmdContainer->slmSize));
|
||||
cmdContainer->setDirtyStateForAllHeaps(true);
|
||||
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -711,8 +714,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsWhenDispatch
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
cmdContainer->slmSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(cmdContainer->slmSize));
|
||||
cmdContainer->setDirtyStateForAllHeaps(true);
|
||||
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -751,8 +754,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmChange
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(cmdContainer->slmSize + 1));
|
||||
cmdContainer->setDirtyStateForAllHeaps(false);
|
||||
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize + 1;
|
||||
|
||||
auto slmSizeBefore = cmdContainer->slmSize;
|
||||
|
||||
@@ -813,8 +816,8 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindfulKernelWhenDispatchingKernelThenS
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.bufferAddressingMode = KernelDescriptor::BindfulAndStateless;
|
||||
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
|
||||
bool requiresUncachedMocs = false;
|
||||
@@ -844,8 +847,8 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindlessKernelWhenDispatchingKernelThen
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.bufferAddressingMode = KernelDescriptor::BindlessAndStateless;
|
||||
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
|
||||
@@ -906,8 +909,8 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching
|
||||
arg.bindful = surfaceStateOffset;
|
||||
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -934,8 +937,8 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.bindingTable.tableOffset = 0U;
|
||||
|
||||
sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
ioh->replaceBuffer(ioh->getCpuBase(), ioh->getMaxAvailableSpace());
|
||||
memset(ioh->getCpuBase(), 0, ioh->getMaxAvailableSpace());
|
||||
@@ -1167,8 +1170,8 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindlessKernelAndBindlessModeEn
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.bufferAddressingMode = KernelDescriptor::BindlessAndStateless;
|
||||
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
|
||||
@@ -1205,8 +1208,8 @@ HWTEST2_F(BindlessCommandEncodeStatesTesttt, givenBindlessKernelAndBindlessModeE
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.bufferAddressingMode = KernelDescriptor::BindlessAndStateless;
|
||||
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
|
||||
@@ -1246,8 +1249,8 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindfulKernelWhenBindlessModeEn
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.bufferAddressingMode = KernelDescriptor::BindfulAndStateless;
|
||||
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
|
||||
@@ -1284,8 +1287,8 @@ HWTEST_F(BindlessCommandEncodeStatesTesttt, givenBindlessModeEnabledWhenDispatch
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.bufferAddressingMode = KernelDescriptor::BindfulAndStateless;
|
||||
|
||||
const uint8_t *sshData = reinterpret_cast<uint8_t *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(sshData));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = const_cast<uint8_t *>(sshData);
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
|
||||
@@ -1332,7 +1335,7 @@ HWTEST_F(BindlessCommandEncodeStatesTest, givenGlobalBindlessHeapsWhenDispatchin
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.tableOffset = 0U;
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.borderColor = 0U;
|
||||
const uint8_t *dshData = reinterpret_cast<uint8_t *>(&samplerState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getDynamicStateHeapData()).WillRepeatedly(::testing::Return(dshData));
|
||||
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(dshData);
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -1366,7 +1369,7 @@ HWTEST_F(BindlessCommandEncodeStatesTest, givenBindlessModeDisabledelWithSampler
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.tableOffset = 0U;
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.borderColor = 0U;
|
||||
const uint8_t *dshData = reinterpret_cast<uint8_t *>(&samplerState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getDynamicStateHeapData()).WillRepeatedly(::testing::Return(dshData));
|
||||
dispatchInterface->getDynamicStateHeapDataResult = const_cast<uint8_t *>(dshData);
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
|
||||
@@ -144,7 +144,8 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenOverridePreferredSlmAllocatio
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
uint32_t slmTotalSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(slmTotalSize));
|
||||
|
||||
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
|
||||
@@ -28,7 +28,8 @@ HWTEST2_F(CommandEncodeStatesTestPvcAndLater, givenOverrideSlmTotalSizeDebugVari
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
uint32_t slmTotalSize = 0;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(slmTotalSize));
|
||||
|
||||
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSlmTotalSizeGraterTha
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
uint32_t slmTotalSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(slmTotalSize));
|
||||
|
||||
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -89,7 +90,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSlmTotalSizeEqualZero
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
uint32_t slmTotalSize = 0;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(slmTotalSize));
|
||||
|
||||
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -118,7 +120,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenOverrideSlmTotalSizeD
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
uint32_t slmTotalSize = 0;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(slmTotalSize));
|
||||
|
||||
dispatchInterface->getSlmTotalSizeResult = slmTotalSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
int32_t maxValueToProgram = 0x8;
|
||||
@@ -161,8 +164,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givennumBindingTableOneWhe
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.bindingTable.tableOffset = 0;
|
||||
|
||||
unsigned char *bindingTableStateRaw = reinterpret_cast<unsigned char *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(bindingTableStateRaw));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = bindingTableStateRaw;
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -200,8 +203,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhe
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.bindingTable.tableOffset = 0;
|
||||
|
||||
unsigned char *bindingTableStateRaw = reinterpret_cast<unsigned char *>(&bindingTableState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(bindingTableStateRaw));
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapDataSize()).WillRepeatedly(::testing::Return(static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE))));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = bindingTableStateRaw;
|
||||
dispatchInterface->getSurfaceStateHeapDataSizeResult = static_cast<uint32_t>(sizeof(BINDING_TABLE_STATE));
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -240,7 +243,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenDisp
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.tableOffset = 0;
|
||||
|
||||
unsigned char *samplerStateRaw = reinterpret_cast<unsigned char *>(&samplerState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getDynamicStateHeapData()).WillRepeatedly(::testing::Return(samplerStateRaw));
|
||||
dispatchInterface->getDynamicStateHeapDataResult = samplerStateRaw;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -321,8 +324,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenCleanHeapsWhenDispatc
|
||||
uint32_t dims[] = {2, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
cmdContainer->slmSize = 1;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSlmTotalSize()).WillRepeatedly(::testing::Return(cmdContainer->slmSize));
|
||||
cmdContainer->setDirtyStateForAllHeaps(false);
|
||||
dispatchInterface->getSlmTotalSizeResult = cmdContainer->slmSize;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -357,9 +360,9 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.tableOffset = 0;
|
||||
dispatchInterface->kernelDescriptor.payloadMappings.samplerTable.borderColor = 0;
|
||||
unsigned char *samplerStateRaw = reinterpret_cast<unsigned char *>(&samplerState);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getDynamicStateHeapData()).WillRepeatedly(::testing::Return(samplerStateRaw));
|
||||
dispatchInterface->getDynamicStateHeapDataResult = samplerStateRaw;
|
||||
unsigned char *bindingTableRaw = reinterpret_cast<unsigned char *>(&bindingTable);
|
||||
EXPECT_CALL(*dispatchInterface.get(), getSurfaceStateHeapData()).WillRepeatedly(::testing::Return(bindingTableRaw));
|
||||
dispatchInterface->getSurfaceStateHeapDataResult = bindingTableRaw;
|
||||
|
||||
{
|
||||
DebugManager.flags.ForceBtpPrefetchMode.set(-1);
|
||||
@@ -507,7 +510,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredAnd
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.flags.passInlineData = true;
|
||||
EXPECT_CALL(*dispatchInterface.get(), getCrossThreadDataSize()).WillRepeatedly(::testing::Return(0));
|
||||
dispatchInterface->getCrossThreadDataSizeResult = 0u;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
@@ -532,14 +535,13 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredAnd
|
||||
using WALKER_TYPE = typename FamilyType::WALKER_TYPE;
|
||||
uint32_t dims[] = {1, 1, 1};
|
||||
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
|
||||
dispatchInterface->localIdGenerationByRuntime = false;
|
||||
dispatchInterface->requiredWalkGroupOrder = 2u;
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.flags.passInlineData = true;
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.numLocalIdChannels = 3u;
|
||||
dispatchInterface->kernelDescriptor.kernelAttributes.simdSize = 32u;
|
||||
dispatchInterface->getCrossThreadDataSizeResult = 32u;
|
||||
|
||||
EXPECT_CALL(*dispatchInterface.get(), getCrossThreadDataSize()).WillRepeatedly(::testing::Return(32u));
|
||||
EXPECT_CALL(*dispatchInterface.get(), requiresGenerationOfLocalIdsByRuntime()).WillRepeatedly(::testing::Return(false));
|
||||
dispatchInterface->requiresGenerationOfLocalIdsByRuntimeResult = false;
|
||||
|
||||
bool requiresUncachedMocs = false;
|
||||
uint32_t partitionCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user