mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
programStateBaseAddress: improve code reuse
Another step towards cleaner callers of StateBaseAddressHelper<>::programStateBaseAddress. Export programming state base address into a separate function to improve code reuse and reduce copy-pasted fragments, which make code modifications or maintenance more and more difficult over time. Use specialization for gen-specific variations. Related-To: NEO-6774 Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b24ff7ffbc
commit
56cb1f757b
@@ -226,6 +226,7 @@ HWTEST2_F(XeHpAndLaterSbaTest, givenMemoryCompressionEnabledWhenAppendingSbaThen
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
memoryCompressionState, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -260,6 +261,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpAndLaterSbaTest, givenNonZeroInternalHeapBaseAd
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
|
||||
@@ -29,6 +29,7 @@ BDWTEST_F(SbaTest, givenUsedBindlessBuffersWhenAppendStateBaseAddressParametersI
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
nullptr, // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -65,6 +66,7 @@ BDWTEST_F(SbaTest,
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
nullptr, // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
|
||||
@@ -34,6 +34,7 @@ HWTEST2_F(SbaTest, WhenAppendStateBaseAddressParametersIsCalledThenSBACmdHasBind
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
nullptr, // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -77,6 +78,7 @@ HWTEST2_F(SbaTest, WhenProgramStateBaseAddressParametersIsCalledThenSBACmdHasBin
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -120,6 +122,7 @@ HWTEST2_F(SbaTest,
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -163,6 +166,7 @@ HWTEST2_F(SbaForBindlessTests, givenGlobalBindlessBaseAddressWhenProgramStateBas
|
||||
nullptr, // ioh
|
||||
nullptr, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -219,6 +223,7 @@ HWTEST2_F(SbaForBindlessTests,
|
||||
nullptr, // ioh
|
||||
nullptr, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -276,6 +281,7 @@ HWTEST2_F(SbaForBindlessTests, givenGlobalBindlessBaseAddressWhenPassingIndirect
|
||||
nullptr, // ioh
|
||||
nullptr, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -314,6 +320,7 @@ HWTEST2_F(SbaTest, givenSbaWhenOverrideBindlessSurfaceBaseIsFalseThenBindlessSur
|
||||
nullptr, // ioh
|
||||
nullptr, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -354,6 +361,7 @@ HWTEST2_F(SbaTest, givenGlobalBindlessBaseAddressWhenSshIsPassedThenBindlessSurf
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -393,6 +401,7 @@ HWTEST2_F(SbaTest, givenSurfaceStateHeapWhenNotUsingGlobalHeapBaseThenBindlessSu
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -427,6 +436,7 @@ HWTEST2_F(SbaTest, givenStateBaseAddressAndDebugFlagSetWhenAppendExtraCacheSetti
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -466,6 +476,7 @@ HWTEST2_F(SbaTest, givenStateBaseAddressAndDebugFlagSetWhenAppendExtraCacheSetti
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -545,6 +556,7 @@ HWTEST2_F(SbaTest, givenDebugFlagSetWhenAppendingSbaThenProgramCorrectL1CachePol
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -626,6 +638,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, SbaTest, whenGeneralStateBaseAddressIsProgrammedThen
|
||||
&ioh, // ioh
|
||||
&ssh, // ssh
|
||||
gmmHelper, // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
true, // setInstructionStateBaseAddress
|
||||
@@ -658,6 +671,7 @@ HWTEST_F(SbaTest, givenNonZeroGeneralStateBaseAddressWhenProgrammingIsDisabledTh
|
||||
&ioh, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
true, // setInstructionStateBaseAddress
|
||||
@@ -692,6 +706,7 @@ HWTEST_F(SbaTest, givenNonZeroInternalHeapBaseAddressWhenProgrammingIsDisabledTh
|
||||
&ioh, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -732,6 +747,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, SbaTest, givenSbaProgrammingWhenHeapsAreNotProvidedT
|
||||
nullptr, // ioh
|
||||
nullptr, // ssh
|
||||
gmmHelper, // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
true, // setInstructionStateBaseAddress
|
||||
@@ -792,6 +808,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, SbaTest,
|
||||
nullptr, // ioh
|
||||
nullptr, // ssh
|
||||
gmmHelper, // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
true, // setInstructionStateBaseAddress
|
||||
|
||||
@@ -622,6 +622,7 @@ XE_HPC_CORETEST_F(XeHpcSbaTest, givenSpecificProductFamilyWhenAppendingSbaThenPr
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -652,6 +653,7 @@ XE_HPC_CORETEST_F(XeHpcSbaTest, givenL1CachingOverrideWhenStateBaseAddressIsProg
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
|
||||
@@ -66,6 +66,7 @@ DG2TEST_F(Dg2SbaTest, givenSpecificProductFamilyWhenAppendingSbaThenProgramCorre
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -100,6 +101,7 @@ DG2TEST_F(Dg2SbaTest, givenL1CachingOverrideWhenStateBaseAddressIsProgrammedThen
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
|
||||
@@ -110,6 +110,7 @@ XE_HPG_CORETEST_F(XeHpgSbaTest, givenSpecificProductFamilyWhenAppendingSbaThenPr
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
@@ -140,6 +141,7 @@ XE_HPG_CORETEST_F(XeHpgSbaTest, givenL1CachingOverrideWhenStateBaseAddressIsProg
|
||||
nullptr, // ioh
|
||||
&ssh, // ssh
|
||||
pDevice->getRootDeviceEnvironment().getGmmHelper(), // gmmHelper
|
||||
nullptr, // hwInfo
|
||||
0, // statelessMocsIndex
|
||||
MemoryCompressionState::NotApplicable, // memoryCompressionState
|
||||
false, // setInstructionStateBaseAddress
|
||||
|
||||
Reference in New Issue
Block a user