Skip to content

Commit 76d905b

Browse files
Pass LogicalStateHelper to SBA helper
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
1 parent de1c0b9 commit 76d905b

11 files changed

+37
-18
lines changed

level_zero/core/source/cmdqueue/cmdqueue_hw_base.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool
6868
false,
6969
NEO::MemoryCompressionState::NotApplicable,
7070
false,
71-
1u);
71+
1u,
72+
nullptr);
7273
*sbaCmdBuf = sbaCmd;
7374
csr->setGSBAStateDirty(false);
7475

level_zero/core/source/cmdqueue/cmdqueue_xe_hp_core_and_later.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool
5151
multiOsContextCapable,
5252
NEO::MemoryCompressionState::NotApplicable,
5353
false,
54-
1u);
54+
1u,
55+
nullptr);
5556
*sbaCmdBuf = sbaCmd;
5657

5758
auto &hwInfoConfig = *NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily);

opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenCsrWhenGen
12291229
false,
12301230
MemoryCompressionState::NotApplicable,
12311231
false,
1232-
1u);
1232+
1u,
1233+
nullptr);
12331234

12341235
EXPECT_NE(generalStateBaseAddress, sbaCmd.getGeneralStateBaseAddress());
12351236
EXPECT_EQ(gmmHelper->decanonize(generalStateBaseAddress), sbaCmd.getGeneralStateBaseAddress());
@@ -1255,7 +1256,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenNonZeroGeneralStateBaseAddres
12551256
false,
12561257
MemoryCompressionState::NotApplicable,
12571258
false,
1258-
1u);
1259+
1u,
1260+
nullptr);
12591261

12601262
EXPECT_EQ(0ull, sbaCmd.getGeneralStateBaseAddress());
12611263
EXPECT_EQ(0u, sbaCmd.getGeneralStateBufferSize());
@@ -1283,7 +1285,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenNonZeroInternalHeapBaseAddres
12831285
false,
12841286
MemoryCompressionState::NotApplicable,
12851287
false,
1286-
1u);
1288+
1u,
1289+
nullptr);
12871290

12881291
EXPECT_FALSE(sbaCmd.getInstructionBaseAddressModifyEnable());
12891292
EXPECT_EQ(0ull, sbaCmd.getInstructionBaseAddress());
@@ -1316,7 +1319,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverFlushTaskTests, givenSbaProgram
13161319
false,
13171320
MemoryCompressionState::NotApplicable,
13181321
false,
1319-
1u);
1322+
1u,
1323+
nullptr);
13201324

13211325
EXPECT_FALSE(sbaCmd.getDynamicStateBaseAddressModifyEnable());
13221326
EXPECT_FALSE(sbaCmd.getDynamicStateBufferSizeModifyEnable());

opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_tests_xehp_and_later.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverFlushTaskXeHPAndLaterTests, gi
341341
false,
342342
MemoryCompressionState::NotApplicable,
343343
false,
344-
1u);
344+
1u,
345+
nullptr);
345346

346347
EXPECT_FALSE(sbaCmd.getDynamicStateBaseAddressModifyEnable());
347348
EXPECT_FALSE(sbaCmd.getDynamicStateBufferSizeModifyEnable());

shared/source/command_container/command_encoder_bdw_and_later.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ void EncodeStateBaseAddress<Family>::encode(CommandContainer &container, STATE_B
384384
false,
385385
MemoryCompressionState::NotApplicable,
386386
useGlobalAtomics,
387-
1u);
387+
1u,
388+
nullptr);
388389

389390
auto pCmd = reinterpret_cast<STATE_BASE_ADDRESS *>(container.getCommandStream()->getSpace(sizeof(STATE_BASE_ADDRESS)));
390391
*pCmd = sbaCmd;

shared/source/command_container/command_encoder_xehp_and_later.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,8 @@ void EncodeStateBaseAddress<Family>::encode(CommandContainer &container, STATE_B
490490
multiOsContextCapable,
491491
MemoryCompressionState::NotApplicable,
492492
useGlobalAtomics,
493-
1u);
493+
1u,
494+
nullptr);
494495

495496
auto pCmd = reinterpret_cast<STATE_BASE_ADDRESS *>(container.getCommandStream()->getSpace(sizeof(STATE_BASE_ADDRESS)));
496497
*pCmd = sbaCmd;

shared/source/command_stream/command_stream_receiver_hw_base.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
421421
isMultiOsContextCapable(),
422422
memoryCompressionState,
423423
dispatchFlags.useGlobalAtomics,
424-
dispatchFlags.areMultipleSubDevicesInContext);
424+
dispatchFlags.areMultipleSubDevicesInContext,
425+
logicalStateHelper.get());
425426

