mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-20 13:11:34 +08:00
Disable PC WA on specific engine type
Related-To: NEO-6056 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
226226a877
commit
ca0138da2e
@ -125,7 +125,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stateSipRequired) {
|
if (stateSipRequired) {
|
||||||
preemptionSize += NEO::PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*neoDevice);
|
preemptionSize += NEO::PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*neoDevice, csr->isRcs());
|
||||||
}
|
}
|
||||||
|
|
||||||
preemptionSize += NEO::PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(devicePreemption, commandQueuePreemptionMode);
|
preemptionSize += NEO::PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(devicePreemption, commandQueuePreemptionMode);
|
||||||
|
@ -80,7 +80,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, UltCommandStreamReceiverTest, givenNotSentStateSipWh
|
|||||||
HWTEST_F(UltCommandStreamReceiverTest, givenCsrWhenProgramStateSipIsCalledThenIsStateSipCalledIsSetToTrue) {
|
HWTEST_F(UltCommandStreamReceiverTest, givenCsrWhenProgramStateSipIsCalledThenIsStateSipCalledIsSetToTrue) {
|
||||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
|
|
||||||
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*pDevice);
|
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*pDevice, commandStreamReceiver.isRcs());
|
||||||
StackVec<char, 4096> buffer(requiredSize);
|
StackVec<char, 4096> buffer(requiredSize);
|
||||||
LinearStream cmdStream(buffer.begin(), buffer.size());
|
LinearStream cmdStream(buffer.begin(), buffer.size());
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ HWTEST_F(UltCommandStreamReceiverTest, givenSentStateSipFlagSetWhenGetRequiredSt
|
|||||||
commandStreamReceiver.isStateSipSent = true;
|
commandStreamReceiver.isStateSipSent = true;
|
||||||
auto sizeWhenSipIsSent = commandStreamReceiver.getRequiredCmdStreamSize(dispatchFlags, *pDevice);
|
auto sizeWhenSipIsSent = commandStreamReceiver.getRequiredCmdStreamSize(dispatchFlags, *pDevice);
|
||||||
|
|
||||||
auto sizeForStateSip = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*pDevice);
|
auto sizeForStateSip = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*pDevice, commandStreamReceiver.isRcs());
|
||||||
EXPECT_EQ(sizeForStateSip, sizeWithStateSipIsNotSent - sizeWhenSipIsSent);
|
EXPECT_EQ(sizeForStateSip, sizeWithStateSipIsNotSent - sizeWhenSipIsSent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ HWTEST_F(UltCommandStreamReceiverTest, givenSentStateSipFlagSetAndSourceLevelDeb
|
|||||||
commandStreamReceiver.isStateSipSent = true;
|
commandStreamReceiver.isStateSipSent = true;
|
||||||
auto sizeWithSourceKernelDebugging = commandStreamReceiver.getRequiredCmdStreamSize(dispatchFlags, *pDevice);
|
auto sizeWithSourceKernelDebugging = commandStreamReceiver.getRequiredCmdStreamSize(dispatchFlags, *pDevice);
|
||||||
|
|
||||||
auto sizeForStateSip = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*pDevice);
|
auto sizeForStateSip = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*pDevice, commandStreamReceiver.isRcs());
|
||||||
EXPECT_EQ(sizeForStateSip, sizeWithSourceKernelDebugging - sizeWithoutSourceKernelDebugging - PreambleHelper<FamilyType>::getKernelDebuggingCommandsSize(true));
|
EXPECT_EQ(sizeForStateSip, sizeWithSourceKernelDebugging - sizeWithoutSourceKernelDebugging - PreambleHelper<FamilyType>::getKernelDebuggingCommandsSize(true));
|
||||||
pDevice->setDebuggerActive(false);
|
pDevice->setDebuggerActive(false);
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,9 @@ HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPrefetchDisablingIsRequir
|
|||||||
|
|
||||||
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned) {
|
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned) {
|
||||||
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
|
||||||
EXPECT_FALSE(hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(pInHwInfo));
|
auto isRcs = false;
|
||||||
|
|
||||||
|
EXPECT_FALSE(hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(pInHwInfo, isRcs));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfHeapInLocalMemThenFalseIsReturned, IsAtMostGen12lp) {
|
HWTEST2_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfHeapInLocalMemThenFalseIsReturned, IsAtMostGen12lp) {
|
||||||
|
@ -118,8 +118,9 @@ XEHPTEST_F(XeHPHwInfoConfig, givenHwInfoConfigWithMultipleCSSWhenIsPipeControlPr
|
|||||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 2;
|
hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled = 2;
|
||||||
|
auto isRcs = false;
|
||||||
|
|
||||||
EXPECT_TRUE(hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo));
|
EXPECT_TRUE(hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs));
|
||||||
}
|
}
|
||||||
|
|
||||||
XEHPTEST_F(XeHPHwInfoConfig, givenProgramPipeControlPriorToNonPipelinedStateCommandWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledThenTrueIsReturned) {
|
XEHPTEST_F(XeHPHwInfoConfig, givenProgramPipeControlPriorToNonPipelinedStateCommandWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledThenTrueIsReturned) {
|
||||||
@ -128,6 +129,7 @@ XEHPTEST_F(XeHPHwInfoConfig, givenProgramPipeControlPriorToNonPipelinedStateComm
|
|||||||
|
|
||||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
|
auto isRcs = false;
|
||||||
|
|
||||||
EXPECT_TRUE(hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo));
|
EXPECT_TRUE(hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs));
|
||||||
}
|
}
|
||||||
|
@ -807,7 +807,7 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
|
|||||||
size_t size = getRequiredCmdSizeForPreamble(device);
|
size_t size = getRequiredCmdSizeForPreamble(device);
|
||||||
size += getRequiredStateBaseAddressSize(device);
|
size += getRequiredStateBaseAddressSize(device);
|
||||||
if (!this->isStateSipSent || device.isDebuggerActive()) {
|
if (!this->isStateSipSent || device.isDebuggerActive()) {
|
||||||
size += PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(device);
|
size += PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(device, isRcs());
|
||||||
}
|
}
|
||||||
size += MemorySynchronizationCommands<GfxFamily>::getSizeForSinglePipeControl();
|
size += MemorySynchronizationCommands<GfxFamily>::getSizeForSinglePipeControl();
|
||||||
size += sizeof(typename GfxFamily::MI_BATCH_BUFFER_START);
|
size += sizeof(typename GfxFamily::MI_BATCH_BUFFER_START);
|
||||||
|
@ -22,7 +22,7 @@ void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream
|
|||||||
this->lastSentCoherencyRequest = static_cast<int8_t>(dispatchFlags.requiresCoherency);
|
this->lastSentCoherencyRequest = static_cast<int8_t>(dispatchFlags.requiresCoherency);
|
||||||
|
|
||||||
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||||
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
|
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs())) {
|
||||||
auto pPipeControlSpace = stream.getSpaceForCmd<PIPE_CONTROL>();
|
auto pPipeControlSpace = stream.getSpaceForCmd<PIPE_CONTROL>();
|
||||||
|
|
||||||
auto pipeControl = GfxFamily::cmdInitPipeControl;
|
auto pipeControl = GfxFamily::cmdInitPipeControl;
|
||||||
|
@ -59,7 +59,7 @@ size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForComputeMode() {
|
|||||||
auto hwInfo = peekHwInfo();
|
auto hwInfo = peekHwInfo();
|
||||||
if (isComputeModeNeeded()) {
|
if (isComputeModeNeeded()) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||||
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
|
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs())) {
|
||||||
size += sizeof(typename GfxFamily::PIPE_CONTROL);
|
size += sizeof(typename GfxFamily::PIPE_CONTROL);
|
||||||
}
|
}
|
||||||
size += sizeof(typename GfxFamily::STATE_COMPUTE_MODE);
|
size += sizeof(typename GfxFamily::STATE_COMPUTE_MODE);
|
||||||
@ -171,7 +171,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::addPipeControlPriorToNonPipeline
|
|||||||
auto hwInfo = peekHwInfo();
|
auto hwInfo = peekHwInfo();
|
||||||
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||||
|
|
||||||
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
|
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs())) {
|
||||||
args.textureCacheInvalidationEnable = true;
|
args.textureCacheInvalidationEnable = true;
|
||||||
args.hdcPipelineFlush = true;
|
args.hdcPipelineFlush = true;
|
||||||
args.amfsFlushEnable = true;
|
args.amfsFlushEnable = true;
|
||||||
@ -192,7 +192,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::addPipeControlBeforeStateSip(Lin
|
|||||||
bool debuggingEnabled = device.getDebugger() != nullptr;
|
bool debuggingEnabled = device.getDebugger() != nullptr;
|
||||||
PipeControlArgs args(true);
|
PipeControlArgs args(true);
|
||||||
|
|
||||||
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo) && debuggingEnabled &&
|
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs()) && debuggingEnabled &&
|
||||||
!hwHelper.isSipWANeeded(hwInfo)) {
|
!hwHelper.isSipWANeeded(hwInfo)) {
|
||||||
addPipeControlPriorToNonPipelinedStateCommand(commandStream, args);
|
addPipeControlPriorToNonPipelinedStateCommand(commandStream, args);
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||||
#include "shared/source/command_stream/linear_stream.h"
|
#include "shared/source/command_stream/linear_stream.h"
|
||||||
#include "shared/source/command_stream/preemption_mode.h"
|
#include "shared/source/command_stream/preemption_mode.h"
|
||||||
#include "shared/source/helpers/hw_info.h"
|
#include "shared/source/helpers/hw_info.h"
|
||||||
@ -51,7 +52,7 @@ class PreemptionHelper {
|
|||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
static size_t getRequiredPreambleSize(const Device &device);
|
static size_t getRequiredPreambleSize(const Device &device);
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
static size_t getRequiredStateSipCmdSize(const Device &device);
|
static size_t getRequiredStateSipCmdSize(Device &device, bool isRcs);
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
static void programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
|
static void programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
|
||||||
|
@ -85,7 +85,7 @@ size_t PreemptionHelper::getRequiredPreambleSize(const Device &device) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t PreemptionHelper::getRequiredStateSipCmdSize(const Device &device) {
|
size_t PreemptionHelper::getRequiredStateSipCmdSize(Device &device, bool isRcs) {
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread;
|
bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread;
|
||||||
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
|
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
|
||||||
|
@ -70,7 +70,7 @@ size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(const Device &device) {
|
size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs) {
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
|
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
|
||||||
auto hwInfo = device.getHardwareInfo();
|
auto hwInfo = device.getHardwareInfo();
|
||||||
@ -83,7 +83,7 @@ size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(const Device &dev
|
|||||||
size += 2 * sizeof(typename GfxFamily::MI_LOAD_REGISTER_IMM);
|
size += 2 * sizeof(typename GfxFamily::MI_LOAD_REGISTER_IMM);
|
||||||
} else {
|
} else {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||||
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo)) {
|
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs)) {
|
||||||
size += sizeof(typename GfxFamily::PIPE_CONTROL);
|
size += sizeof(typename GfxFamily::PIPE_CONTROL);
|
||||||
}
|
}
|
||||||
size += sizeof(typename GfxFamily::STATE_SIP);
|
size += sizeof(typename GfxFamily::STATE_SIP);
|
||||||
|
@ -17,7 +17,7 @@ template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStr
|
|||||||
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
|
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
|
||||||
template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
|
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);
|
||||||
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(const Device &device);
|
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs);
|
||||||
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
||||||
template size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device);
|
template size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device);
|
||||||
template void PreemptionHelper::applyPreemptionWaCmdsBegin<GfxFamily>(LinearStream *pCommandStream, const Device &device);
|
template void PreemptionHelper::applyPreemptionWaCmdsBegin<GfxFamily>(LinearStream *pCommandStream, const Device &device);
|
||||||
|
@ -17,7 +17,7 @@ template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStr
|
|||||||
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
|
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
|
||||||
template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
|
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);
|
||||||
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(const Device &device);
|
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs);
|
||||||
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
||||||
template size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device);
|
template size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device);
|
||||||
template void PreemptionHelper::applyPreemptionWaCmdsBegin<GfxFamily>(LinearStream *pCommandStream, const Device &device);
|
template void PreemptionHelper::applyPreemptionWaCmdsBegin<GfxFamily>(LinearStream *pCommandStream, const Device &device);
|
||||||
|
@ -47,7 +47,7 @@ size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(const Device &device) {
|
size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStr
|
|||||||
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
|
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
|
||||||
template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
|
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);
|
||||||
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(const Device &device);
|
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs);
|
||||||
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
||||||
template void PreemptionHelper::programStateSipEndWa<GfxFamily>(LinearStream &cmdStream, Device &device);
|
template void PreemptionHelper::programStateSipEndWa<GfxFamily>(LinearStream &cmdStream, Device &device);
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class HwInfoConfig {
|
|||||||
virtual bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const = 0;
|
virtual bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const = 0;
|
virtual bool isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool isNewResidencyModelSupported() const = 0;
|
virtual bool isNewResidencyModelSupported() const = 0;
|
||||||
virtual bool isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const = 0;
|
virtual bool isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const = 0;
|
||||||
virtual bool heapInLocalMem(const HardwareInfo &hwInfo) const = 0;
|
virtual bool heapInLocalMem(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual void setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) = 0;
|
virtual void setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) = 0;
|
||||||
virtual bool isAdditionalMediaSamplerProgrammingRequired() const = 0;
|
virtual bool isAdditionalMediaSamplerProgrammingRequired() const = 0;
|
||||||
@ -122,7 +122,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
|||||||
bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const override;
|
bool isAllocationSizeAdjustmentRequired(const HardwareInfo &hwInfo) const override;
|
||||||
bool isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const override;
|
bool isPrefetchDisablingRequired(const HardwareInfo &hwInfo) const override;
|
||||||
bool isNewResidencyModelSupported() const override;
|
bool isNewResidencyModelSupported() const override;
|
||||||
bool isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const override;
|
bool isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const override;
|
||||||
bool heapInLocalMem(const HardwareInfo &hwInfo) const override;
|
bool heapInLocalMem(const HardwareInfo &hwInfo) const override;
|
||||||
void setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) override;
|
void setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) override;
|
||||||
bool isAdditionalMediaSamplerProgrammingRequired() const override;
|
bool isAdditionalMediaSamplerProgrammingRequired() const override;
|
||||||
|
@ -202,7 +202,7 @@ bool HwInfoConfigHw<gfxProduct>::isPrefetchDisablingRequired(const HardwareInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
bool HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const {
|
bool HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ LocalMemoryAccessMode HwInfoConfigHw<gfxProduct>::getDefaultLocalMemoryAccessMod
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
bool HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const {
|
bool HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const {
|
||||||
if (hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1 ||
|
if (hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1 ||
|
||||||
DebugManager.flags.ProgramPipeControlPriorToNonPipelinedStateCommand.get() == 1) {
|
DebugManager.flags.ProgramPipeControlPriorToNonPipelinedStateCommand.get() == 1) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -36,7 +36,7 @@ GEN11TEST_F(Gen11PreemptionTests, whenMidThreadPreemptionIsNotAvailableThenDoesN
|
|||||||
EXPECT_EQ(0U, requiredSize);
|
EXPECT_EQ(0U, requiredSize);
|
||||||
|
|
||||||
LinearStream cmdStream{nullptr, 0};
|
LinearStream cmdStream{nullptr, 0};
|
||||||
PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
EXPECT_EQ(0U, cmdStream.getUsed());
|
EXPECT_EQ(0U, cmdStream.getUsed());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ GEN11TEST_F(Gen11PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSip
|
|||||||
device->setPreemptionMode(PreemptionMode::MidThread);
|
device->setPreemptionMode(PreemptionMode::MidThread);
|
||||||
executionEnvironment->DisableMidThreadPreemption = 0;
|
executionEnvironment->DisableMidThreadPreemption = 0;
|
||||||
|
|
||||||
size_t requiredCmdStreamSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
size_t requiredCmdStreamSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
size_t expectedPreambleSize = sizeof(STATE_SIP);
|
size_t expectedPreambleSize = sizeof(STATE_SIP);
|
||||||
EXPECT_EQ(expectedPreambleSize, requiredCmdStreamSize);
|
EXPECT_EQ(expectedPreambleSize, requiredCmdStreamSize);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ PreemptionTestHwDetails GetPreemptionTestHwDetails<TGLLPFamily>() {
|
|||||||
using Gen12LpPreemptionTests = DevicePreemptionTests;
|
using Gen12LpPreemptionTests = DevicePreemptionTests;
|
||||||
|
|
||||||
GEN12LPTEST_F(Gen12LpPreemptionTests, whenProgramStateSipIsCalledThenStateSipCmdIsAddedToStream) {
|
GEN12LPTEST_F(Gen12LpPreemptionTests, whenProgramStateSipIsCalledThenStateSipCmdIsAddedToStream) {
|
||||||
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
StackVec<char, 1024> streamStorage(1024);
|
StackVec<char, 1024> streamStorage(1024);
|
||||||
LinearStream cmdStream{streamStorage.begin(), streamStorage.size()};
|
LinearStream cmdStream{streamStorage.begin(), streamStorage.size()};
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ PreemptionTestHwDetails GetPreemptionTestHwDetails<BDWFamily>() {
|
|||||||
using Gen8PreemptionTests = DevicePreemptionTests;
|
using Gen8PreemptionTests = DevicePreemptionTests;
|
||||||
|
|
||||||
GEN8TEST_F(Gen8PreemptionTests, whenProgramStateSipIsCalledThenNoCmdsAreProgrammed) {
|
GEN8TEST_F(Gen8PreemptionTests, whenProgramStateSipIsCalledThenNoCmdsAreProgrammed) {
|
||||||
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
EXPECT_EQ(0U, requiredSize);
|
EXPECT_EQ(0U, requiredSize);
|
||||||
|
|
||||||
LinearStream cmdStream{nullptr, 0};
|
LinearStream cmdStream{nullptr, 0};
|
||||||
|
@ -34,7 +34,7 @@ using Gen9PreemptionTests = DevicePreemptionTests;
|
|||||||
GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsNotAvailableThenDoesNotProgramPreamble) {
|
GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsNotAvailableThenDoesNotProgramPreamble) {
|
||||||
device->setPreemptionMode(PreemptionMode::ThreadGroup);
|
device->setPreemptionMode(PreemptionMode::ThreadGroup);
|
||||||
|
|
||||||
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
EXPECT_EQ(0U, requiredSize);
|
EXPECT_EQ(0U, requiredSize);
|
||||||
|
|
||||||
LinearStream cmdStream{nullptr, 0};
|
LinearStream cmdStream{nullptr, 0};
|
||||||
@ -52,7 +52,7 @@ GEN9TEST_F(Gen9PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSipIs
|
|||||||
uint64_t minCsrAlignment = 2 * 256 * MemoryConstants::kiloByte;
|
uint64_t minCsrAlignment = 2 * 256 * MemoryConstants::kiloByte;
|
||||||
MockGraphicsAllocation csrSurface((void *)minCsrAlignment, minCsrSize);
|
MockGraphicsAllocation csrSurface((void *)minCsrAlignment, minCsrSize);
|
||||||
|
|
||||||
size_t requiredCmdStreamSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
size_t requiredCmdStreamSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
size_t expectedPreambleSize = sizeof(STATE_SIP);
|
size_t expectedPreambleSize = sizeof(STATE_SIP);
|
||||||
EXPECT_EQ(expectedPreambleSize, requiredCmdStreamSize);
|
EXPECT_EQ(expectedPreambleSize, requiredCmdStreamSize);
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ GEN9TEST_F(Gen9PreemptionTests, givenMidThreadPreemptionModeWhenStateSipIsProgra
|
|||||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||||
|
|
||||||
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
||||||
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
|
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice, false);
|
||||||
|
|
||||||
StackVec<char, 4096> preemptionBuffer;
|
StackVec<char, 4096> preemptionBuffer;
|
||||||
preemptionBuffer.resize(cmdSizePreemptionMidThread);
|
preemptionBuffer.resize(cmdSizePreemptionMidThread);
|
||||||
|
@ -179,7 +179,7 @@ bool HwInfoConfigHw<IGFX_UNKNOWN>::isNewResidencyModelSupported() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
bool HwInfoConfigHw<IGFX_UNKNOWN>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo) const {
|
bool HwInfoConfigHw<IGFX_UNKNOWN>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ XEHPTEST_F(PreemptionXeHPTest, givenRevisionA0toBWhenProgrammingSipThenGlobalSip
|
|||||||
mockDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->debugger.reset(new MockDebugger);
|
mockDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->debugger.reset(new MockDebugger);
|
||||||
auto sipAllocation = SipKernel::getSipKernel(*mockDevice).getSipAllocation();
|
auto sipAllocation = SipKernel::getSipKernel(*mockDevice).getSipAllocation();
|
||||||
|
|
||||||
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
|
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice, false);
|
||||||
StackVec<char, 1024> streamStorage(1024);
|
StackVec<char, 1024> streamStorage(1024);
|
||||||
LinearStream cmdStream{streamStorage.begin(), streamStorage.size()};
|
LinearStream cmdStream{streamStorage.begin(), streamStorage.size()};
|
||||||
|
|
||||||
|
@ -58,12 +58,12 @@ HWCMDTEST_F(IGFX_GEN8_CORE, PreambleTest, givenMidThreadPreemptionWhenPreambleIs
|
|||||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||||
|
|
||||||
mockDevice->setPreemptionMode(PreemptionMode::Disabled);
|
mockDevice->setPreemptionMode(PreemptionMode::Disabled);
|
||||||
auto cmdSizePreemptionDisabled = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
|
auto cmdSizePreemptionDisabled = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice, false);
|
||||||
EXPECT_EQ(0u, cmdSizePreemptionDisabled);
|
EXPECT_EQ(0u, cmdSizePreemptionDisabled);
|
||||||
|
|
||||||
if (mockDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode == PreemptionMode::MidThread) {
|
if (mockDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode == PreemptionMode::MidThread) {
|
||||||
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
||||||
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
|
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice, false);
|
||||||
EXPECT_LT(cmdSizePreemptionDisabled, cmdSizePreemptionMidThread);
|
EXPECT_LT(cmdSizePreemptionDisabled, cmdSizePreemptionMidThread);
|
||||||
|
|
||||||
StackVec<char, 8192> preambleBuffer(8192);
|
StackVec<char, 8192> preambleBuffer(8192);
|
||||||
|
@ -195,7 +195,7 @@ HWTEST_P(PreemptionTest, whenInNonMidThreadModeThenSizeForStateSipIsZero) {
|
|||||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||||
mockDevice->setPreemptionMode(mode);
|
mockDevice->setPreemptionMode(mode);
|
||||||
|
|
||||||
auto size = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
|
auto size = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice, false);
|
||||||
EXPECT_EQ(0u, size);
|
EXPECT_EQ(0u, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ HWTEST_P(PreemptionTest, whenInNonMidThreadModeThenStateSipIsNotProgrammed) {
|
|||||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||||
mockDevice->setPreemptionMode(mode);
|
mockDevice->setPreemptionMode(mode);
|
||||||
|
|
||||||
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
|
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice, false);
|
||||||
StackVec<char, 4096> buffer(requiredSize);
|
StackVec<char, 4096> buffer(requiredSize);
|
||||||
LinearStream cmdStream(buffer.begin(), buffer.size());
|
LinearStream cmdStream(buffer.begin(), buffer.size());
|
||||||
|
|
||||||
@ -314,7 +314,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MidThreadPreemptionTests, givenDirtyCsrStateWhenStat
|
|||||||
auto &csr = mockDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &csr = mockDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
csr.isPreambleSent = true;
|
csr.isPreambleSent = true;
|
||||||
|
|
||||||
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
|
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice, false);
|
||||||
StackVec<char, 4096> buff(requiredSize);
|
StackVec<char, 4096> buff(requiredSize);
|
||||||
LinearStream commandStream(buff.begin(), buff.size());
|
LinearStream commandStream(buff.begin(), buff.size());
|
||||||
|
|
||||||
@ -364,7 +364,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MidThreadPreemptionTests, WhenProgrammingPreemptionT
|
|||||||
auto &csr = mockDevice->getUltCommandStreamReceiver<FamilyType>();
|
auto &csr = mockDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||||
csr.isPreambleSent = true;
|
csr.isPreambleSent = true;
|
||||||
|
|
||||||
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
|
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice, false);
|
||||||
StackVec<char, 4096> buff(requiredSize);
|
StackVec<char, 4096> buff(requiredSize);
|
||||||
LinearStream commandStream(buff.begin(), buff.size());
|
LinearStream commandStream(buff.begin(), buff.size());
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ using namespace NEO;
|
|||||||
using XeHPAndLaterPreemptionTests = DevicePreemptionTests;
|
using XeHPAndLaterPreemptionTests = DevicePreemptionTests;
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, whenProgramStateSipIsCalledThenStateSipCmdIsNotAddedToStream) {
|
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, whenProgramStateSipIsCalledThenStateSipCmdIsNotAddedToStream) {
|
||||||
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
EXPECT_EQ(0U, requiredSize);
|
EXPECT_EQ(0U, requiredSize);
|
||||||
|
|
||||||
LinearStream cmdStream{nullptr, 0};
|
LinearStream cmdStream{nullptr, 0};
|
||||||
@ -35,7 +35,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, WhenProgrammingThenWaH
|
|||||||
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, WhenProgrammingThenWaNotApplied) {
|
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, WhenProgrammingThenWaNotApplied) {
|
||||||
size_t usedSize = 0;
|
size_t usedSize = 0;
|
||||||
|
|
||||||
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
auto requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
StackVec<char, 4096> buff(requiredSize);
|
StackVec<char, 4096> buff(requiredSize);
|
||||||
LinearStream cmdStream(buff.begin(), buff.size());
|
LinearStream cmdStream(buff.begin(), buff.size());
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterPreemptionTests, GivenDebuggerUsedWhenP
|
|||||||
auto sipType = SipKernel::getSipKernelType(*device.get());
|
auto sipType = SipKernel::getSipKernelType(*device.get());
|
||||||
SipKernel::initSipKernel(sipType, *device.get());
|
SipKernel::initSipKernel(sipType, *device.get());
|
||||||
|
|
||||||
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
|
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device, false);
|
||||||
EXPECT_EQ(sizeof(STATE_SIP), requiredSize);
|
EXPECT_EQ(sizeof(STATE_SIP), requiredSize);
|
||||||
|
|
||||||
const size_t bufferSize = 128;
|
const size_t bufferSize = 128;
|
||||||
|
@ -14,7 +14,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDebu
|
|||||||
|
|
||||||
mockDevice->setDebuggerActive(true);
|
mockDevice->setDebuggerActive(true);
|
||||||
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
||||||
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice);
|
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice, false);
|
||||||
|
|
||||||
StackVec<char, 4096> preambleBuffer;
|
StackVec<char, 4096> preambleBuffer;
|
||||||
preambleBuffer.resize(cmdSizePreemptionMidThread);
|
preambleBuffer.resize(cmdSizePreemptionMidThread);
|
||||||
@ -39,7 +39,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDisa
|
|||||||
|
|
||||||
mockDevice->setDebuggerActive(false);
|
mockDevice->setDebuggerActive(false);
|
||||||
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
||||||
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice);
|
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice, false);
|
||||||
|
|
||||||
StackVec<char, 4096> preambleBuffer;
|
StackVec<char, 4096> preambleBuffer;
|
||||||
preambleBuffer.resize(cmdSizePreemptionMidThread);
|
preambleBuffer.resize(cmdSizePreemptionMidThread);
|
||||||
@ -64,7 +64,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenPreemptionDisabledAndDebug
|
|||||||
|
|
||||||
mockDevice->setDebuggerActive(true);
|
mockDevice->setDebuggerActive(true);
|
||||||
mockDevice->setPreemptionMode(PreemptionMode::Disabled);
|
mockDevice->setPreemptionMode(PreemptionMode::Disabled);
|
||||||
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice);
|
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice, false);
|
||||||
|
|
||||||
StackVec<char, 4096> preambleBuffer;
|
StackVec<char, 4096> preambleBuffer;
|
||||||
preambleBuffer.resize(cmdSizePreemptionMidThread);
|
preambleBuffer.resize(cmdSizePreemptionMidThread);
|
||||||
@ -87,7 +87,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDebu
|
|||||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||||
mockDevice->setDebuggerActive(true);
|
mockDevice->setDebuggerActive(true);
|
||||||
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
|
||||||
size_t requiredPreambleSize = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice);
|
size_t requiredPreambleSize = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice, false);
|
||||||
auto sizeExpected = sizeof(typename GfxFamily::STATE_SIP);
|
auto sizeExpected = sizeof(typename GfxFamily::STATE_SIP);
|
||||||
EXPECT_EQ(sizeExpected, requiredPreambleSize);
|
EXPECT_EQ(sizeExpected, requiredPreambleSize);
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenPreemptionDisabledAndDebug
|
|||||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||||
mockDevice->setDebuggerActive(true);
|
mockDevice->setDebuggerActive(true);
|
||||||
mockDevice->setPreemptionMode(PreemptionMode::Disabled);
|
mockDevice->setPreemptionMode(PreemptionMode::Disabled);
|
||||||
size_t requiredPreambleSize = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice);
|
size_t requiredPreambleSize = PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(*mockDevice, false);
|
||||||
auto sizeExpected = sizeof(typename GfxFamily::STATE_SIP);
|
auto sizeExpected = sizeof(typename GfxFamily::STATE_SIP);
|
||||||
EXPECT_EQ(sizeExpected, requiredPreambleSize);
|
EXPECT_EQ(sizeExpected, requiredPreambleSize);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user