Use LogicalStateHelper for SIP programming

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski 2022-06-21 10:28:33 +00:00 committed by Compute-Runtime-Automation
parent e0c87435e1
commit f4485ec541
31 changed files with 87 additions and 42 deletions

View File

@ -21,6 +21,7 @@
#include "shared/source/device/device.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/pipe_control_args.h"
#include "shared/source/helpers/preamble.h"
#include "shared/source/memory_manager/graphics_allocation.h"
@ -44,7 +45,6 @@
#include <thread>
namespace L0 {
template <GFXCORE_FAMILY gfxCoreFamily>
ze_result_t CommandQueueHw<gfxCoreFamily>::createFence(const ze_fence_desc_t *desc,
ze_fence_handle_t *phFence) {
@ -333,7 +333,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
}
if (stateSipRequired) {
NEO::PreemptionHelper::programStateSip<GfxFamily>(child, *neoDevice);
NEO::PreemptionHelper::programStateSip<GfxFamily>(child, *neoDevice, csr->getLogicalStateHelper());
}
if (cmdQueuePreemption != commandQueuePreemptionMode) {
@ -367,6 +367,10 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
csrHw->programActivePartitionConfig(child);
}
if (csr->getLogicalStateHelper()) {
csr->getLogicalStateHelper()->writeStreamInline(child);
}
for (auto i = 0u; i < numCommandLists; ++i) {
auto commandList = CommandList::fromHandle(phCommandLists[i]);
auto &cmdBufferAllocations = commandList->commandContainer.getCmdBufferAllocations();

View File

@ -66,7 +66,7 @@ HWTEST_F(EnqueueHandlerTest, givenLogicalStateHelperWhenDispatchingCommandsThenA
using MI_NOOP = typename FamilyType::MI_NOOP;
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context, pClDevice, nullptr);
auto logicalStateHelper = new LogicalStateHelperMock<FamilyType>();
auto logicalStateHelper = new LogicalStateHelperMock<FamilyType>(false);
auto &ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> &>(mockCmdQ->getGpgpuCommandStreamReceiver());
ultCsr.logicalStateHelper.reset(logicalStateHelper);

View File

@ -22,6 +22,7 @@
#include "shared/source/helpers/cache_policy.h"
#include "shared/source/helpers/flush_stamp.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/pause_on_gpu_properties.h"
#include "shared/source/helpers/ray_tracing_helper.h"
#include "shared/source/helpers/string.h"
@ -893,4 +894,8 @@ void CommandStreamReceiver::printTagAddressContent(uint32_t taskCountToWait, int
PRINT_DEBUG_STRING(true, stdout, "%s", "\n");
}
LogicalStateHelper *CommandStreamReceiver::getLogicalStateHelper() const {
return logicalStateHelper.get();
}
} // namespace NEO

View File

@ -51,6 +51,7 @@ class ScratchSpaceController;
class HwPerfCounter;
class HwTimeStamps;
class TagAllocatorBase;
class LogicalStateHelper;
template <typename TSize>
class TimestampPackets;
@ -337,6 +338,8 @@ class CommandStreamReceiver {
return this->dispatchMode;
}
LogicalStateHelper *getLogicalStateHelper() const;
protected:
void cleanupResources();
void printDeviceIndex();
@ -357,6 +360,7 @@ class CommandStreamReceiver {
std::unique_ptr<TagAllocatorBase> perfCounterAllocator;
std::unique_ptr<TagAllocatorBase> timestampPacketAllocator;
std::unique_ptr<Thread> userPauseConfirmation;
std::unique_ptr<LogicalStateHelper> logicalStateHelper;
ResidencyContainer residencyAllocations;
ResidencyContainer evictionAllocations;

View File

@ -24,7 +24,6 @@ namespace NEO {
template <typename GfxFamily>
class DeviceCommandStreamReceiver;
struct PipeControlArgs;
class LogicalStateHelper;
template <typename GfxFamily>
class CommandStreamReceiverHw : public CommandStreamReceiver {
@ -190,7 +189,6 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
std::unique_ptr<DirectSubmissionHw<GfxFamily, RenderDispatcher<GfxFamily>>> directSubmission;
std::unique_ptr<DirectSubmissionHw<GfxFamily, BlitterDispatcher<GfxFamily>>> blitterDirectSubmission;
std::unique_ptr<LogicalStateHelper> logicalStateHelper;
size_t cmdStreamStart = 0;
};

View File

@ -917,7 +917,7 @@ template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::programStateSip(LinearStream &cmdStream, Device &device) {
bool debuggingEnabled = device.getDebugger() != nullptr;
if (!this->isStateSipSent || debuggingEnabled) {
PreemptionHelper::programStateSip<GfxFamily>(cmdStream, device);
PreemptionHelper::programStateSip<GfxFamily>(cmdStream, device, logicalStateHelper.get());
this->isStateSipSent = true;
}
}

View File

@ -18,6 +18,7 @@ namespace NEO {
class Device;
class GraphicsAllocation;
struct KernelDescriptor;
class LogicalStateHelper;
struct PreemptionFlags {
PreemptionFlags() {
@ -57,7 +58,7 @@ class PreemptionHelper {
static void programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template <typename GfxFamily>
static void programStateSip(LinearStream &preambleCmdStream, Device &device);
static void programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper);
template <typename GfxFamily>
static void programStateSipEndWa(LinearStream &cmdStream, Device &device);
@ -82,6 +83,10 @@ class PreemptionHelper {
template <typename GfxFamily>
static void programInterfaceDescriptorDataPreemption(INTERFACE_DESCRIPTOR_DATA<GfxFamily> *idd, PreemptionMode preemptionMode);
protected:
template <typename GfxFamily>
static void programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper);
};
template <typename GfxFamily>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -30,7 +30,7 @@ void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, De
}
template <typename GfxFamily>
void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device) {
void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper) {
using STATE_SIP = typename GfxFamily::STATE_SIP;
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread;
@ -38,13 +38,20 @@ void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &
if (isMidThreadPreemption || debuggingEnabled) {
auto sipAllocation = SipKernel::getSipKernel(device).getSipAllocation();
auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP)));
STATE_SIP cmd = GfxFamily::cmdInitStateSip;
cmd.setSystemInstructionPointer(sipAllocation->getGpuAddressToPatch());
*sip = cmd;
programStateSipCmd<GfxFamily>(preambleCmdStream, sipAllocation, logicalStateHelper);
}
}
template <typename GfxFamily>
void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper) {
using STATE_SIP = typename GfxFamily::STATE_SIP;
auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP)));
STATE_SIP cmd = GfxFamily::cmdInitStateSip;
cmd.setSystemInstructionPointer(sipAllocation->getGpuAddressToPatch());
*sip = cmd;
}
template <typename GfxFamily>
void PreemptionHelper::programStateSipEndWa(LinearStream &cmdStream, Device &device) {}