426427
if (pCmd) {
427428
*pCmd = cmd;

shared/source/gen8/state_base_address_gen8.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ void StateBaseAddressHelper<BDWFamily>::programStateBaseAddress(
2929
bool isMultiOsContextCapable,
3030
MemoryCompressionState memoryCompressionState,
3131
bool useGlobalAtomics,
32-
bool areMultipleSubDevicesInContext) {
32+
bool areMultipleSubDevicesInContext,
33+
LogicalStateHelper *logicalStateHelper) {
3334

3435
*stateBaseAddress = BDWFamily::cmdInitStateBaseAddress;
3536

shared/source/helpers/state_base_address.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ enum class MemoryCompressionState;
1515
class GmmHelper;
1616
class IndirectHeap;
1717
class LinearStream;
18+
class LogicalStateHelper;
1819
struct DispatchFlags;
1920
struct HardwareInfo;
2021

@@ -41,7 +42,8 @@ struct StateBaseAddressHelper {
4142
bool isMultiOsContextCapable,
4243
MemoryCompressionState memoryCompressionState,
4344
bool useGlobalAtomics,
44-
bool areMultipleSubDevicesInContext);
45+
bool areMultipleSubDevicesInContext,
46+
LogicalStateHelper *logicalStateHelper);
4547

4648
static void appendIohParameters(STATE_BASE_ADDRESS *stateBaseAddress, const IndirectHeap *ioh, bool useGlobalHeapsBaseAddress, uint64_t indirectObjectHeapBaseAddress);
4749

shared/source/helpers/state_base_address_base.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ void StateBaseAddressHelper<GfxFamily>::programStateBaseAddress(
3535
bool isMultiOsContextCapable,
3636
MemoryCompressionState memoryCompressionState,
3737
bool useGlobalAtomics,
38-
bool areMultipleSubDevicesInContext) {
38+
bool areMultipleSubDevicesInContext,
39+
LogicalStateHelper *logicalStateHelper) {
3940

4041
*stateBaseAddress = GfxFamily::cmdInitStateBaseAddress;
4142
bool overrideBindlessSurfaceStateBase = true;

shared/test/common/helpers/state_base_address_tests.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ HWTEST2_F(SBATest, WhenProgramStateBaseAddressParametersIsCalledThenSBACmdHasBin
6868
true,
6969
MemoryCompressionState::NotApplicable,
7070
false,
71-
1u);
71+
1u,
72+
nullptr);
7273

7374
EXPECT_EQ(ssh.getMaxAvailableSpace() / 64 - 1, cmd->getBindlessSurfaceStateSize());
7475
EXPECT_EQ(ssh.getHeapGpuBase(), cmd->getBindlessSurfaceStateBaseAddress());
@@ -105,7 +106,8 @@ HWTEST2_F(SbaForBindlessTests, givenGlobalBindlessBaseAddressWhenProgramStateBas
105106
true,
106107
MemoryCompressionState::NotApplicable,
107108
false,
108-
1u);
109+
1u,
110+
nullptr);
109111
EXPECT_TRUE(cmd->getBindlessSurfaceStateBaseAddressModifyEnable());
110112
EXPECT_EQ(cmd->getBindlessSurfaceStateBaseAddress(), globalBindlessHeapsBaseAddress);
111113

@@ -144,7 +146,8 @@ HWTEST2_F(SbaForBindlessTests, givenGlobalBindlessBaseAddressWhenPassingIndirect
144146
true,
145147
MemoryCompressionState::NotApplicable,
146148
false,
147-
1u);
149+
1u,
150+
nullptr);
148151

149152
EXPECT_EQ(cmd->getIndirectObjectBaseAddress(), indirectObjectBaseAddress);
150153
}
@@ -202,7 +205,8 @@ HWTEST2_F(SBATest, givenGlobalBindlessBaseAddressWhenSshIsPassedThenBindlessSurf
202205
true,
203206
MemoryCompressionState::NotApplicable,
204207
false,
205-
1u);
208+
1u,
209+
nullptr);
206210
EXPECT_EQ(cmd->getBindlessSurfaceStateBaseAddress(), globalBindlessHeapsBaseAddress);
207211
}
208212
HWTEST2_F(SBATest, givenSurfaceStateHeapWhenNotUsingGlobalHeapBaseThenBindlessSurfaceBaseIsSshBase, IsAtLeastSkl) {
@@ -233,7 +237,8 @@ HWTEST2_F(SBATest, givenSurfaceStateHeapWhenNotUsingGlobalHeapBaseThenBindlessSu
233237
true,
234238
MemoryCompressionState::NotApplicable,
235239
false,
236-
1u);
240+
1u,
241+
nullptr);
237242
EXPECT_EQ(ssh.getHeapGpuBase(), cmd->getBindlessSurfaceStateBaseAddress());
238243
}
239244

0 commit comments

Comments
 (0)