mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add struct argument for input/output in StateBaseAddressHelper
This refactor makes future interface changes easier Related-To: NEO-5019 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
9b1afe4067
commit
ceb9d81f87
@ -462,8 +462,26 @@ HWTEST2_F(StateBaseAddressXeHPAndLaterTests, givenMemoryCompressionEnabledWhenAp
|
||||
|
||||
for (auto memoryCompressionState : {MemoryCompressionState::NotApplicable, MemoryCompressionState::Disabled, MemoryCompressionState::Enabled}) {
|
||||
auto sbaCmd = FamilyType::cmdInitStateBaseAddress;
|
||||
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(&sbaCmd, &indirectHeap, true, 0,
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), false, memoryCompressionState, true, false, 1u);
|
||||
StateBaseAddressHelperArgs<FamilyType> args = {
|
||||
0, // generalStateBase
|
||||
0, // indirectObjectHeapBaseAddress
|
||||
0, // instructionHeapBaseAddress
|
||||
0, // globalHeapsBaseAddress
|
||||
&sbaCmd, // stateBaseAddressCmd
|
||||
nullptr, // dsh
|
||||
nullptr, // ioh
|
||||
&indirectHeap, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
0, // statelessMocsIndex
|
||||
memoryCompressionState, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
true, // setGeneralStateBaseAddress
|
||||
false, // useGlobalHeapsBaseAddress
|
||||
false, // isMultiOsContextCapable
|
||||
false, // useGlobalAtomics
|
||||
false // areMultipleSubDevicesInContext
|
||||
};
|
||||
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(args, true);
|
||||
if (memoryCompressionState == MemoryCompressionState::Enabled) {
|
||||
EXPECT_EQ(FamilyType::STATE_BASE_ADDRESS::ENABLE_MEMORY_COMPRESSION_FOR_ALL_STATELESS_ACCESSES_ENABLED, sbaCmd.getEnableMemoryCompressionForAllStatelessAccesses());
|
||||
} else {
|
||||
@ -482,9 +500,26 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, StateBaseAddressXeHPAndLaterTests, givenNonZeroInte
|
||||
IndirectHeap indirectHeap(allocation, 1);
|
||||
auto sbaCmd = FamilyType::cmdInitStateBaseAddress;
|
||||
uint64_t ihba = 0x80010000ull;
|
||||
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(&sbaCmd, &indirectHeap, false, ihba,
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), false,
|
||||
MemoryCompressionState::NotApplicable, true, false, 1u);
|
||||
StateBaseAddressHelperArgs<FamilyType> args = {
|
||||
0, // generalStateBase
|
||||
ihba, // indirectObjectHeapBaseAddress
|
||||
0, // instructionHeapBaseAddress
|
||||
0, // globalHeapsBaseAddress
|
||||
&sbaCmd, // stateBaseAddressCmd
|
||||
nullptr, // dsh
|
||||
nullptr, // ioh
|
||||
&indirectHeap, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
false, // setGeneralStateBaseAddress
|
||||
false, // useGlobalHeapsBaseAddress
|
||||
false, // isMultiOsContextCapable
|
||||
false, // useGlobalAtomics
|
||||
false // areMultipleSubDevicesInContext
|
||||
};
|
||||
StateBaseAddressHelper<FamilyType>::appendStateBaseAddressParameters(args, true);
|
||||
EXPECT_EQ(0ull, sbaCmd.getGeneralStateBaseAddress());
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
Reference in New Issue
Block a user