View File

@ -10,7 +10,7 @@ void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCm
}
template <>
void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device) {
void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper) {
using STATE_SIP = typename GfxFamily::STATE_SIP;
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;

View File

@ -15,8 +15,9 @@
#include <cstddef>
template <class T>
struct CmdParse;
namespace NEO {
namespace NEO {
class LogicalStateHelper;
struct GEN11 {
#include "shared/source/generated/gen11/hw_cmds_generated_gen11.inl"
@ -58,6 +59,7 @@ struct ICLFamily : public GEN11 {
using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const GPGPU_WALKER cmdInitGpgpuWalker;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad;

View File

@ -17,7 +17,8 @@ template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStr
PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr);
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper);
template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper);
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs);
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
template size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device);

View File

@ -17,8 +17,9 @@
template <class T>
struct CmdParse;
namespace NEO {
namespace NEO {
class LogicalStateHelper;
struct GEN12LP {
#include "shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl"
@ -61,6 +62,7 @@ struct TGLLPFamily : public GEN12LP {
using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const GPGPU_WALKER cmdInitGpgpuWalker;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad;

View File

@ -17,7 +17,8 @@ template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStr
PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr);
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper);
template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper);
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs);
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
template size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device);

View File

@ -17,8 +17,9 @@
//forward declaration for parsing logic
template <class T>
struct CmdParse;
namespace NEO {
namespace NEO {
class LogicalStateHelper;
struct GEN8 {
#include "shared/source/generated/gen8/hw_cmds_generated_gen8.inl"
@ -60,6 +61,7 @@ struct BDWFamily : public GEN8 {
using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const GPGPU_WALKER cmdInitGpgpuWalker;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad;

View File

@ -58,7 +58,11 @@ void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCm
}
template <>
void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device) {
void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper) {
}
template <>
void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper) {
}
template <>

View File

@ -18,7 +18,7 @@ template <class T>
struct CmdParse;
namespace NEO {
class LogicalStateHelper;
struct GEN9 {
#include "shared/source/generated/gen9/hw_cmds_generated_gen9.inl"
@ -61,6 +61,7 @@ struct SKLFamily : public GEN9 {
using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const GPGPU_WALKER cmdInitGpgpuWalker;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad;

View File

@ -71,7 +71,8 @@ template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStr
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper);
template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper);
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs);
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
template void PreemptionHelper::programStateSipEndWa<GfxFamily>(LinearStream &cmdStream, Device &device);

View File

@ -20,7 +20,8 @@ class LogicalStateHelper {
virtual void writeStreamInline(LinearStream &linearStream) = 0;
protected:
LogicalStateHelper() = default;
LogicalStateHelper(bool pipelinedState){};
LogicalStateHelper() = delete;
};
} // namespace NEO

View File

@ -17,8 +17,9 @@
template <class T>
struct CmdParse;
namespace NEO {
namespace NEO {
class LogicalStateHelper;
struct XeHpCore {
#include "shared/source/generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl"
@ -68,6 +69,7 @@ struct XeHpFamily : public XeHpCore {
using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const COMPUTE_WALKER cmdInitGpgpuWalker;
static const CFE_STATE cmdInitCfeState;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;

View File

@ -20,6 +20,7 @@ template <class T>
struct CmdParse;
namespace NEO {
class LogicalStateHelper;
struct XE_HPC_CORE {
#include "shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl"
@ -68,6 +69,7 @@ struct XE_HPC_COREFamily : public XE_HPC_CORE {
using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const COMPUTE_WALKER cmdInitGpgpuWalker;
static const CFE_STATE cmdInitCfeState;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;

View File

@ -17,8 +17,9 @@
template <class T>
struct CmdParse;
namespace NEO {
namespace NEO {
class LogicalStateHelper;
struct XE_HPG_CORE {
#include "shared/source/generated/xe_hpg_core/hw_cmds_generated_xe_hpg_core.inl"
@ -68,6 +69,7 @@ struct XE_HPG_COREFamily : public XE_HPG_CORE {
using XY_COLOR_BLT = typename GfxFamily::XY_FAST_COLOR_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const COMPUTE_WALKER cmdInitGpgpuWalker;
static const CFE_STATE cmdInitCfeState;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;

View File

@ -55,7 +55,7 @@ GEN11TEST_F(Gen11PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSip
ASSERT_LE(requiredCmdStreamSize, streamStorage.size());
LinearStream cmdStream{streamStorage.begin(), streamStorage.size()};
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device, nullptr);
HardwareParse hwParsePreamble;
hwParsePreamble.parseCommands<FamilyType>(cmdStream);

View File

@ -32,7 +32,7 @@ GEN12LPTEST_F(Gen12LpPreemptionTests, whenProgramStateSipIsCalledThenStateSipCmd
LinearStream cmdStream{streamStorage.begin(), streamStorage.size()};
EXPECT_NE(0U, requiredSize);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device, nullptr);
EXPECT_NE(0U, cmdStream.getUsed());
}

View File

@ -32,7 +32,7 @@ GEN8TEST_F(Gen8PreemptionTests, whenProgramStateSipIsCalledThenNoCmdsAreProgramm
EXPECT_EQ(0U, requiredSize);
LinearStream cmdStream{nullptr, 0};
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device, nullptr);
EXPECT_EQ(0U, cmdStream.getUsed());
}

View File

@ -39,7 +39,7 @@ GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsNotAvailableThenDoesNot
EXPECT_EQ(0U, requiredSize);
LinearStream cmdStream{nullptr, 0};
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device, nullptr);
EXPECT_EQ(0U, cmdStream.getUsed());
}
@ -61,7 +61,7 @@ GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSipIs
ASSERT_LE(requiredCmdStreamSize, streamStorage.size());
LinearStream cmdStream{streamStorage.begin(), streamStorage.size()};
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device, nullptr);
HardwareParse hwParsePreamble;
hwParsePreamble.parseCommands<FamilyType>(cmdStream);
@ -150,7 +150,7 @@ GEN9TEST_F(Gen9PreemptionTests, givenMidThreadPreemptionModeWhenStateSipIsProgra
preemptionBuffer.resize(cmdSizePreemptionMidThread);
LinearStream preemptionStream(&*preemptionBuffer.begin(), preemptionBuffer.size());
PreemptionHelper::programStateSip<FamilyType>(preemptionStream, *mockDevice);
PreemptionHelper::programStateSip<FamilyType>(preemptionStream, *mockDevice, nullptr);
HardwareParse hwParserOnlyPreemption;
hwParserOnlyPreemption.parseCommands<FamilyType>(preemptionStream, 0);

View File

@ -15,9 +15,10 @@
namespace NEO {
template <typename GfxFamily>
class LogicalStateHelperMock : public LogicalStateHelper {
class LogicalStateHelperMock : public GfxFamily::LogicalStateHelperHw {
public:
LogicalStateHelperMock() = default;
LogicalStateHelperMock(bool pipelinedState) : GfxFamily::LogicalStateHelperHw(pipelinedState) {
}
void writeStreamInline(LinearStream &linearStream) override {
writeStreamInlineCalledCounter++;

View File

@ -77,7 +77,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, PreambleTest, givenMidThreadPreemptionWhenPreambleIs
PreambleHelper<FamilyType>::programPreamble(&preambleStream, *mockDevice, 0U, &csrSurface);
PreemptionHelper::programStateSip<FamilyType>(preemptionStream, *mockDevice);
PreemptionHelper::programStateSip<FamilyType>(preemptionStream, *mockDevice, nullptr);
HardwareParse hwParserPreamble;
hwParserPreamble.parseCommands<FamilyType>(preambleStream, 0);

View File

@ -207,7 +207,7 @@ HWTEST_P(PreemptionTest, whenInNonMidThreadModeThenStateSipIsNotProgrammed) {
StackVec<char, 4096> buffer(requiredSize);
LinearStream cmdStream(buffer.begin(), buffer.size());
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *mockDevice);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *mockDevice, nullptr);
EXPECT_EQ(0u, cmdStream.getUsed());
}

View File

@ -24,7 +24,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, whenProgramStateSipIsC
EXPECT_EQ(0U, requiredSize);
LinearStream cmdStream{nullptr, 0};
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device, nullptr);
EXPECT_EQ(0U, cmdStream.getUsed());
}
@ -117,7 +117,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, GivenDebuggerUsedWhenP
uint64_t buffer[bufferSize];
LinearStream cmdStream{buffer, bufferSize * sizeof(uint64_t)};
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device, nullptr);
EXPECT_EQ(sizeof(STATE_SIP), cmdStream.getUsed());
auto sipAllocation = SipKernel::getSipKernel(*device).getSipAllocation();

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -20,7 +20,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDebu
preambleBuffer.resize(cmdSizePreemptionMidThread);
LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size());
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice);
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr);
HardwareParse hwParser;
hwParser.parseCommands<GfxFamily>(preambleStream);
@ -45,7 +45,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDisa
preambleBuffer.resize(cmdSizePreemptionMidThread);
LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size());
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice);
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr);
HardwareParse hwParser;
hwParser.parseCommands<GfxFamily>(preambleStream);
@ -70,7 +70,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenPreemptionDisabledAndDebug
preambleBuffer.resize(cmdSizePreemptionMidThread);
LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size());
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice);
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr);
HardwareParse hwParser;
hwParser.parseCommands<GfxFamily>(preambleStream);

View File

@ -44,7 +44,7 @@ XEHPTEST_F(PreemptionXeHPTest, givenRevisionA0toBWhenProgrammingSipThenGlobalSip
auto expectedGlobalSipWaSize = sizeof(PIPE_CONTROL) + 2 * sizeof(MI_LOAD_REGISTER_IMM);
EXPECT_EQ(expectedGlobalSipWaSize, requiredSize);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *mockDevice);
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *mockDevice, nullptr);
EXPECT_NE(0U, cmdStream.getUsed());
GenCmdList cmdList;