refactor: remove LogicalStateHelper

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2023-09-12 17:51:43 +00:00
committed by Compute-Runtime-Automation
parent 652a6dee67
commit 7562842a58
129 changed files with 263 additions and 805 deletions

View File

@@ -20,7 +20,6 @@
namespace NEO { namespace NEO {
enum class MemoryPool; enum class MemoryPool;
enum class ImageType; enum class ImageType;
class LogicalStateHelper;
} // namespace NEO } // namespace NEO
namespace L0 { namespace L0 {
@@ -296,7 +295,6 @@ struct CommandListCoreFamily : CommandListImp {
void addFlushRequiredCommand(bool flushOperationRequired, Event *signalEvent); void addFlushRequiredCommand(bool flushOperationRequired, Event *signalEvent);
void handlePostSubmissionState(); void handlePostSubmissionState();
virtual void createLogicalStateHelper();
void setupFillKernelArguments(size_t baseOffset, void setupFillKernelArguments(size_t baseOffset,
size_t patternSize, size_t patternSize,
size_t dstSize, size_t dstSize,

View File

@@ -21,7 +21,6 @@
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/kernel_helpers.h" #include "shared/source/helpers/kernel_helpers.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/pipe_control_args.h"
#include "shared/source/helpers/preamble.h" #include "shared/source/helpers/preamble.h"
#include "shared/source/helpers/register_offsets.h" #include "shared/source/helpers/register_offsets.h"
@@ -245,15 +244,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
enableInOrderExecution(); enableInOrderExecution();
} }
createLogicalStateHelper();
return returnType; return returnType;
} }
template <GFXCORE_FAMILY gfxCoreFamily>
void CommandListCoreFamily<gfxCoreFamily>::createLogicalStateHelper() {
this->nonImmediateLogicalStateHelper.reset(NEO::LogicalStateHelper::create<GfxFamily>());
}
template <GFXCORE_FAMILY gfxCoreFamily> template <GFXCORE_FAMILY gfxCoreFamily>
ze_result_t CommandListCoreFamily<gfxCoreFamily>::executeCommandListImmediate(bool performMigration) { ze_result_t CommandListCoreFamily<gfxCoreFamily>::executeCommandListImmediate(bool performMigration) {
return executeCommandListImmediateImpl(performMigration, this->cmdQImmediate); return executeCommandListImmediateImpl(performMigration, this->cmdQImmediate);
@@ -2799,10 +2792,8 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamPropertiesForRegularComma
containsAnyKernel = true; containsAnyKernel = true;
} }
auto logicalStateHelperBlock = !getLogicalStateHelper();
finalStreamState.pipelineSelect.setPropertySystolicMode(kernelAttributes.flags.usesSystolicPipelineSelectMode); finalStreamState.pipelineSelect.setPropertySystolicMode(kernelAttributes.flags.usesSystolicPipelineSelectMode);
if (this->pipelineSelectStateTracking && finalStreamState.pipelineSelect.isDirty() && logicalStateHelperBlock) { if (this->pipelineSelectStateTracking && finalStreamState.pipelineSelect.isDirty()) {
NEO::PipelineSelectArgs pipelineSelectArgs; NEO::PipelineSelectArgs pipelineSelectArgs;
pipelineSelectArgs.systolicPipelineSelectMode = kernelAttributes.flags.usesSystolicPipelineSelectMode; pipelineSelectArgs.systolicPipelineSelectMode = kernelAttributes.flags.usesSystolicPipelineSelectMode;
pipelineSelectArgs.systolicPipelineSelectSupport = this->systolicModeSupport; pipelineSelectArgs.systolicPipelineSelectSupport = this->systolicModeSupport;
@@ -2814,11 +2805,11 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamPropertiesForRegularComma
finalStreamState.frontEndState.setPropertiesComputeDispatchAllWalkerEnableDisableEuFusion(isCooperative, fusedEuDisabled); finalStreamState.frontEndState.setPropertiesComputeDispatchAllWalkerEnableDisableEuFusion(isCooperative, fusedEuDisabled);
bool isPatchingVfeStateAllowed = (NEO::DebugManager.flags.AllowPatchingVfeStateInCommandLists.get() || (this->frontEndStateTracking && this->dispatchCmdListBatchBufferAsPrimary)); bool isPatchingVfeStateAllowed = (NEO::DebugManager.flags.AllowPatchingVfeStateInCommandLists.get() || (this->frontEndStateTracking && this->dispatchCmdListBatchBufferAsPrimary));
if (logicalStateHelperBlock && finalStreamState.frontEndState.isDirty()) { if (finalStreamState.frontEndState.isDirty()) {
if (isPatchingVfeStateAllowed) { if (isPatchingVfeStateAllowed) {
auto frontEndStateAddress = NEO::PreambleHelper<GfxFamily>::getSpaceForVfeState(commandContainer.getCommandStream(), device->getHwInfo(), engineGroupType); auto frontEndStateAddress = NEO::PreambleHelper<GfxFamily>::getSpaceForVfeState(commandContainer.getCommandStream(), device->getHwInfo(), engineGroupType);
auto frontEndStateCmd = new VFE_STATE_TYPE; auto frontEndStateCmd = new VFE_STATE_TYPE;
NEO::PreambleHelper<GfxFamily>::programVfeState(frontEndStateCmd, rootDeviceEnvironment, 0, 0, device->getMaxNumHwThreads(), finalStreamState, nullptr); NEO::PreambleHelper<GfxFamily>::programVfeState(frontEndStateCmd, rootDeviceEnvironment, 0, 0, device->getMaxNumHwThreads(), finalStreamState);
commandsToPatch.push_back({frontEndStateAddress, frontEndStateCmd, CommandToPatch::FrontEndState}); commandsToPatch.push_back({frontEndStateAddress, frontEndStateCmd, CommandToPatch::FrontEndState});
} }
if (this->frontEndStateTracking && !this->dispatchCmdListBatchBufferAsPrimary) { if (this->frontEndStateTracking && !this->dispatchCmdListBatchBufferAsPrimary) {
@@ -2839,14 +2830,14 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamPropertiesForRegularComma
} else { } else {
finalStreamState.stateComputeMode.setPropertiesAll(cmdListDefaultCoherency, kernelAttributes.numGrfRequired, kernelAttributes.threadArbitrationPolicy, device->getDevicePreemptionMode()); finalStreamState.stateComputeMode.setPropertiesAll(cmdListDefaultCoherency, kernelAttributes.numGrfRequired, kernelAttributes.threadArbitrationPolicy, device->getDevicePreemptionMode());
} }
if (finalStreamState.stateComputeMode.isDirty() && logicalStateHelperBlock) { if (finalStreamState.stateComputeMode.isDirty()) {
bool isRcs = (this->engineGroupType == NEO::EngineGroupType::RenderCompute); bool isRcs = (this->engineGroupType == NEO::EngineGroupType::RenderCompute);
NEO::PipelineSelectArgs pipelineSelectArgs; NEO::PipelineSelectArgs pipelineSelectArgs;
pipelineSelectArgs.systolicPipelineSelectMode = kernelAttributes.flags.usesSystolicPipelineSelectMode; pipelineSelectArgs.systolicPipelineSelectMode = kernelAttributes.flags.usesSystolicPipelineSelectMode;
pipelineSelectArgs.systolicPipelineSelectSupport = this->systolicModeSupport; pipelineSelectArgs.systolicPipelineSelectSupport = this->systolicModeSupport;
NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization( NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(
*commandContainer.getCommandStream(), finalStreamState.stateComputeMode, pipelineSelectArgs, false, rootDeviceEnvironment, isRcs, this->dcFlushSupport, nullptr); *commandContainer.getCommandStream(), finalStreamState.stateComputeMode, pipelineSelectArgs, false, rootDeviceEnvironment, isRcs, this->dcFlushSupport);
} }
finalStreamState.stateBaseAddress.setPropertyStatelessMocs(currentMocsState); finalStreamState.stateBaseAddress.setPropertyStatelessMocs(currentMocsState);
@@ -2861,7 +2852,7 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamPropertiesForRegularComma
finalStreamState.stateBaseAddress.setPropertiesIndirectState(currentIndirectObjectBaseAddress, currentIndirectObjectSize); finalStreamState.stateBaseAddress.setPropertiesIndirectState(currentIndirectObjectBaseAddress, currentIndirectObjectSize);
} }
if (logicalStateHelperBlock && this->stateBaseAddressTracking && finalStreamState.stateBaseAddress.isDirty()) { if (this->stateBaseAddressTracking && finalStreamState.stateBaseAddress.isDirty()) {
commandContainer.setDirtyStateForAllHeaps(false); commandContainer.setDirtyStateForAllHeaps(false);
programStateBaseAddress(commandContainer, true); programStateBaseAddress(commandContainer, true);
finalStreamState.stateBaseAddress.clearIsDirty(); finalStreamState.stateBaseAddress.clearIsDirty();

View File

@@ -167,9 +167,6 @@ struct CommandListCoreFamilyImmediate : public CommandListCoreFamily<gfxCoreFami
ze_result_t flushImmediate(ze_result_t inputRet, bool performMigration, bool hasStallingCmds, bool hasRelaxedOrderingDependencies, bool kernelOperation, ze_event_handle_t hSignalEvent); ze_result_t flushImmediate(ze_result_t inputRet, bool performMigration, bool hasStallingCmds, bool hasRelaxedOrderingDependencies, bool kernelOperation, ze_event_handle_t hSignalEvent);
void createLogicalStateHelper() override {}
NEO::LogicalStateHelper *getLogicalStateHelper() const override;
bool preferCopyThroughLockedPtr(CpuMemCopyInfo &cpuMemCopyInfo, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents); bool preferCopyThroughLockedPtr(CpuMemCopyInfo &cpuMemCopyInfo, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents);
bool isSuitableUSMHostAlloc(NEO::SvmAllocationData *alloc); bool isSuitableUSMHostAlloc(NEO::SvmAllocationData *alloc);
bool isSuitableUSMDeviceAlloc(NEO::SvmAllocationData *alloc); bool isSuitableUSMDeviceAlloc(NEO::SvmAllocationData *alloc);

View File

@@ -38,11 +38,6 @@ CommandListCoreFamilyImmediate<gfxCoreFamily>::CommandListCoreFamilyImmediate(ui
computeFlushMethod = &CommandListCoreFamilyImmediate<gfxCoreFamily>::flushRegularTask; computeFlushMethod = &CommandListCoreFamilyImmediate<gfxCoreFamily>::flushRegularTask;
} }
template <GFXCORE_FAMILY gfxCoreFamily>
NEO::LogicalStateHelper *CommandListCoreFamilyImmediate<gfxCoreFamily>::getLogicalStateHelper() const {
return this->csr->getLogicalStateHelper();
}
template <GFXCORE_FAMILY gfxCoreFamily> template <GFXCORE_FAMILY gfxCoreFamily>
void CommandListCoreFamilyImmediate<gfxCoreFamily>::checkAvailableSpace(uint32_t numEvents, bool hasRelaxedOrderingDependencies, size_t commandSize) { void CommandListCoreFamilyImmediate<gfxCoreFamily>::checkAvailableSpace(uint32_t numEvents, bool hasRelaxedOrderingDependencies, size_t commandSize) {
this->commandContainer.fillReusableAllocationLists(); this->commandContainer.fillReusableAllocationLists();

View File

@@ -195,7 +195,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
this->dcFlushSupport // dcFlushEnable this->dcFlushSupport // dcFlushEnable
}; };
NEO::EncodeDispatchKernel<GfxFamily>::encode(commandContainer, dispatchKernelArgs, getLogicalStateHelper()); NEO::EncodeDispatchKernel<GfxFamily>::encode(commandContainer, dispatchKernelArgs);
if (!this->isFlushTaskSubmissionEnabled) { if (!this->isFlushTaskSubmissionEnabled) {
this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs; this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs;
} }

View File

@@ -308,7 +308,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
} }
} }
NEO::EncodeDispatchKernel<GfxFamily>::encode(commandContainer, dispatchKernelArgs, getLogicalStateHelper()); NEO::EncodeDispatchKernel<GfxFamily>::encode(commandContainer, dispatchKernelArgs);
if (!this->isFlushTaskSubmissionEnabled) { if (!this->isFlushTaskSubmissionEnabled) {
this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs; this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs;

View File

@@ -14,7 +14,6 @@
#include "shared/source/helpers/engine_control.h" #include "shared/source/helpers/engine_control.h"
#include "shared/source/helpers/engine_node_helper.h" #include "shared/source/helpers/engine_node_helper.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/indirect_heap/indirect_heap.h" #include "shared/source/indirect_heap/indirect_heap.h"
#include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/allocation_properties.h"
#include "shared/source/memory_manager/memory_manager.h" #include "shared/source/memory_manager/memory_manager.h"

View File

@@ -12,10 +12,6 @@
#include <memory> #include <memory>
namespace NEO {
class LogicalStateHelper;
}
namespace L0 { namespace L0 {
struct CommandListImp : CommandList { struct CommandListImp : CommandList {
@@ -32,7 +28,6 @@ struct CommandListImp : CommandList {
virtual void appendMultiPartitionPrologue(uint32_t partitionDataSize) = 0; virtual void appendMultiPartitionPrologue(uint32_t partitionDataSize) = 0;
virtual void appendMultiPartitionEpilogue() = 0; virtual void appendMultiPartitionEpilogue() = 0;
virtual NEO::LogicalStateHelper *getLogicalStateHelper() const { return nonImmediateLogicalStateHelper.get(); }
void setStreamPropertiesDefaultSettings(NEO::StreamProperties &streamProperties); void setStreamPropertiesDefaultSettings(NEO::StreamProperties &streamProperties);
void enableInOrderExecution(); void enableInOrderExecution();
bool isInOrderExecutionEnabled() const { return inOrderExecutionEnabled; } bool isInOrderExecutionEnabled() const { return inOrderExecutionEnabled; }
@@ -41,7 +36,6 @@ struct CommandListImp : CommandList {
const std::vector<Event *> &peekMappedEventList() { return mappedTsEventList; } const std::vector<Event *> &peekMappedEventList() { return mappedTsEventList; }
protected: protected:
std::unique_ptr<NEO::LogicalStateHelper> nonImmediateLogicalStateHelper;
NEO::GraphicsAllocation *inOrderDependencyCounterAllocation = nullptr; NEO::GraphicsAllocation *inOrderDependencyCounterAllocation = nullptr;
uint32_t inOrderDependencyCounter = 0; uint32_t inOrderDependencyCounter = 0;
uint32_t inOrderAllocationOffset = 0; uint32_t inOrderAllocationOffset = 0;

View File

@@ -158,8 +158,6 @@ struct CommandQueueHw : public CommandQueueImp {
inline void makeRayTracingBufferResident(NEO::GraphicsAllocation *rtBuffer); inline void makeRayTracingBufferResident(NEO::GraphicsAllocation *rtBuffer);
inline void programActivePartitionConfig(bool isProgramActivePartitionConfigRequired, NEO::LinearStream &commandStream); inline void programActivePartitionConfig(bool isProgramActivePartitionConfigRequired, NEO::LinearStream &commandStream);
inline void encodeKernelArgsBufferAndMakeItResident();
inline void writeCsrStreamInlineIfLogicalStateHelperAvailable(NEO::LinearStream &commandStream);
inline void programOneCmdListFrontEndIfDirty(CommandListExecutionContext &ctx, inline void programOneCmdListFrontEndIfDirty(CommandListExecutionContext &ctx,
NEO::LinearStream &commandStream, NEO::LinearStream &commandStream,
CommandListRequiredStateChange &cmdListRequiredState); CommandListRequiredStateChange &cmdListRequiredState);
@@ -169,7 +167,6 @@ struct CommandQueueHw : public CommandQueueImp {
inline void programLastCommandListReturnBbStart( inline void programLastCommandListReturnBbStart(
NEO::LinearStream &commandStream, NEO::LinearStream &commandStream,
CommandListExecutionContext &ctx); CommandListExecutionContext &ctx);
inline void mergeOneCmdListPipelinedState(CommandList *commandList);
inline void programFrontEndAndClearDirtyFlag(bool shouldFrontEndBeProgrammed, inline void programFrontEndAndClearDirtyFlag(bool shouldFrontEndBeProgrammed,
CommandListExecutionContext &ctx, CommandListExecutionContext &ctx,
NEO::LinearStream &commandStream, NEO::LinearStream &commandStream,

View File

@@ -22,7 +22,6 @@
#include "shared/source/helpers/definitions/command_encoder_args.h" #include "shared/source/helpers/definitions/command_encoder_args.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/heap_base_address_model.h" #include "shared/source/helpers/heap_base_address_model.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/pause_on_gpu_properties.h" #include "shared/source/helpers/pause_on_gpu_properties.h"
#include "shared/source/helpers/pipe_control_args.h" #include "shared/source/helpers/pipe_control_args.h"
#include "shared/source/helpers/preamble.h" #include "shared/source/helpers/preamble.h"
@@ -149,7 +148,6 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsRegular(
this->makeRayTracingBufferResident(neoDevice->getRTMemoryBackedBuffer()); this->makeRayTracingBufferResident(neoDevice->getRTMemoryBackedBuffer());
this->makeSbaTrackingBufferResidentIfL0DebuggerEnabled(ctx.isDebugEnabled); this->makeSbaTrackingBufferResidentIfL0DebuggerEnabled(ctx.isDebugEnabled);
this->makeCsrTagAllocationResident(); this->makeCsrTagAllocationResident();
this->encodeKernelArgsBufferAndMakeItResident();
if (ctx.globalInit) { if (ctx.globalInit) {
this->getTagsManagerHeapsAndMakeThemResidentIfSWTagsEnabled(child); this->getTagsManagerHeapsAndMakeThemResidentIfSWTagsEnabled(child);
@@ -175,7 +173,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsRegular(
this->programCsrBaseAddressIfPreemptionModeInitial(ctx.isPreemptionModeInitial, child); this->programCsrBaseAddressIfPreemptionModeInitial(ctx.isPreemptionModeInitial, child);
this->programStateSip(ctx.stateSipRequired, child); this->programStateSip(ctx.stateSipRequired, child);
this->programActivePartitionConfig(ctx.isProgramActivePartitionConfigRequired, child); this->programActivePartitionConfig(ctx.isProgramActivePartitionConfigRequired, child);
bool shouldProgramVfe = (this->csr->getLogicalStateHelper() || !frontEndTrackingEnabled()) && ctx.frontEndStateDirty; bool shouldProgramVfe = !frontEndTrackingEnabled() && ctx.frontEndStateDirty;
this->programFrontEndAndClearDirtyFlag(shouldProgramVfe, ctx, child, csr->getStreamProperties()); this->programFrontEndAndClearDirtyFlag(shouldProgramVfe, ctx, child, csr->getStreamProperties());
if (ctx.rtDispatchRequired) { if (ctx.rtDispatchRequired) {
@@ -184,8 +182,6 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsRegular(
} }
} }
this->writeCsrStreamInlineIfLogicalStateHelperAvailable(child);
for (auto i = 0u; i < numCommandLists; ++i) { for (auto i = 0u; i < numCommandLists; ++i) {
auto commandList = CommandList::fromHandle(commandListHandles[i]); auto commandList = CommandList::fromHandle(commandListHandles[i]);
@@ -207,7 +203,6 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsRegular(
this->patchCommands(*commandList, this->csr->getScratchSpaceController()->getScratchPatchAddress()); this->patchCommands(*commandList, this->csr->getScratchSpaceController()->getScratchPatchAddress());
this->programOneCmdListBatchBufferStart(commandList, child, ctx); this->programOneCmdListBatchBufferStart(commandList, child, ctx);
this->mergeOneCmdListPipelinedState(commandList);
this->prefetchMemoryToDeviceAssociatedWithCmdList(commandList); this->prefetchMemoryToDeviceAssociatedWithCmdList(commandList);
if (commandList->hasKernelWithAssert()) { if (commandList->hasKernelWithAssert()) {
@@ -279,16 +274,11 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsCopyOnly(
this->getTagsManagerHeapsAndMakeThemResidentIfSWTagsEnabled(child); this->getTagsManagerHeapsAndMakeThemResidentIfSWTagsEnabled(child);
this->csr->programHardwareContext(child); this->csr->programHardwareContext(child);
this->encodeKernelArgsBufferAndMakeItResident();
this->writeCsrStreamInlineIfLogicalStateHelperAvailable(child);
for (auto i = 0u; i < numCommandLists; ++i) { for (auto i = 0u; i < numCommandLists; ++i) {
auto commandList = CommandList::fromHandle(phCommandLists[i]); auto commandList = CommandList::fromHandle(phCommandLists[i]);
ctx.childGpuAddressPositionBeforeDynamicPreamble = child.getCurrentGpuAddressPosition(); ctx.childGpuAddressPositionBeforeDynamicPreamble = child.getCurrentGpuAddressPosition();
this->programOneCmdListBatchBufferStart(commandList, child, ctx); this->programOneCmdListBatchBufferStart(commandList, child, ctx);
this->mergeOneCmdListPipelinedState(commandList);
this->prefetchMemoryToDeviceAssociatedWithCmdList(commandList); this->prefetchMemoryToDeviceAssociatedWithCmdList(commandList);
} }
this->migrateSharedAllocationsIfRequested(ctx.isMigrationRequested, ctx.firstCommandList); this->migrateSharedAllocationsIfRequested(ctx.isMigrationRequested, ctx.firstCommandList);
@@ -401,8 +391,7 @@ void CommandQueueHw<gfxCoreFamily>::programFrontEnd(uint64_t scratchAddress, uin
perThreadScratchSpaceSize, perThreadScratchSpaceSize,
scratchAddress, scratchAddress,
device->getMaxNumHwThreads(), device->getMaxNumHwThreads(),
streamProperties, streamProperties);
csr->getLogicalStateHelper());
csr->setMediaVFEStateDirty(false); csr->setMediaVFEStateDirty(false);
} }
@@ -669,9 +658,6 @@ size_t CommandQueueHw<gfxCoreFamily>::estimateLinearStreamSizeInitial(
ctx.globalInit = true; ctx.globalInit = true;
} }
linearStreamSizeEstimate += NEO::EncodeKernelArgsBuffer<GfxFamily>::getKernelArgsBufferCmdsSize(this->csr->getKernelArgsBufferAllocation(),
this->csr->getLogicalStateHelper());
return linearStreamSizeEstimate; return linearStreamSizeEstimate;
} }
@@ -704,7 +690,7 @@ void CommandQueueHw<gfxCoreFamily>::setFrontEndStateProperties(CommandListExecut
if (!frontEndTrackingEnabled()) { if (!frontEndTrackingEnabled()) {
streamProperties.frontEndState.setPropertiesAll(ctx.anyCommandListWithCooperativeKernels, ctx.anyCommandListRequiresDisabledEUFusion, streamProperties.frontEndState.setPropertiesAll(ctx.anyCommandListWithCooperativeKernels, ctx.anyCommandListRequiresDisabledEUFusion,
true, isEngineInstanced); true, isEngineInstanced);
ctx.frontEndStateDirty |= (streamProperties.frontEndState.isDirty() && !this->csr->getLogicalStateHelper()); ctx.frontEndStateDirty |= streamProperties.frontEndState.isDirty();
} else { } else {
ctx.engineInstanced = isEngineInstanced; ctx.engineInstanced = isEngineInstanced;
} }
@@ -902,8 +888,7 @@ void CommandQueueHw<gfxCoreFamily>::programCsrBaseAddressIfPreemptionModeInitial
NEO::Device *neoDevice = this->device->getNEODevice(); NEO::Device *neoDevice = this->device->getNEODevice();
NEO::PreemptionHelper::programCsrBaseAddress<GfxFamily>(cmdStream, NEO::PreemptionHelper::programCsrBaseAddress<GfxFamily>(cmdStream,
*neoDevice, *neoDevice,
this->csr->getPreemptionAllocation(), this->csr->getPreemptionAllocation());
this->csr->getLogicalStateHelper());
} }
template <GFXCORE_FAMILY gfxCoreFamily> template <GFXCORE_FAMILY gfxCoreFamily>
@@ -912,7 +897,7 @@ void CommandQueueHw<gfxCoreFamily>::programStateSip(bool isStateSipRequired, NEO
return; return;
} }
NEO::Device *neoDevice = this->device->getNEODevice(); NEO::Device *neoDevice = this->device->getNEODevice();
NEO::PreemptionHelper::programStateSip<GfxFamily>(cmdStream, *neoDevice, this->csr->getLogicalStateHelper(), &this->csr->getOsContext()); NEO::PreemptionHelper::programStateSip<GfxFamily>(cmdStream, *neoDevice, &this->csr->getOsContext());
this->csr->setSipSentFlag(true); this->csr->setSipSentFlag(true);
} }
@@ -987,22 +972,6 @@ void CommandQueueHw<gfxCoreFamily>::programActivePartitionConfig(
csrHw->programActivePartitionConfig(cmdStream); csrHw->programActivePartitionConfig(cmdStream);
} }
template <GFXCORE_FAMILY gfxCoreFamily>
void CommandQueueHw<gfxCoreFamily>::encodeKernelArgsBufferAndMakeItResident() {
NEO::EncodeKernelArgsBuffer<GfxFamily>::encodeKernelArgsBufferCmds(this->csr->getKernelArgsBufferAllocation(),
this->csr->getLogicalStateHelper());
if (this->csr->getKernelArgsBufferAllocation()) {
this->csr->makeResident(*this->csr->getKernelArgsBufferAllocation());
}
}
template <GFXCORE_FAMILY gfxCoreFamily>
void CommandQueueHw<gfxCoreFamily>::writeCsrStreamInlineIfLogicalStateHelperAvailable(NEO::LinearStream &cmdStream) {
if (this->csr->getLogicalStateHelper()) {
this->csr->getLogicalStateHelper()->writeStreamInline(cmdStream, false);
}
}
template <GFXCORE_FAMILY gfxCoreFamily> template <GFXCORE_FAMILY gfxCoreFamily>
void CommandQueueHw<gfxCoreFamily>::programOneCmdListBatchBufferStart(CommandList *commandList, NEO::LinearStream &commandStream, CommandListExecutionContext &ctx) { void CommandQueueHw<gfxCoreFamily>::programOneCmdListBatchBufferStart(CommandList *commandList, NEO::LinearStream &commandStream, CommandListExecutionContext &ctx) {
if (this->dispatchCmdListBatchBufferAsPrimary) { if (this->dispatchCmdListBatchBufferAsPrimary) {
@@ -1112,16 +1081,6 @@ void CommandQueueHw<gfxCoreFamily>::programLastCommandListReturnBbStart(
} }
} }
template <GFXCORE_FAMILY gfxCoreFamily>
void CommandQueueHw<gfxCoreFamily>::mergeOneCmdListPipelinedState(CommandList *commandList) {
bool isCommandListImmediate = (commandList->getCmdListType() == CommandList::CommandListType::TYPE_IMMEDIATE) ? true : false;
auto commandListImp = static_cast<CommandListImp *>(commandList);
if (!isCommandListImmediate && commandListImp->getLogicalStateHelper()) {
this->csr->getLogicalStateHelper()->mergePipelinedState(*commandListImp->getLogicalStateHelper());
}
}
template <GFXCORE_FAMILY gfxCoreFamily> template <GFXCORE_FAMILY gfxCoreFamily>
void CommandQueueHw<gfxCoreFamily>::collectPrintfContentsFromCommandsList( void CommandQueueHw<gfxCoreFamily>::collectPrintfContentsFromCommandsList(
CommandList *commandList) { CommandList *commandList) {
@@ -1240,7 +1199,7 @@ NEO::SubmissionStatus CommandQueueHw<gfxCoreFamily>::prepareAndSubmitBatchBuffer
*(MI_BATCH_BUFFER_END *)buffer = GfxFamily::cmdInitBatchBufferEnd; *(MI_BATCH_BUFFER_END *)buffer = GfxFamily::cmdInitBatchBufferEnd;
} }
if (ctx.isNEODebuggerActive(this->device) || NEO::DebugManager.flags.EnableSWTags.get() || csr->getLogicalStateHelper()) { if (ctx.isNEODebuggerActive(this->device) || NEO::DebugManager.flags.EnableSWTags.get()) {
cleanLeftoverMemory(outerCommandStream, innerCommandStream); cleanLeftoverMemory(outerCommandStream, innerCommandStream);
} else if (this->alignedChildStreamPadding) { } else if (this->alignedChildStreamPadding) {
void *paddingPtr = innerCommandStream.getSpace(this->alignedChildStreamPadding); void *paddingPtr = innerCommandStream.getSpace(this->alignedChildStreamPadding);
@@ -1436,7 +1395,7 @@ void CommandQueueHw<gfxCoreFamily>::programRequiredStateComputeModeForCommandLis
NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(commandStream, cmdListRequired.requiredState.stateComputeMode, pipelineSelectArgs, NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(commandStream, cmdListRequired.requiredState.stateComputeMode, pipelineSelectArgs,
false, device->getNEODevice()->getRootDeviceEnvironment(), this->csr->isRcs(), false, device->getNEODevice()->getRootDeviceEnvironment(), this->csr->isRcs(),
this->csr->getDcFlushSupport(), nullptr); this->csr->getDcFlushSupport());
this->csr->setStateComputeModeDirty(false); this->csr->setStateComputeModeDirty(false);
} }
} }

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2022 Intel Corporation * Copyright (C) 2022-2023 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -7,7 +7,6 @@
#pragma once #pragma once
#include "shared/source/gen11/hw_cmds_base.h" #include "shared/source/gen11/hw_cmds_base.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" #include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"

View File

@@ -8,7 +8,6 @@
#pragma once #pragma once
#include "shared/source/gen12lp/hw_cmds_base.h" #include "shared/source/gen12lp/hw_cmds_base.h"
#include "shared/source/gen12lp/hw_info.h" #include "shared/source/gen12lp/hw_info.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" #include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2020-2022 Intel Corporation * Copyright (C) 2020-2023 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -9,7 +9,6 @@
#include "shared/source/gen9/hw_cmds.h" #include "shared/source/gen9/hw_cmds.h"
#include "shared/source/gen9/hw_info.h" #include "shared/source/gen9/hw_info.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h" #include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"

View File

@@ -1,12 +1,11 @@
/* /*
* Copyright (C) 2022 Intel Corporation * Copyright (C) 2022-2023 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
*/ */
#pragma once #pragma once
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/xe_hp_core/hw_cmds_base.h" #include "shared/source/xe_hp_core/hw_cmds_base.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h"

View File

@@ -1,12 +1,11 @@
/* /*
* Copyright (C) 2022 Intel Corporation * Copyright (C) 2022-2023 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
*/ */
#pragma once #pragma once
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h" #include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h"

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2021-2022 Intel Corporation * Copyright (C) 2021-2023 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -7,7 +7,6 @@
#pragma once #pragma once
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h" #include "shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h"

View File

@@ -6,7 +6,6 @@
*/ */
#pragma once #pragma once
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/test/common/test_macros/mock_method_macros.h" #include "shared/test/common/test_macros/mock_method_macros.h"
#include "level_zero/core/source/cmdlist/cmdlist_hw.h" #include "level_zero/core/source/cmdlist/cmdlist_hw.h"
@@ -243,7 +242,6 @@ struct WhiteBox<::L0::CommandList> : public ::L0::CommandListImp {
using BaseClass::isSyncModeQueue; using BaseClass::isSyncModeQueue;
using BaseClass::isTbxMode; using BaseClass::isTbxMode;
using BaseClass::minimalSizeForBcsSplit; using BaseClass::minimalSizeForBcsSplit;
using BaseClass::nonImmediateLogicalStateHelper;
using BaseClass::partitionCount; using BaseClass::partitionCount;
using BaseClass::pipelineSelectStateTracking; using BaseClass::pipelineSelectStateTracking;
using BaseClass::requiredStreamState; using BaseClass::requiredStreamState;

View File

@@ -12,7 +12,6 @@
#include "shared/test/common/mocks/mock_assert_handler.h" #include "shared/test/common/mocks/mock_assert_handler.h"
#include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_csr.h"
#include "shared/test/common/mocks/mock_device.h" #include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/mocks/mock_logical_state_helper.h"
#include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/hw_test.h"
#include "shared/test/common/test_macros/test.h" #include "shared/test/common/test_macros/test.h"
@@ -260,9 +259,6 @@ HWTEST2_F(CommandListImmediateWithAssert, givenKernelWithAssertWhenAppendedToAsy
auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result); auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result);
cmdList.cmdQImmediate = commandQueue; cmdList.cmdQImmediate = commandQueue;
auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock<FamilyType>();
csr.logicalStateHelper.reset(mockCsrLogicalStateHelper);
ze_group_count_t groupCount{1, 1, 1}; ze_group_count_t groupCount{1, 1, 1};
kernel.descriptor.kernelAttributes.flags.usesAssert = true; kernel.descriptor.kernelAttributes.flags.usesAssert = true;
@@ -296,9 +292,6 @@ HWTEST2_F(CommandListImmediateWithAssert, givenKernelWithAssertWhenAppendedToSyn
auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result); auto commandQueue = CommandQueue::create(productFamily, device, &csr, &desc, cmdList.isCopyOnly(), false, false, result);
cmdList.cmdQImmediate = commandQueue; cmdList.cmdQImmediate = commandQueue;
auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock<FamilyType>();
csr.logicalStateHelper.reset(mockCsrLogicalStateHelper);
ze_group_count_t groupCount{1, 1, 1}; ze_group_count_t groupCount{1, 1, 1};
kernel.descriptor.kernelAttributes.flags.usesAssert = true; kernel.descriptor.kernelAttributes.flags.usesAssert = true;

View File

@@ -82,20 +82,6 @@ TEST_F(ContextCommandListCreate, givenInvalidDescWhenCreatingCommandListImmediat
EXPECT_EQ(CommandList::fromHandle(hCommandList), nullptr); EXPECT_EQ(CommandList::fromHandle(hCommandList), nullptr);
} }
HWTEST2_F(ContextCommandListCreate, givenImmediateCmdListWhenGettingLogicalStateHelperThenReturnFromCsr, MatchAny) {
ze_command_queue_desc_t desc = {};
ze_command_list_handle_t hCommandList = {};
ze_result_t result = context->createCommandListImmediate(device, &desc, &hCommandList);
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
auto commandList = static_cast<CommandListCoreFamily<gfxCoreFamily> *>(L0::CommandList::fromHandle(hCommandList));
EXPECT_EQ(whiteboxCast(commandList)->csr->getLogicalStateHelper(), commandList->getLogicalStateHelper());
commandList->destroy();
}
using CommandListCreate = Test<DeviceFixture>; using CommandListCreate = Test<DeviceFixture>;
TEST_F(CommandListCreate, whenCommandListIsCreatedWithInvalidProductFamilyThenFailureIsReturned) { TEST_F(CommandListCreate, whenCommandListIsCreatedWithInvalidProductFamilyThenFailureIsReturned) {

View File

@@ -200,7 +200,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenA
false, false,
false, false,
commandList->getDcFlushRequired(true)}; commandList->getDcFlushRequired(true)};
NEO::EncodeDispatchKernel<FamilyType>::encode(commandContainer, dispatchKernelArgs, commandList->getLogicalStateHelper()); NEO::EncodeDispatchKernel<FamilyType>::encode(commandContainer, dispatchKernelArgs);
auto usedSpaceAfter = commandContainer.getCommandStream()->getUsed(); auto usedSpaceAfter = commandContainer.getCommandStream()->getUsed();
ASSERT_GT(usedSpaceAfter, 0u); ASSERT_GT(usedSpaceAfter, 0u);

View File

@@ -642,7 +642,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenNotEnoughSpaceInCommandStreamWhenA
false, false,
false, false,
commandList->getDcFlushRequired(true)}; commandList->getDcFlushRequired(true)};
EXPECT_THROW(NEO::EncodeDispatchKernel<FamilyType>::encode(commandContainer, dispatchKernelArgs, nullptr), std::exception); EXPECT_THROW(NEO::EncodeDispatchKernel<FamilyType>::encode(commandContainer, dispatchKernelArgs), std::exception);
} }
HWTEST_F(CommandListAppendLaunchKernel, givenInvalidKernelWhenAppendingThenReturnErrorInvalidArgument) { HWTEST_F(CommandListAppendLaunchKernel, givenInvalidKernelWhenAppendingThenReturnErrorInvalidArgument) {

View File

@@ -14,7 +14,6 @@
#include "shared/test/common/mocks/mock_bindless_heaps_helper.h" #include "shared/test/common/mocks/mock_bindless_heaps_helper.h"
#include "shared/test/common/mocks/mock_command_stream_receiver.h" #include "shared/test/common/mocks/mock_command_stream_receiver.h"
#include "shared/test/common/mocks/mock_direct_submission_hw.h" #include "shared/test/common/mocks/mock_direct_submission_hw.h"
#include "shared/test/common/mocks/mock_logical_state_helper.h"
#include "shared/test/common/mocks/ult_device_factory.h" #include "shared/test/common/mocks/ult_device_factory.h"
#include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/hw_test.h"
@@ -360,82 +359,6 @@ HWTEST_F(CommandQueueCreate, given100CmdListsWhenExecutingThenCommandStreamIsNot
commandQueue->destroy(); commandQueue->destroy();
} }
HWTEST2_F(CommandQueueCreate, givenLogicalStateHelperWhenExecutingThenMergeStates, IsAtMostGen12lp) {
const ze_command_queue_desc_t desc = {};
ze_result_t returnValue;
auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock<FamilyType>();
auto mockCmdListLogicalStateHelper = new NEO::LogicalStateHelperMock<FamilyType>();
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily,
device,
neoDevice->getDefaultEngine().commandStreamReceiver,
&desc,
false,
false,
false,
returnValue));
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(commandQueue->getCsr());
ultCsr->logicalStateHelper.reset(mockCsrLogicalStateHelper);
Mock<KernelImp> kernel;
kernel.immutableData.device = device;
auto commandList = std::unique_ptr<L0::ult::CommandList>(whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::RenderCompute, 0u, returnValue)));
commandList->nonImmediateLogicalStateHelper.reset(mockCmdListLogicalStateHelper);
ze_group_count_t dispatchKernelArguments{1, 1, 1};
CmdListKernelLaunchParams launchParams = {};
commandList->appendLaunchKernel(kernel.toHandle(), &dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false);
commandList->close();
ze_command_list_handle_t cmdListHandles = commandList->toHandle();
commandQueue->executeCommandLists(1, &cmdListHandles, nullptr, false);
EXPECT_EQ(1u, mockCsrLogicalStateHelper->mergePipelinedStateCounter);
EXPECT_EQ(mockCmdListLogicalStateHelper, mockCsrLogicalStateHelper->latestInputLogicalStateHelperForMerge);
EXPECT_EQ(0u, mockCmdListLogicalStateHelper->mergePipelinedStateCounter);
commandQueue->destroy();
}
HWTEST2_F(CommandQueueCreate, givenLogicalStateHelperAndImmediateCmdListWhenExecutingThenMergeStates, IsAtMostGen12lp) {
const ze_command_queue_desc_t desc = {};
ze_result_t returnValue;
auto mockCsrLogicalStateHelper = new NEO::LogicalStateHelperMock<FamilyType>();
auto commandQueue = whiteboxCast(CommandQueue::create(productFamily,
device,
neoDevice->getDefaultEngine().commandStreamReceiver,
&desc,
false,
false,
true,
returnValue));
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(commandQueue->getCsr());
ultCsr->logicalStateHelper.reset(mockCsrLogicalStateHelper);
Mock<KernelImp> kernel;
kernel.immutableData.device = device;
auto commandList = std::unique_ptr<L0::ult::CommandList>(whiteboxCast(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::RenderCompute, returnValue)));
ze_group_count_t dispatchKernelArguments{1, 1, 1};
CmdListKernelLaunchParams launchParams = {};
commandList->appendLaunchKernel(kernel.toHandle(), &dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false);
ze_command_list_handle_t cmdListHandles = commandList->toHandle();
commandQueue->executeCommandLists(1, &cmdListHandles, nullptr, false);
EXPECT_EQ(0u, mockCsrLogicalStateHelper->mergePipelinedStateCounter);
EXPECT_EQ(nullptr, mockCsrLogicalStateHelper->latestInputLogicalStateHelperForMerge);
commandQueue->destroy();
}
HWTEST2_F(CommandQueueCreate, givenOutOfHostMemoryErrorFromSubmitBatchBufferWhenExecutingCommandListsThenOutOfHostMemoryIsReturned, IsAtLeastSkl) { HWTEST2_F(CommandQueueCreate, givenOutOfHostMemoryErrorFromSubmitBatchBufferWhenExecutingCommandListsThenOutOfHostMemoryIsReturned, IsAtLeastSkl) {
const ze_command_queue_desc_t desc = {}; const ze_command_queue_desc_t desc = {};
auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc); auto commandQueue = new MockCommandQueueHw<gfxCoreFamily>(device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc);

View File

@@ -291,7 +291,6 @@ using CommandQueueCommandsMultiTile = CommandQueueCommands<true>;
HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandListsThenHardwareContextIsProgrammedAndGlobalAllocationResident) { HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandListsThenHardwareContextIsProgrammedAndGlobalAllocationResident) {
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
csr.createKernelArgsBufferAllocation();
csr.initializeTagAllocation(); csr.initializeTagAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext); csr.setupContext(*neoDevice->getDefaultEngine().osContext);
@@ -321,37 +320,6 @@ HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandLi
commandQueue->destroy(); commandQueue->destroy();
} }
HWTEST_F(CommandQueueCommandsSingleTile, givenCommandQueueWhenExecutingCommandListsThenKernelArgBufferAllocationIsResident) {
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
csr.createKernelArgsBufferAllocation();
csr.initializeTagAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext);
ze_result_t returnValue;
L0::CommandQueue *commandQueue = CommandQueue::create(productFamily,
device,
&csr,
&desc,
true,
false,
false,
returnValue);
ASSERT_NE(nullptr, commandQueue);
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, 0u, returnValue));
auto commandListHandle = commandList->toHandle();
commandList->close();
auto status = commandQueue->executeCommandLists(1, &commandListHandle, nullptr, false);
auto kernelArgsBufferAllocation = csr.getKernelArgsBufferAllocation();
if (kernelArgsBufferAllocation) {
EXPECT_TRUE(isAllocationInResidencyContainer(csr, kernelArgsBufferAllocation));
}
EXPECT_EQ(status, ZE_RESULT_SUCCESS);
commandQueue->destroy();
}
HWTEST2_F(CommandQueueCommandsMultiTile, givenCommandQueueOnMultiTileWhenExecutingCommandListsThenWorkPartitionAllocationIsMadeResident, IsAtLeastXeHpCore) { HWTEST2_F(CommandQueueCommandsMultiTile, givenCommandQueueOnMultiTileWhenExecutingCommandListsThenWorkPartitionAllocationIsMadeResident, IsAtLeastXeHpCore) {
DebugManagerStateRestore restorer; DebugManagerStateRestore restorer;
DebugManager.flags.EnableWalkerPartition.set(1); DebugManager.flags.EnableWalkerPartition.set(1);
@@ -371,7 +339,6 @@ HWTEST2_F(CommandQueueCommandsMultiTile, givenCommandQueueOnMultiTileWhenExecuti
MyCsrMock csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); MyCsrMock csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
EXPECT_EQ(2u, csr.activePartitions); EXPECT_EQ(2u, csr.activePartitions);
csr.initializeTagAllocation(); csr.initializeTagAllocation();
csr.createKernelArgsBufferAllocation();
csr.createWorkPartitionAllocation(*neoDevice); csr.createWorkPartitionAllocation(*neoDevice);
csr.setupContext(*neoDevice->getDefaultEngine().osContext); csr.setupContext(*neoDevice->getDefaultEngine().osContext);
@@ -433,7 +400,6 @@ HWTEST_F(CommandQueueIndirectAllocations, givenDebugModeToTreatIndirectAllocatio
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
csr.initializeTagAllocation(); csr.initializeTagAllocation();
csr.createKernelArgsBufferAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext); csr.setupContext(*neoDevice->getDefaultEngine().osContext);
if (device->getNEODevice()->getPreemptionMode() == PreemptionMode::MidThread) { if (device->getNEODevice()->getPreemptionMode() == PreemptionMode::MidThread) {
csr.createPreemptionAllocation(); csr.createPreemptionAllocation();
@@ -498,7 +464,6 @@ HWTEST_F(CommandQueueIndirectAllocations, givenDeviceThatSupportsSubmittingIndir
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
csr.initializeTagAllocation(); csr.initializeTagAllocation();
csr.createKernelArgsBufferAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext); csr.setupContext(*neoDevice->getDefaultEngine().osContext);
if (device->getNEODevice()->getPreemptionMode() == PreemptionMode::MidThread) { if (device->getNEODevice()->getPreemptionMode() == PreemptionMode::MidThread) {
csr.createPreemptionAllocation(); csr.createPreemptionAllocation();

View File

@@ -731,7 +731,6 @@ HWTEST_F(ContextMakeMemoryResidentAndMigrationTests,
const ze_command_queue_desc_t desc = {}; const ze_command_queue_desc_t desc = {};
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
csr.initializeTagAllocation(); csr.initializeTagAllocation();
csr.createKernelArgsBufferAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext); csr.setupContext(*neoDevice->getDefaultEngine().osContext);
ze_result_t returnValue; ze_result_t returnValue;
@@ -784,7 +783,6 @@ HWTEST2_F(ContextMakeMemoryResidentAndMigrationTests,
const ze_command_queue_desc_t desc = {}; const ze_command_queue_desc_t desc = {};
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
csr.initializeTagAllocation(); csr.initializeTagAllocation();
csr.createKernelArgsBufferAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext); csr.setupContext(*neoDevice->getDefaultEngine().osContext);
ze_result_t returnValue; ze_result_t returnValue;
@@ -834,7 +832,6 @@ HWTEST_F(ContextMakeMemoryResidentAndMigrationTests,
const ze_command_queue_desc_t desc = {}; const ze_command_queue_desc_t desc = {};
MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield()); MockCsrHw2<FamilyType> csr(*neoDevice->getExecutionEnvironment(), 0, neoDevice->getDeviceBitfield());
csr.initializeTagAllocation(); csr.initializeTagAllocation();
csr.createKernelArgsBufferAllocation();
csr.setupContext(*neoDevice->getDefaultEngine().osContext); csr.setupContext(*neoDevice->getDefaultEngine().osContext);
ze_result_t returnValue; ze_result_t returnValue;

View File

@@ -12,7 +12,6 @@
#include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_csr.h"
#include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_execution_environment.h"
#include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/common/mocks/mock_graphics_allocation.h"
#include "shared/test/common/mocks/mock_logical_state_helper.h"
#include "shared/test/common/mocks/mock_timestamp_container.h" #include "shared/test/common/mocks/mock_timestamp_container.h"
#include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/hw_test.h"
#include "shared/test/common/test_macros/test_checks_shared.h" #include "shared/test/common/test_macros/test_checks_shared.h"
@@ -64,67 +63,6 @@ HWTEST_F(EnqueueHandlerTest, GivenCommandStreamWithoutKernelWhenCommandEnqueuedT
EXPECT_EQ(allocation->getTaskCount(mockCmdQ->getGpgpuCommandStreamReceiver().getOsContext().getContextId()), 1u); EXPECT_EQ(allocation->getTaskCount(mockCmdQ->getGpgpuCommandStreamReceiver().getOsContext().getContextId()), 1u);
} }
HWTEST_F(EnqueueHandlerTest, givenLogicalStateHelperWhenDispatchingCommandsThenAddLastCommand) {
using MI_NOOP = typename FamilyType::MI_NOOP;
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context, pClDevice, nullptr);
auto logicalStateHelper = new LogicalStateHelperMock<FamilyType>();
logicalStateHelper->makeFakeStreamWrite = true;
auto &ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> &>(mockCmdQ->getGpgpuCommandStreamReceiver());
ultCsr.logicalStateHelper.reset(logicalStateHelper);
auto surface = std::make_unique<NullSurface>();
EventsRequest eventsRequest(0, nullptr, nullptr);
EventBuilder eventBuilder;
Surface *surfaces[] = {surface.get()};
bool blocking = true;
TimestampPacketDependencies timestampPacketDependencies;
CsrDependencies csrDeps;
EnqueueProperties enqueueProperties(false, false, false, true, false, nullptr);
EXPECT_EQ(0u, logicalStateHelper->writeStreamInlineCalledCounter);
mockCmdQ->enqueueCommandWithoutKernel(surfaces, 1, &mockCmdQ->getCS(0), 0, blocking, enqueueProperties, timestampPacketDependencies,
eventsRequest, eventBuilder, 0, csrDeps, nullptr, false);
EXPECT_EQ(1u, logicalStateHelper->writeStreamInlineCalledCounter);
HardwareParse cmdParser;
cmdParser.parseCommands<FamilyType>(ultCsr.commandStream);
auto miNoop = find<MI_NOOP *>(cmdParser.cmdList.begin(), cmdParser.cmdList.end());
bool miNoopFound = false;
uint32_t cmdsAfterNoop = 0;
while (miNoop != cmdParser.cmdList.end()) {
auto miNoopCmd = genCmdCast<MI_NOOP *>(*miNoop);
if (miNoopCmd->getIdentificationNumber() == 0x123) {
miNoopFound = true;
break;
}
miNoop = find<MI_NOOP *>(++miNoop, cmdParser.cmdList.end());
}
miNoop++;
while (miNoop != cmdParser.cmdList.end()) {
auto miNoopCmd = genCmdCast<MI_NOOP *>(*miNoop);
if (miNoopCmd == nullptr) {
cmdsAfterNoop++;
}
miNoop++;
}
EXPECT_TRUE(miNoopFound);
EXPECT_EQ(1u, cmdsAfterNoop);
}
template <bool enabled> template <bool enabled>
struct EnqueueHandlerTimestampTest : public EnqueueHandlerTest { struct EnqueueHandlerTimestampTest : public EnqueueHandlerTest {
void SetUp() override { void SetUp() override {

View File

@@ -790,7 +790,6 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenEnqueueK
// Three more surfaces from preemptionAllocation, SipKernel and clearColorAllocation // Three more surfaces from preemptionAllocation, SipKernel and clearColorAllocation
size_t csrSurfaceCount = (pDevice->getPreemptionMode() == PreemptionMode::MidThread) ? 2 : 0; size_t csrSurfaceCount = (pDevice->getPreemptionMode() == PreemptionMode::MidThread) ? 2 : 0;
csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1; csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1;
csrSurfaceCount += mockCsr->getKernelArgsBufferAllocation() ? 1 : 0;
size_t timestampPacketSurfacesCount = mockCsr->peekTimestampPacketWriteEnabled() ? 1 : 0; size_t timestampPacketSurfacesCount = mockCsr->peekTimestampPacketWriteEnabled() ? 1 : 0;
size_t fenceSurfaceCount = mockCsr->globalFenceAllocation ? 1 : 0; size_t fenceSurfaceCount = mockCsr->globalFenceAllocation ? 1 : 0;
size_t clearColorSize = mockCsr->clearColorAllocation ? 1 : 0; size_t clearColorSize = mockCsr->clearColorAllocation ? 1 : 0;

View File

@@ -1002,7 +1002,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBothCsWhenFlushingTaskThenFlu
CommandStreamReceiverHwLog<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); CommandStreamReceiverHwLog<FamilyType> commandStreamReceiver(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
commandStreamReceiver.setupContext(*pDevice->getDefaultEngine().osContext); commandStreamReceiver.setupContext(*pDevice->getDefaultEngine().osContext);
commandStreamReceiver.initializeTagAllocation(); commandStreamReceiver.initializeTagAllocation();
commandStreamReceiver.createKernelArgsBufferAllocation();
commandStreamReceiver.createPreemptionAllocation(); commandStreamReceiver.createPreemptionAllocation();
commandStream.getSpace(sizeof(typename FamilyType::MI_NOOP)); commandStream.getSpace(sizeof(typename FamilyType::MI_NOOP));

View File

@@ -77,7 +77,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas
csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1; csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1;
csrSurfaceCount += mockCsr->globalFenceAllocation ? 1 : 0; csrSurfaceCount += mockCsr->globalFenceAllocation ? 1 : 0;
csrSurfaceCount += mockCsr->clearColorAllocation ? 1 : 0; csrSurfaceCount += mockCsr->clearColorAllocation ? 1 : 0;
csrSurfaceCount += mockCsr->getKernelArgsBufferAllocation() ? 1 : 0;
// we should have 3 heaps, tag allocation and csr command stream + cq // we should have 3 heaps, tag allocation and csr command stream + cq
EXPECT_EQ(5u + csrSurfaceCount, cmdBuffer->surfaces.size()); EXPECT_EQ(5u + csrSurfaceCount, cmdBuffer->surfaces.size());
@@ -903,7 +902,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTotalRes
} }
mockCsr->initializeTagAllocation(); mockCsr->initializeTagAllocation();
mockCsr->createKernelArgsBufferAllocation();
mockCsr->useNewResourceImplicitFlush = false; mockCsr->useNewResourceImplicitFlush = false;
mockCsr->useGpuIdleImplicitFlush = false; mockCsr->useGpuIdleImplicitFlush = false;
mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch); mockCsr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);

View File

@@ -626,7 +626,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandStreamReceiverFlushTaskXeHPAndLaterTests, gi
csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1; csrSurfaceCount -= pDevice->getHardwareInfo().capabilityTable.supportsImages ? 0 : 1;
csrSurfaceCount += mockCsr->globalFenceAllocation ? 1 : 0; csrSurfaceCount += mockCsr->globalFenceAllocation ? 1 : 0;
csrSurfaceCount += mockCsr->clearColorAllocation ? 1 : 0; csrSurfaceCount += mockCsr->clearColorAllocation ? 1 : 0;
csrSurfaceCount += mockCsr->getKernelArgsBufferAllocation() ? 1 : 0;
EXPECT_EQ(4u + csrSurfaceCount, cmdBuffer->surfaces.size()); EXPECT_EQ(4u + csrSurfaceCount, cmdBuffer->surfaces.size());

View File

@@ -11,7 +11,6 @@
#include "shared/source/helpers/blit_commands_helper.h" #include "shared/source/helpers/blit_commands_helper.h"
#include "shared/source/helpers/constants.h" #include "shared/source/helpers/constants.h"
#include "shared/source/helpers/definitions/command_encoder_args.h" #include "shared/source/helpers/definitions/command_encoder_args.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/os_interface/device_factory.h" #include "shared/source/os_interface/device_factory.h"
#include "shared/source/os_interface/product_helper.h" #include "shared/source/os_interface/product_helper.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/debug_manager_state_restore.h"
@@ -474,11 +473,6 @@ HWTEST_F(UltCommandStreamReceiverTest, givenMultiplePartitionsWhenCallingWaitKmd
EXPECT_EQ(2u, commandStreamReceiver.waitForCompletionWithTimeoutTaskCountCalled); EXPECT_EQ(2u, commandStreamReceiver.waitForCompletionWithTimeoutTaskCountCalled);
} }
HWTEST_F(UltCommandStreamReceiverTest, whenCreatingThenDontCreateLogicalStateHelper) {
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
EXPECT_EQ(nullptr, commandStreamReceiver.logicalStateHelper.get());
}
typedef UltCommandStreamReceiverTest CommandStreamReceiverFlushTests; typedef UltCommandStreamReceiverTest CommandStreamReceiverFlushTests;
HWTEST_F(CommandStreamReceiverFlushTests, WhenAddingBatchBufferEndThenBatchBufferEndIsAppendedCorrectly) { HWTEST_F(CommandStreamReceiverFlushTests, WhenAddingBatchBufferEndThenBatchBufferEndIsAppendedCorrectly) {

View File

@@ -13,7 +13,6 @@
#include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/helpers/cache_policy.h" #include "shared/source/helpers/cache_policy.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/preamble.h" #include "shared/source/helpers/preamble.h"
#include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/graphics_allocation.h"
#include "shared/test/common/helpers/dispatch_flags_helper.h" #include "shared/test/common/helpers/dispatch_flags_helper.h"
@@ -158,16 +157,6 @@ struct UltCommandStreamReceiverTest
commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(0, GrfConfig::DefaultGrfNumber, commandStreamReceiver.streamProperties.stateComputeMode.setPropertiesAll(0, GrfConfig::DefaultGrfNumber,
gfxCoreHelper.getDefaultThreadArbitrationPolicy(), pDevice->getPreemptionMode()); gfxCoreHelper.getDefaultThreadArbitrationPolicy(), pDevice->getPreemptionMode());
commandStreamReceiver.streamProperties.frontEndState.setPropertiesAll(false, false, false, -1); commandStreamReceiver.streamProperties.frontEndState.setPropertiesAll(false, false, false, -1);
auto logicalStateHelper = commandStreamReceiver.getLogicalStateHelper();
if (logicalStateHelper) {
uint8_t buffer[512] = {};
LinearStream tempStream(buffer, sizeof(buffer));
EncodeKernelArgsBuffer<GfxFamily>::encodeKernelArgsBufferCmds(commandStreamReceiver.getKernelArgsBufferAllocation(), logicalStateHelper);
logicalStateHelper->writeStreamInline(tempStream, false);
}
} }
template <typename GfxFamily> template <typename GfxFamily>

View File

@@ -36,7 +36,7 @@ HWTEST2_F(PreambleCfeStateDg2AndLater, whenprogramVFEStateIsCalledWithProperAddi
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute);
StreamProperties properties{}; StreamProperties properties{};
properties.frontEndState.disableOverdispatch.value = 1; properties.frontEndState.disableOverdispatch.value = 1;
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, properties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, properties);
parseCommands<FamilyType>(linearStream); parseCommands<FamilyType>(linearStream);
auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end()); auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), cfeStateIt); ASSERT_NE(cmdList.end(), cfeStateIt);
@@ -46,7 +46,7 @@ HWTEST2_F(PreambleCfeStateDg2AndLater, whenprogramVFEStateIsCalledWithProperAddi
cmdList.clear(); cmdList.clear();
pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute); pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, hwInfo, EngineGroupType::RenderCompute);
properties.frontEndState.disableOverdispatch.value = 0; properties.frontEndState.disableOverdispatch.value = 0;
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, properties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, 0, 0, properties);
parseCommands<FamilyType>(linearStream); parseCommands<FamilyType>(linearStream);
cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end()); cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end());
cfeStateIt++; cfeStateIt++;
@@ -67,7 +67,7 @@ HWTEST2_F(PreambleCfeStateDg2AndLater, givenSetDebugFlagWhenPreambleCfeStateIsPr
uint64_t expectedAddress = 1 << CFE_STATE::SCRATCHSPACEBUFFER_BIT_SHIFT; uint64_t expectedAddress = 1 << CFE_STATE::SCRATCHSPACEBUFFER_BIT_SHIFT;
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute);
StreamProperties emptyProperties{}; StreamProperties emptyProperties{};
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties);
parseCommands<FamilyType>(linearStream); parseCommands<FamilyType>(linearStream);
auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end()); auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end());

View File

@@ -146,7 +146,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, PreambleCfeStateXeHPAndLater, givenScratchEnabledWh
uint32_t expectedMaxThreads = GfxCoreHelper::getMaxThreadsForVfe(*defaultHwInfo); uint32_t expectedMaxThreads = GfxCoreHelper::getMaxThreadsForVfe(*defaultHwInfo);
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute);
StreamProperties emptyProperties{}; StreamProperties emptyProperties{};
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties);
parseCommands<FamilyType>(linearStream); parseCommands<FamilyType>(linearStream);
@@ -180,7 +180,7 @@ HWTEST2_F(PreambleCfeStateXeHPAndLater, givenNotSetDebugFlagWhenPreambleCfeState
uint32_t expectedMaxThreads = GfxCoreHelper::getMaxThreadsForVfe(*defaultHwInfo); uint32_t expectedMaxThreads = GfxCoreHelper::getMaxThreadsForVfe(*defaultHwInfo);
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute);
StreamProperties emptyProperties{}; StreamProperties emptyProperties{};
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, expectedMaxThreads, emptyProperties);
uint32_t maximumNumberOfThreads = cfeState->getMaximumNumberOfThreads(); uint32_t maximumNumberOfThreads = cfeState->getMaximumNumberOfThreads();
if constexpr (TestTraits<gfxCoreFamily>::numberOfWalkersInCfeStateSupported) { if constexpr (TestTraits<gfxCoreFamily>::numberOfWalkersInCfeStateSupported) {
@@ -211,7 +211,7 @@ HWTEST2_F(PreambleCfeStateXeHPAndLater, givenSetDebugFlagWhenPreambleCfeStateIsP
uint64_t expectedAddress = 1 << CFE_STATE::SCRATCHSPACEBUFFER_BIT_SHIFT; uint64_t expectedAddress = 1 << CFE_STATE::SCRATCHSPACEBUFFER_BIT_SHIFT;
auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute); auto pVfeCmd = PreambleHelper<FamilyType>::getSpaceForVfeState(&linearStream, *defaultHwInfo, EngineGroupType::RenderCompute);
StreamProperties emptyProperties{}; StreamProperties emptyProperties{};
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, pDevice->getRootDeviceEnvironment(), 0u, expectedAddress, 16u, emptyProperties);
parseCommands<FamilyType>(linearStream); parseCommands<FamilyType>(linearStream);
auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end()); auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end());

View File

@@ -506,7 +506,6 @@ class CommandStreamReceiverMock : public CommandStreamReceiver {
SubmissionStatus flushTagUpdate() override { return SubmissionStatus::SUCCESS; }; SubmissionStatus flushTagUpdate() override { return SubmissionStatus::SUCCESS; };
void updateTagFromWait() override{}; void updateTagFromWait() override{};
bool isUpdateTagFromWaitEnabled() override { return false; }; bool isUpdateTagFromWaitEnabled() override { return false; };
void createKernelArgsBufferAllocation() override {}
bool isMultiOsContextCapable() const override { return false; } bool isMultiOsContextCapable() const override { return false; }

View File

@@ -12,7 +12,6 @@
#include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/aligned_memory.h"
#include "shared/source/helpers/constants.h" #include "shared/source/helpers/constants.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/ptr_math.h"
#include "shared/source/helpers/timestamp_packet.h" #include "shared/source/helpers/timestamp_packet.h"
#include "shared/source/os_interface/linux/allocator_helper.h" #include "shared/source/os_interface/linux/allocator_helper.h"
@@ -485,9 +484,6 @@ HWTEST_F(ClDrmMemoryManagerTest, givenDrmMemoryManagerWhenTiledImageIsBeingCreat
MockContext context(pClDevice); MockContext context(pClDevice);
auto testedCsr = static_cast<TestedDrmCommandStreamReceiver<FamilyType> *>(context.getSpecialQueue(rootDeviceIndex)->getGpgpuEngine().commandStreamReceiver);
testedCsr->logicalStateHelper.reset(LogicalStateHelper::create<FamilyType>());
cl_image_format imageFormat; cl_image_format imageFormat;
imageFormat.image_channel_data_type = CL_UNORM_INT8; imageFormat.image_channel_data_type = CL_UNORM_INT8;
imageFormat.image_channel_order = CL_R; imageFormat.image_channel_order = CL_R;

View File

@@ -329,7 +329,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndDisabledFusedEuWhenCfeStateProgrammedThe
StreamProperties streamProperties{}; StreamProperties streamProperties{};
streamProperties.initSupport(rootDeviceEnvironment); streamProperties.initSupport(rootDeviceEnvironment);
streamProperties.frontEndState.setPropertiesAll(false, false, false, false); streamProperties.frontEndState.setPropertiesAll(false, false, false, false);
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties);
parseCommands<FamilyType>(linearStream); parseCommands<FamilyType>(linearStream);
auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end()); auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), cfeStateIt); ASSERT_NE(cmdList.end(), cfeStateIt);
@@ -352,7 +352,7 @@ HWTEST2_F(PreambleCfeState, givenXehpEnabledFusedEuAndDisableFusedDispatchFromKe
StreamProperties streamProperties{}; StreamProperties streamProperties{};
streamProperties.initSupport(rootDeviceEnvironment); streamProperties.initSupport(rootDeviceEnvironment);
streamProperties.frontEndState.setPropertiesAll(false, true, false, false); streamProperties.frontEndState.setPropertiesAll(false, true, false, false);
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties);
parseCommands<FamilyType>(linearStream); parseCommands<FamilyType>(linearStream);
auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end()); auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), cfeStateIt); ASSERT_NE(cmdList.end(), cfeStateIt);
@@ -372,7 +372,7 @@ HWTEST2_F(PreambleCfeState, givenXehpAndEnabledFusedEuWhenCfeStateProgrammedThen
StreamProperties streamProperties{}; StreamProperties streamProperties{};
streamProperties.initSupport(rootDeviceEnvironment); streamProperties.initSupport(rootDeviceEnvironment);
streamProperties.frontEndState.setPropertiesAll(false, false, false, false); streamProperties.frontEndState.setPropertiesAll(false, false, false, false);
PreambleHelper<FamilyType>::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties, nullptr); PreambleHelper<FamilyType>::programVfeState(pVfeCmd, rootDeviceEnvironment, 0u, 0, 0, streamProperties);
parseCommands<FamilyType>(linearStream); parseCommands<FamilyType>(linearStream);
auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end()); auto cfeStateIt = find<CFE_STATE *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), cfeStateIt); ASSERT_NE(cmdList.end(), cfeStateIt);

View File

@@ -25,7 +25,6 @@ class BindlessHeapsHelper;
class Gmm; class Gmm;
class GmmHelper; class GmmHelper;
class IndirectHeap; class IndirectHeap;
class LogicalStateHelper;
class ProductHelper; class ProductHelper;
struct DeviceInfo; struct DeviceInfo;
@@ -94,7 +93,7 @@ struct EncodeDispatchKernel {
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA; using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE; using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE;
static void encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper); static void encode(CommandContainer &container, EncodeDispatchKernelArgs &args);
static void encodeAdditionalWalkerFields(const RootDeviceEnvironment &rootDeviceEnvironment, WALKER_TYPE &walkerCmd, const EncodeWalkerArgs &walkerArgs); static void encodeAdditionalWalkerFields(const RootDeviceEnvironment &rootDeviceEnvironment, WALKER_TYPE &walkerCmd, const EncodeWalkerArgs &walkerArgs);
@@ -357,8 +356,8 @@ struct EncodeComputeMode {
static size_t getCmdSizeForComputeMode(const RootDeviceEnvironment &rootDeviceEnvironment, bool hasSharedHandles, bool isRcs); static size_t getCmdSizeForComputeMode(const RootDeviceEnvironment &rootDeviceEnvironment, bool hasSharedHandles, bool isRcs);
static void programComputeModeCommandWithSynchronization(LinearStream &csr, StateComputeModeProperties &properties, static void programComputeModeCommandWithSynchronization(LinearStream &csr, StateComputeModeProperties &properties,
const PipelineSelectArgs &args, bool hasSharedHandles, const PipelineSelectArgs &args, bool hasSharedHandles,
const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush, LogicalStateHelper *logicalStateHelper); const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush);
static void programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper); static void programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment);
static void adjustPipelineSelect(CommandContainer &container, const NEO::KernelDescriptor &kernelDescriptor); static void adjustPipelineSelect(CommandContainer &container, const NEO::KernelDescriptor &kernelDescriptor);
}; };
@@ -564,14 +563,7 @@ template <typename GfxFamily>
struct EncodeMemoryFence { struct EncodeMemoryFence {
static size_t getSystemMemoryFenceSize(); static size_t getSystemMemoryFenceSize();
static void encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation, LogicalStateHelper *logicalStateHelper); static void encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation);
};
template <typename GfxFamily>
struct EncodeKernelArgsBuffer {
static size_t getKernelArgsBufferCmdsSize(const GraphicsAllocation *kernelArgsBufferAllocation, LogicalStateHelper *logicalStateHelper);
static void encodeKernelArgsBufferCmds(const GraphicsAllocation *kernelArgsBufferAllocation, LogicalStateHelper *logicalStateHelper);
}; };
template <typename GfxFamily> template <typename GfxFamily>

View File

@@ -1094,17 +1094,9 @@ size_t EncodeMemoryFence<Family>::getSystemMemoryFenceSize() {
} }
template <typename Family> template <typename Family>
void EncodeMemoryFence<Family>::encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation, LogicalStateHelper *logicalStateHelper) { void EncodeMemoryFence<Family>::encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation) {
} }
template <typename Family>
size_t EncodeKernelArgsBuffer<Family>::getKernelArgsBufferCmdsSize(const GraphicsAllocation *kernelArgsBufferAllocation, LogicalStateHelper *logicalStateHelper) {
return 0;
}
template <typename Family>
void EncodeKernelArgsBuffer<Family>::encodeKernelArgsBufferCmds(const GraphicsAllocation *kernelArgsBufferAllocation, LogicalStateHelper *logicalStateHelper) {}
template <typename Family> template <typename Family>
void EncodeMiPredicate<Family>::encode(LinearStream &cmdStream, [[maybe_unused]] MiPredicateType predicateType) { void EncodeMiPredicate<Family>::encode(LinearStream &cmdStream, [[maybe_unused]] MiPredicateType predicateType) {
if constexpr (Family::isUsingMiSetPredicate) { if constexpr (Family::isUsingMiSetPredicate) {

View File

@@ -47,7 +47,7 @@ void EncodeDispatchKernel<Family>::setGrfInfo(INTERFACE_DESCRIPTOR_DATA *pInterf
} }
template <typename Family> template <typename Family>
void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper) { void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDispatchKernelArgs &args) {
using MEDIA_STATE_FLUSH = typename Family::MEDIA_STATE_FLUSH; using MEDIA_STATE_FLUSH = typename Family::MEDIA_STATE_FLUSH;
using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD; using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2021-2022 Intel Corporation * Copyright (C) 2021-2023 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -18,7 +18,7 @@ size_t EncodeMemoryFence<Family>::getSystemMemoryFenceSize() {
} }
template <> template <>
void EncodeMemoryFence<Family>::encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation, LogicalStateHelper *logicalStateHelper) { void EncodeMemoryFence<Family>::encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation) {
using STATE_SYSTEM_MEM_FENCE_ADDRESS = typename Family::STATE_SYSTEM_MEM_FENCE_ADDRESS; using STATE_SYSTEM_MEM_FENCE_ADDRESS = typename Family::STATE_SYSTEM_MEM_FENCE_ADDRESS;
auto stateSystemFenceAddressSpace = commandStream.getSpaceForCmd<STATE_SYSTEM_MEM_FENCE_ADDRESS>(); auto stateSystemFenceAddressSpace = commandStream.getSpaceForCmd<STATE_SYSTEM_MEM_FENCE_ADDRESS>();

View File

@@ -43,7 +43,7 @@ void EncodeDispatchKernel<Family>::setGrfInfo(INTERFACE_DESCRIPTOR_DATA *pInterf
} }
template <typename Family> template <typename Family>
void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDispatchKernelArgs &args, LogicalStateHelper *logicalStateHelper) { void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDispatchKernelArgs &args) {
using SHARED_LOCAL_MEMORY_SIZE = typename Family::INTERFACE_DESCRIPTOR_DATA::SHARED_LOCAL_MEMORY_SIZE; using SHARED_LOCAL_MEMORY_SIZE = typename Family::INTERFACE_DESCRIPTOR_DATA::SHARED_LOCAL_MEMORY_SIZE;
using STATE_BASE_ADDRESS = typename Family::STATE_BASE_ADDRESS; using STATE_BASE_ADDRESS = typename Family::STATE_BASE_ADDRESS;
using INLINE_DATA = typename Family::INLINE_DATA; using INLINE_DATA = typename Family::INLINE_DATA;
@@ -631,7 +631,7 @@ size_t EncodeStateBaseAddress<Family>::getRequiredSizeForStateBaseAddress(Device
} }
template <typename Family> template <typename Family>
void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) {
using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE; using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE;
using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT; using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT;

View File

@@ -14,9 +14,9 @@ namespace NEO {
template <typename Family> template <typename Family>
inline void EncodeComputeMode<Family>::programComputeModeCommandWithSynchronization( inline void EncodeComputeMode<Family>::programComputeModeCommandWithSynchronization(
LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args, LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args,
bool hasSharedHandles, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush, LogicalStateHelper *logicalStateHelper) { bool hasSharedHandles, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush) {
EncodeComputeMode<Family>::programComputeModeCommand(csr, properties, rootDeviceEnvironment, nullptr); EncodeComputeMode<Family>::programComputeModeCommand(csr, properties, rootDeviceEnvironment);
} }
template <typename Family> template <typename Family>

View File

@@ -8,7 +8,6 @@
#pragma once #pragma once
#include "shared/source/command_container/command_encoder.h" #include "shared/source/command_container/command_encoder.h"
#include "shared/source/command_stream/linear_stream.h" #include "shared/source/command_stream/linear_stream.h"
#include "shared/source/helpers/logical_state_helper.h"
namespace NEO { namespace NEO {
@@ -37,7 +36,7 @@ size_t EncodeComputeMode<Family>::getCmdSizeForComputeMode(const RootDeviceEnvir
template <typename Family> template <typename Family>
inline void EncodeComputeMode<Family>::programComputeModeCommandWithSynchronization( inline void EncodeComputeMode<Family>::programComputeModeCommandWithSynchronization(
LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args, LinearStream &csr, StateComputeModeProperties &properties, const PipelineSelectArgs &args,
bool hasSharedHandles, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush, LogicalStateHelper *logicalStateHelper) { bool hasSharedHandles, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush) {
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
NEO::EncodeWA<Family>::encodeAdditionalPipelineSelect(csr, args, true, rootDeviceEnvironment, isRcs); NEO::EncodeWA<Family>::encodeAdditionalPipelineSelect(csr, args, true, rootDeviceEnvironment, isRcs);
auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper(); auto *releaseHelper = rootDeviceEnvironment.getReleaseHelper();
@@ -50,7 +49,7 @@ inline void EncodeComputeMode<Family>::programComputeModeCommandWithSynchronizat
NEO::EncodeWA<Family>::addPipeControlPriorToNonPipelinedStateCommand(csr, args, rootDeviceEnvironment, isRcs); NEO::EncodeWA<Family>::addPipeControlPriorToNonPipelinedStateCommand(csr, args, rootDeviceEnvironment, isRcs);
} }
EncodeComputeMode<Family>::programComputeModeCommand(csr, properties, rootDeviceEnvironment, logicalStateHelper); EncodeComputeMode<Family>::programComputeModeCommand(csr, properties, rootDeviceEnvironment);
if (hasSharedHandles) { if (hasSharedHandles) {
PipeControlArgs args; PipeControlArgs args;

View File

@@ -28,7 +28,6 @@
#include "shared/source/helpers/flat_batch_buffer_helper.h" #include "shared/source/helpers/flat_batch_buffer_helper.h"
#include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/flush_stamp.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/pause_on_gpu_properties.h" #include "shared/source/helpers/pause_on_gpu_properties.h"
#include "shared/source/helpers/ray_tracing_helper.h" #include "shared/source/helpers/ray_tracing_helper.h"
#include "shared/source/helpers/string.h" #include "shared/source/helpers/string.h"
@@ -380,11 +379,6 @@ void CommandStreamReceiver::cleanupResources() {
workPartitionAllocation = nullptr; workPartitionAllocation = nullptr;
} }
if (kernelArgsBufferAllocation) {
getMemoryManager()->freeGraphicsMemory(kernelArgsBufferAllocation);
kernelArgsBufferAllocation = nullptr;
}
if (globalStatelessHeapAllocation) { if (globalStatelessHeapAllocation) {
getMemoryManager()->freeGraphicsMemory(globalStatelessHeapAllocation); getMemoryManager()->freeGraphicsMemory(globalStatelessHeapAllocation);
globalStatelessHeapAllocation = nullptr; globalStatelessHeapAllocation = nullptr;
@@ -1026,10 +1020,6 @@ void CommandStreamReceiver::printTagAddressContent(TaskCountType taskCountToWait
PRINT_DEBUG_STRING(true, stdout, "%s", "\n"); PRINT_DEBUG_STRING(true, stdout, "%s", "\n");
} }
LogicalStateHelper *CommandStreamReceiver::getLogicalStateHelper() const {
return logicalStateHelper.get();
}
bool CommandStreamReceiver::isTbxMode() const { bool CommandStreamReceiver::isTbxMode() const {
return (getType() == NEO::CommandStreamReceiverType::CSR_TBX || getType() == NEO::CommandStreamReceiverType::CSR_TBX_WITH_AUB); return (getType() == NEO::CommandStreamReceiverType::CSR_TBX || getType() == NEO::CommandStreamReceiverType::CSR_TBX_WITH_AUB);
} }

View File

@@ -50,7 +50,6 @@ class HwPerfCounter;
class HwTimeStamps; class HwTimeStamps;
class GmmHelper; class GmmHelper;
class TagAllocatorBase; class TagAllocatorBase;
class LogicalStateHelper;
class KmdNotifyHelper; class KmdNotifyHelper;
class GfxCoreHelper; class GfxCoreHelper;
class ProductHelper; class ProductHelper;
@@ -185,7 +184,6 @@ class CommandStreamReceiver {
GraphicsAllocation *getGlobalFenceAllocation() const { return globalFenceAllocation; } GraphicsAllocation *getGlobalFenceAllocation() const { return globalFenceAllocation; }
GraphicsAllocation *getWorkPartitionAllocation() const { return workPartitionAllocation; } GraphicsAllocation *getWorkPartitionAllocation() const { return workPartitionAllocation; }
GraphicsAllocation *getGlobalStatelessHeapAllocation() const { return globalStatelessHeapAllocation; } GraphicsAllocation *getGlobalStatelessHeapAllocation() const { return globalStatelessHeapAllocation; }
GraphicsAllocation *getKernelArgsBufferAllocation() const { return kernelArgsBufferAllocation; }
virtual WaitStatus waitForTaskCountWithKmdNotifyFallback(TaskCountType taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, QueueThrottle throttle) = 0; virtual WaitStatus waitForTaskCountWithKmdNotifyFallback(TaskCountType taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, QueueThrottle throttle) = 0;
virtual WaitStatus waitForCompletionWithTimeout(const WaitParams &params, TaskCountType taskCountToWait); virtual WaitStatus waitForCompletionWithTimeout(const WaitParams &params, TaskCountType taskCountToWait);
@@ -216,7 +214,6 @@ class CommandStreamReceiver {
MOCKABLE_VIRTUAL bool createGlobalFenceAllocation(); MOCKABLE_VIRTUAL bool createGlobalFenceAllocation();
MOCKABLE_VIRTUAL bool createPreemptionAllocation(); MOCKABLE_VIRTUAL bool createPreemptionAllocation();
MOCKABLE_VIRTUAL bool createPerDssBackedBuffer(Device &device); MOCKABLE_VIRTUAL bool createPerDssBackedBuffer(Device &device);
virtual void createKernelArgsBufferAllocation() = 0;
[[nodiscard]] MOCKABLE_VIRTUAL std::unique_lock<MutexType> obtainUniqueOwnership(); [[nodiscard]] MOCKABLE_VIRTUAL std::unique_lock<MutexType> obtainUniqueOwnership();
bool peekTimestampPacketWriteEnabled() const { return timestampPacketWriteEnabled; } bool peekTimestampPacketWriteEnabled() const { return timestampPacketWriteEnabled; }
@@ -376,8 +373,6 @@ class CommandStreamReceiver {
return this->dispatchMode; return this->dispatchMode;
} }
LogicalStateHelper *getLogicalStateHelper() const;
bool getPreambleSetFlag() const { bool getPreambleSetFlag() const {
return isPreambleSent; return isPreambleSent;
} }
@@ -457,7 +452,6 @@ class CommandStreamReceiver {
std::unique_ptr<TagAllocatorBase> perfCounterAllocator; std::unique_ptr<TagAllocatorBase> perfCounterAllocator;
std::unique_ptr<TagAllocatorBase> timestampPacketAllocator; std::unique_ptr<TagAllocatorBase> timestampPacketAllocator;
std::unique_ptr<Thread> userPauseConfirmation; std::unique_ptr<Thread> userPauseConfirmation;
std::unique_ptr<LogicalStateHelper> logicalStateHelper;
std::unique_ptr<IndirectHeap> globalStatelessHeap; std::unique_ptr<IndirectHeap> globalStatelessHeap;
ResidencyContainer residencyAllocations; ResidencyContainer residencyAllocations;
@@ -492,7 +486,6 @@ class CommandStreamReceiver {
GraphicsAllocation *perDssBackedBuffer = nullptr; GraphicsAllocation *perDssBackedBuffer = nullptr;
GraphicsAllocation *clearColorAllocation = nullptr; GraphicsAllocation *clearColorAllocation = nullptr;
GraphicsAllocation *workPartitionAllocation = nullptr; GraphicsAllocation *workPartitionAllocation = nullptr;
GraphicsAllocation *kernelArgsBufferAllocation = nullptr;
GraphicsAllocation *globalStatelessHeapAllocation = nullptr; GraphicsAllocation *globalStatelessHeapAllocation = nullptr;
MultiGraphicsAllocation *tagsMultiAllocation = nullptr; MultiGraphicsAllocation *tagsMultiAllocation = nullptr;

View File

@@ -210,7 +210,6 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
bool checkPlatformSupportsGpuIdleImplicitFlush() const; bool checkPlatformSupportsGpuIdleImplicitFlush() const;
void configurePostSyncWriteOffset(); void configurePostSyncWriteOffset();
void unregisterDirectSubmissionFromController(); void unregisterDirectSubmissionFromController();
void createKernelArgsBufferAllocation() override;
void handleFrontEndStateTransition(const DispatchFlags &dispatchFlags); void handleFrontEndStateTransition(const DispatchFlags &dispatchFlags);
void handlePipelineSelectStateTransition(const DispatchFlags &dispatchFlags); void handlePipelineSelectStateTransition(const DispatchFlags &dispatchFlags);
void handleStateBaseAddressStateTransition(const DispatchFlags &dispatchFlags, bool &isStateBaseAddressDirty); void handleStateBaseAddressStateTransition(const DispatchFlags &dispatchFlags, bool &isStateBaseAddressDirty);

View File

@@ -33,7 +33,6 @@
#include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/flush_stamp.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/pause_on_gpu_properties.h" #include "shared/source/helpers/pause_on_gpu_properties.h"
#include "shared/source/helpers/preamble.h" #include "shared/source/helpers/preamble.h"
#include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/ptr_math.h"
@@ -82,8 +81,6 @@ CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(ExecutionEnvironment
timestampPacketWriteEnabled = !!DebugManager.flags.EnableTimestampPacket.get(); timestampPacketWriteEnabled = !!DebugManager.flags.EnableTimestampPacket.get();
} }
logicalStateHelper.reset(LogicalStateHelper::create<GfxFamily>());
createScratchSpaceController(); createScratchSpaceController();
configurePostSyncWriteOffset(); configurePostSyncWriteOffset();
@@ -469,9 +466,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
makeResident(*perDssBackedBuffer); makeResident(*perDssBackedBuffer);
} }
if (!logicalStateHelper) { handleFrontEndStateTransition(dispatchFlags);
handleFrontEndStateTransition(dispatchFlags);
}
auto &commandStreamCSR = this->getCS(getRequiredCmdStreamSizeAligned(dispatchFlags, device)); auto &commandStreamCSR = this->getCS(getRequiredCmdStreamSizeAligned(dispatchFlags, device));
auto commandStreamStartCSR = commandStreamCSR.getUsed(); auto commandStreamStartCSR = commandStreamCSR.getUsed();
@@ -502,8 +497,6 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
programPreemption(commandStreamCSR, dispatchFlags); programPreemption(commandStreamCSR, dispatchFlags);
EncodeKernelArgsBuffer<GfxFamily>::encodeKernelArgsBufferCmds(kernelArgsBufferAllocation, logicalStateHelper.get());
if (dispatchFlags.isStallingCommandsOnNextFlushRequired) { if (dispatchFlags.isStallingCommandsOnNextFlushRequired) {
if (DebugManager.flags.ProgramBarrierInCommandStreamTask.get() == 1) { if (DebugManager.flags.ProgramBarrierInCommandStreamTask.get() == 1) {
programStallingCommandsForBarrier(commandStreamTask, dispatchFlags); programStallingCommandsForBarrier(commandStreamTask, dispatchFlags);
@@ -580,19 +573,11 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
makeResident(*workPartitionAllocation); makeResident(*workPartitionAllocation);
} }
if (kernelArgsBufferAllocation) {
makeResident(*kernelArgsBufferAllocation);
}
auto rtBuffer = device.getRTMemoryBackedBuffer(); auto rtBuffer = device.getRTMemoryBackedBuffer();
if (rtBuffer) { if (rtBuffer) {
makeResident(*rtBuffer); makeResident(*rtBuffer);
} }
if (logicalStateHelper) {
logicalStateHelper->writeStreamInline(commandStreamCSR, false);
}
// If the CSR has work in its CS, flush it before the task // If the CSR has work in its CS, flush it before the task
bool submitTask = commandStreamStartTask != commandStreamTask.getUsed(); bool submitTask = commandStreamStartTask != commandStreamTask.getUsed();
bool submitCSR = (commandStreamStartCSR != commandStreamCSR.getUsed()); bool submitCSR = (commandStreamStartCSR != commandStreamCSR.getUsed());
@@ -735,7 +720,7 @@ void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream
if (this->streamProperties.stateComputeMode.isDirty()) { if (this->streamProperties.stateComputeMode.isDirty()) {
EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization( EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(
stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs, stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs,
hasSharedHandles(), this->peekRootDeviceEnvironment(), isRcs(), this->dcFlushSupport, logicalStateHelper.get()); hasSharedHandles(), this->peekRootDeviceEnvironment(), isRcs(), this->dcFlushSupport);
this->setStateComputeModeDirty(false); this->setStateComputeModeDirty(false);
this->streamProperties.stateComputeMode.clearIsDirty(); this->streamProperties.stateComputeMode.clearIsDirty();
} }
@@ -937,8 +922,6 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
size += TimestampPacketHelper::getRequiredCmdStreamSize<GfxFamily>(dispatchFlags.csrDependencies, false); size += TimestampPacketHelper::getRequiredCmdStreamSize<GfxFamily>(dispatchFlags.csrDependencies, false);
size += TimestampPacketHelper::getRequiredCmdStreamSizeForMultiRootDeviceSyncNodesContainer<GfxFamily>(dispatchFlags.csrDependencies); size += TimestampPacketHelper::getRequiredCmdStreamSizeForMultiRootDeviceSyncNodesContainer<GfxFamily>(dispatchFlags.csrDependencies);
size += EncodeKernelArgsBuffer<GfxFamily>::getKernelArgsBufferCmdsSize(kernelArgsBufferAllocation, logicalStateHelper.get());
if (dispatchFlags.isStallingCommandsOnNextFlushRequired) { if (dispatchFlags.isStallingCommandsOnNextFlushRequired) {
size += getCmdSizeForStallingCommands(dispatchFlags); size += getCmdSizeForStallingCommands(dispatchFlags);
} }
@@ -1007,7 +990,7 @@ inline size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForPreemption(const
template <typename GfxFamily> template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::programStateSip(LinearStream &cmdStream, Device &device) { inline void CommandStreamReceiverHw<GfxFamily>::programStateSip(LinearStream &cmdStream, Device &device) {
if (!this->isStateSipSent) { if (!this->isStateSipSent) {
PreemptionHelper::programStateSip<GfxFamily>(cmdStream, device, logicalStateHelper.get(), this->osContext); PreemptionHelper::programStateSip<GfxFamily>(cmdStream, device, this->osContext);
setSipSentFlag(true); setSipSentFlag(true);
} }
} }
@@ -1015,7 +998,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::programStateSip(LinearStream &cm
template <typename GfxFamily> template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::programPreamble(LinearStream &csr, Device &device, uint32_t &newL3Config) { inline void CommandStreamReceiverHw<GfxFamily>::programPreamble(LinearStream &csr, Device &device, uint32_t &newL3Config) {
if (!this->isPreambleSent) { if (!this->isPreambleSent) {
PreambleHelper<GfxFamily>::programPreamble(&csr, device, newL3Config, this->preemptionAllocation, logicalStateHelper.get()); PreambleHelper<GfxFamily>::programPreamble(&csr, device, newL3Config, this->preemptionAllocation);
this->isPreambleSent = true; this->isPreambleSent = true;
this->lastSentL3Config = newL3Config; this->lastSentL3Config = newL3Config;
} }
@@ -1041,7 +1024,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::programVFEState(LinearStream &cs
auto pVfeState = PreambleHelper<GfxFamily>::getSpaceForVfeState(&csr, hwInfo, engineGroupType); auto pVfeState = PreambleHelper<GfxFamily>::getSpaceForVfeState(&csr, hwInfo, engineGroupType);
PreambleHelper<GfxFamily>::programVfeState( PreambleHelper<GfxFamily>::programVfeState(
pVfeState, peekRootDeviceEnvironment(), requiredScratchSize, getScratchPatchAddress(), pVfeState, peekRootDeviceEnvironment(), requiredScratchSize, getScratchPatchAddress(),
maxFrontEndThreads, streamProperties, logicalStateHelper.get()); maxFrontEndThreads, streamProperties);
auto commandOffset = PreambleHelper<GfxFamily>::getScratchSpaceAddressOffsetForVfeState(&csr, pVfeState); auto commandOffset = PreambleHelper<GfxFamily>::getScratchSpaceAddressOffsetForVfeState(&csr, pVfeState);
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) { if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
@@ -1169,10 +1152,6 @@ TaskCountType CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropert
pageTableManagerInitialized = pageTableManager->initPageTableManagerRegisters(this); pageTableManagerInitialized = pageTableManager->initPageTableManagerRegisters(this);
} }
if (logicalStateHelper) {
logicalStateHelper->writeStreamInline(commandStream, false);
}
if (isRelaxedOrderingDispatch) { if (isRelaxedOrderingDispatch) {
RelaxedOrderingHelper::encodeRegistersBeforeDependencyCheckers<GfxFamily>(commandStream); RelaxedOrderingHelper::encodeRegistersBeforeDependencyCheckers<GfxFamily>(commandStream);
} }
@@ -1583,10 +1562,6 @@ size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForComputeMode() {
return EncodeComputeMode<GfxFamily>::getCmdSizeForComputeMode(this->peekRootDeviceEnvironment(), hasSharedHandles(), isRcs()); return EncodeComputeMode<GfxFamily>::getCmdSizeForComputeMode(this->peekRootDeviceEnvironment(), hasSharedHandles(), isRcs());
} }
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::createKernelArgsBufferAllocation() {
}
template <typename GfxFamily> template <typename GfxFamily>
SubmissionStatus CommandStreamReceiverHw<GfxFamily>::initializeDeviceWithFirstSubmission() { SubmissionStatus CommandStreamReceiverHw<GfxFamily>::initializeDeviceWithFirstSubmission() {
return flushTagUpdate(); return flushTagUpdate();
@@ -1960,8 +1935,7 @@ void CommandStreamReceiverHw<GfxFamily>::dispatchImmediateFlushFrontEndCommand(I
requiredScratchSize, requiredScratchSize,
getScratchPatchAddress(), getScratchPatchAddress(),
device.getDeviceInfo().maxFrontEndThreads, device.getDeviceInfo().maxFrontEndThreads,
this->streamProperties, this->streamProperties);
getLogicalStateHelper());
this->streamProperties.frontEndState.clearIsDirty(); this->streamProperties.frontEndState.clearIsDirty();
} }
} }
@@ -1988,7 +1962,7 @@ void CommandStreamReceiverHw<GfxFamily>::dispatchImmediateFlushStateComputeModeC
EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(csrStream, this->streamProperties.stateComputeMode, EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(csrStream, this->streamProperties.stateComputeMode,
flushData.pipelineSelectArgs, flushData.pipelineSelectArgs,
false, peekRootDeviceEnvironment(), isRcs(), false, peekRootDeviceEnvironment(), isRcs(),
getDcFlushSupport(), nullptr); getDcFlushSupport());
this->streamProperties.stateComputeMode.clearIsDirty(); this->streamProperties.stateComputeMode.clearIsDirty();
} }
} }
@@ -2080,8 +2054,7 @@ void CommandStreamReceiverHw<GfxFamily>::dispatchImmediateFlushOneTimeContextIni
PreemptionHelper::programCmdStream<GfxFamily>(csrStream, device.getPreemptionMode(), this->getPreemptionMode(), this->getPreemptionAllocation()); PreemptionHelper::programCmdStream<GfxFamily>(csrStream, device.getPreemptionMode(), this->getPreemptionMode(), this->getPreemptionAllocation());
PreemptionHelper::programCsrBaseAddress<GfxFamily>(csrStream, PreemptionHelper::programCsrBaseAddress<GfxFamily>(csrStream,
device, device,
getPreemptionAllocation(), getPreemptionAllocation());
getLogicalStateHelper());
this->setPreemptionMode(device.getPreemptionMode()); this->setPreemptionMode(device.getPreemptionMode());
} }

View File

@@ -17,7 +17,6 @@ struct RootDeviceEnvironment;
class Device; class Device;
class GraphicsAllocation; class GraphicsAllocation;
struct KernelDescriptor; struct KernelDescriptor;
class LogicalStateHelper;
struct RuntimeCapabilityTable; struct RuntimeCapabilityTable;
class OsContext; class OsContext;
@@ -56,10 +55,10 @@ class PreemptionHelper {
static size_t getRequiredStateSipCmdSize(Device &device, bool isRcs); static size_t getRequiredStateSipCmdSize(Device &device, bool isRcs);
template <typename GfxFamily> template <typename GfxFamily>
static void programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); static void programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template <typename GfxFamily> template <typename GfxFamily>
static void programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context); static void programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context);
template <typename GfxFamily> template <typename GfxFamily>
static void programStateSipEndWa(LinearStream &cmdStream, const RootDeviceEnvironment &rootDeviceEnvironment); static void programStateSipEndWa(LinearStream &cmdStream, const RootDeviceEnvironment &rootDeviceEnvironment);
@@ -87,10 +86,10 @@ class PreemptionHelper {
protected: protected:
template <typename GfxFamily> template <typename GfxFamily>
static void programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); static void programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr);
template <typename GfxFamily> template <typename GfxFamily>
static void programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper); static void programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation);
}; };
template <typename GfxFamily> template <typename GfxFamily>

View File

@@ -19,16 +19,16 @@
namespace NEO { namespace NEO {
template <typename GfxFamily> template <typename GfxFamily>
void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { void PreemptionHelper::programCsrBaseAddress(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr) {
if (device.getPreemptionMode() == PreemptionMode::MidThread) { if (device.getPreemptionMode() == PreemptionMode::MidThread) {
UNRECOVERABLE_IF(nullptr == preemptionCsr); UNRECOVERABLE_IF(nullptr == preemptionCsr);
programCsrBaseAddressCmd<GfxFamily>(preambleCmdStream, preemptionCsr, logicalStateHelper); programCsrBaseAddressCmd<GfxFamily>(preambleCmdStream, preemptionCsr);
} }
} }
template <typename GfxFamily> template <typename GfxFamily>
void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr) {
using GPGPU_CSR_BASE_ADDRESS = typename GfxFamily::GPGPU_CSR_BASE_ADDRESS; using GPGPU_CSR_BASE_ADDRESS = typename GfxFamily::GPGPU_CSR_BASE_ADDRESS;
auto csr = reinterpret_cast<GPGPU_CSR_BASE_ADDRESS *>(preambleCmdStream.getSpace(sizeof(GPGPU_CSR_BASE_ADDRESS))); auto csr = reinterpret_cast<GPGPU_CSR_BASE_ADDRESS *>(preambleCmdStream.getSpace(sizeof(GPGPU_CSR_BASE_ADDRESS)));
@@ -38,19 +38,19 @@ void PreemptionHelper::programCsrBaseAddressCmd(LinearStream &preambleCmdStream,
} }
template <typename GfxFamily> template <typename GfxFamily>
void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context) { void PreemptionHelper::programStateSip(LinearStream &preambleCmdStream, Device &device, OsContext *context) {
using STATE_SIP = typename GfxFamily::STATE_SIP; using STATE_SIP = typename GfxFamily::STATE_SIP;
bool debuggingEnabled = device.getDebugger() != nullptr; bool debuggingEnabled = device.getDebugger() != nullptr;
bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread; bool isMidThreadPreemption = device.getPreemptionMode() == PreemptionMode::MidThread;
if (isMidThreadPreemption || debuggingEnabled) { if (isMidThreadPreemption || debuggingEnabled) {
GraphicsAllocation *sipAllocation = SipKernel::getSipKernel(device, context).getSipAllocation(); GraphicsAllocation *sipAllocation = SipKernel::getSipKernel(device, context).getSipAllocation();
programStateSipCmd<GfxFamily>(preambleCmdStream, sipAllocation, logicalStateHelper); programStateSipCmd<GfxFamily>(preambleCmdStream, sipAllocation);
} }
} }
template <typename GfxFamily> template <typename GfxFamily>
void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper) { void PreemptionHelper::programStateSipCmd(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation) {
using STATE_SIP = typename GfxFamily::STATE_SIP; using STATE_SIP = typename GfxFamily::STATE_SIP;
auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP))); auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP)));

View File

@@ -6,11 +6,11 @@
*/ */
template <> template <>
void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr) {
} }
template <> template <>
void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context) { void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, OsContext *context) {
using STATE_SIP = typename GfxFamily::STATE_SIP; using STATE_SIP = typename GfxFamily::STATE_SIP;
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM; using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;

View File

@@ -385,8 +385,6 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa
return false; return false;
} }
commandStreamReceiver->createKernelArgsBufferAllocation();
if (preemptionMode == PreemptionMode::MidThread && !commandStreamReceiver->createPreemptionAllocation()) { if (preemptionMode == PreemptionMode::MidThread && !commandStreamReceiver->createPreemptionAllocation()) {
return false; return false;
} }

View File

@@ -70,7 +70,6 @@ void RootDevice::initializeRootCommandStreamReceiver() {
rootCommandStreamReceiver->initializeTagAllocation(); rootCommandStreamReceiver->initializeTagAllocation();
rootCommandStreamReceiver->createGlobalFenceAllocation(); rootCommandStreamReceiver->createGlobalFenceAllocation();
rootCommandStreamReceiver->createWorkPartitionAllocation(*this); rootCommandStreamReceiver->createWorkPartitionAllocation(*this);
rootCommandStreamReceiver->createKernelArgsBufferAllocation();
commandStreamReceivers.push_back(std::move(rootCommandStreamReceiver)); commandStreamReceivers.push_back(std::move(rootCommandStreamReceiver));
EngineControl engine{commandStreamReceivers.back().get(), osContext}; EngineControl engine{commandStreamReceivers.back().get(), osContext};

View File

@@ -12,7 +12,6 @@
namespace NEO { namespace NEO {
DirectSubmissionInputParams::DirectSubmissionInputParams(const CommandStreamReceiver &commandStreamReceiver) : osContext(commandStreamReceiver.getOsContext()), rootDeviceEnvironment(commandStreamReceiver.peekRootDeviceEnvironment()), rootDeviceIndex(commandStreamReceiver.getRootDeviceIndex()) { DirectSubmissionInputParams::DirectSubmissionInputParams(const CommandStreamReceiver &commandStreamReceiver) : osContext(commandStreamReceiver.getOsContext()), rootDeviceEnvironment(commandStreamReceiver.peekRootDeviceEnvironment()), rootDeviceIndex(commandStreamReceiver.getRootDeviceIndex()) {
memoryManager = commandStreamReceiver.getMemoryManager(); memoryManager = commandStreamReceiver.getMemoryManager();
logicalStateHelper = commandStreamReceiver.getLogicalStateHelper();
globalFenceAllocation = commandStreamReceiver.getGlobalFenceAllocation(); globalFenceAllocation = commandStreamReceiver.getGlobalFenceAllocation();
workPartitionAllocation = commandStreamReceiver.getWorkPartitionAllocation(); workPartitionAllocation = commandStreamReceiver.getWorkPartitionAllocation();
completionFenceAllocation = commandStreamReceiver.getTagAllocation(); completionFenceAllocation = commandStreamReceiver.getTagAllocation();

View File

@@ -55,7 +55,6 @@ struct BatchBuffer;
class DirectSubmissionDiagnosticsCollector; class DirectSubmissionDiagnosticsCollector;
class FlushStampTracker; class FlushStampTracker;
class GraphicsAllocation; class GraphicsAllocation;
class LogicalStateHelper;
struct HardwareInfo; struct HardwareInfo;
class OsContext; class OsContext;
class MemoryOperationsHandler; class MemoryOperationsHandler;
@@ -64,7 +63,6 @@ struct DirectSubmissionInputParams : NonCopyableClass {
DirectSubmissionInputParams(const CommandStreamReceiver &commandStreamReceiver); DirectSubmissionInputParams(const CommandStreamReceiver &commandStreamReceiver);
OsContext &osContext; OsContext &osContext;
const RootDeviceEnvironment &rootDeviceEnvironment; const RootDeviceEnvironment &rootDeviceEnvironment;
LogicalStateHelper *logicalStateHelper = nullptr;
MemoryManager *memoryManager = nullptr; MemoryManager *memoryManager = nullptr;
const GraphicsAllocation *globalFenceAllocation = nullptr; const GraphicsAllocation *globalFenceAllocation = nullptr;
GraphicsAllocation *workPartitionAllocation = nullptr; GraphicsAllocation *workPartitionAllocation = nullptr;
@@ -204,7 +202,6 @@ class DirectSubmissionHw {
OsContext &osContext; OsContext &osContext;
const uint32_t rootDeviceIndex; const uint32_t rootDeviceIndex;
MemoryManager *memoryManager = nullptr; MemoryManager *memoryManager = nullptr;
LogicalStateHelper *logicalStateHelper = nullptr;
MemoryOperationsHandler *memoryOperationHandler = nullptr; MemoryOperationsHandler *memoryOperationHandler = nullptr;
const HardwareInfo *hwInfo = nullptr; const HardwareInfo *hwInfo = nullptr;
const RootDeviceEnvironment &rootDeviceEnvironment; const RootDeviceEnvironment &rootDeviceEnvironment;

View File

@@ -22,7 +22,6 @@
#include "shared/source/helpers/flush_stamp.h" #include "shared/source/helpers/flush_stamp.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/ptr_math.h"
#include "shared/source/memory_manager/allocation_properties.h" #include "shared/source/memory_manager/allocation_properties.h"
#include "shared/source/memory_manager/graphics_allocation.h" #include "shared/source/memory_manager/graphics_allocation.h"
@@ -45,7 +44,6 @@ DirectSubmissionHw<GfxFamily, Dispatcher>::DirectSubmissionHw(const DirectSubmis
: ringBuffers(RingBufferUse::initialRingBufferCount), osContext(inputParams.osContext), rootDeviceIndex(inputParams.rootDeviceIndex), rootDeviceEnvironment(inputParams.rootDeviceEnvironment) { : ringBuffers(RingBufferUse::initialRingBufferCount), osContext(inputParams.osContext), rootDeviceIndex(inputParams.rootDeviceIndex), rootDeviceEnvironment(inputParams.rootDeviceEnvironment) {
memoryManager = inputParams.memoryManager; memoryManager = inputParams.memoryManager;
globalFenceAllocation = inputParams.globalFenceAllocation; globalFenceAllocation = inputParams.globalFenceAllocation;
logicalStateHelper = inputParams.logicalStateHelper;
hwInfo = inputParams.rootDeviceEnvironment.getHardwareInfo(); hwInfo = inputParams.rootDeviceEnvironment.getHardwareInfo();
memoryOperationHandler = inputParams.rootDeviceEnvironment.memoryOperationsInterface.get(); memoryOperationHandler = inputParams.rootDeviceEnvironment.memoryOperationsInterface.get();
@@ -1173,11 +1171,7 @@ size_t DirectSubmissionHw<GfxFamily, Dispatcher>::getDiagnosticModeSection() {
template <typename GfxFamily, typename Dispatcher> template <typename GfxFamily, typename Dispatcher>
void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchSystemMemoryFenceAddress() { void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchSystemMemoryFenceAddress() {
EncodeMemoryFence<GfxFamily>::encodeSystemMemoryFence(ringCommandStream, this->globalFenceAllocation, this->logicalStateHelper); EncodeMemoryFence<GfxFamily>::encodeSystemMemoryFence(ringCommandStream, this->globalFenceAllocation);
if (logicalStateHelper) {
logicalStateHelper->writeStreamInline(ringCommandStream, false);
}
} }
template <typename GfxFamily, typename Dispatcher> template <typename GfxFamily, typename Dispatcher>

View File

@@ -49,7 +49,7 @@ size_t EncodeComputeMode<Family>::getCmdSizeForComputeMode(const RootDeviceEnvir
template <> template <>
void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties,
const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { const RootDeviceEnvironment &rootDeviceEnvironment) {
using PIPE_CONTROL = typename Family::PIPE_CONTROL; using PIPE_CONTROL = typename Family::PIPE_CONTROL;
if (properties.threadArbitrationPolicy.isDirty) { if (properties.threadArbitrationPolicy.isDirty) {
@@ -95,6 +95,5 @@ template struct EncodeEnableRayTracing<Family>;
template struct EncodeNoop<Family>; template struct EncodeNoop<Family>;
template struct EncodeStoreMemory<Family>; template struct EncodeStoreMemory<Family>;
template struct EncodeMemoryFence<Family>; template struct EncodeMemoryFence<Family>;
template struct EncodeKernelArgsBuffer<Family>;
template struct EnodeUserInterrupt<Family>; template struct EnodeUserInterrupt<Family>;
} // namespace NEO } // namespace NEO

View File

@@ -12,7 +12,6 @@
#include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" #include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl"
#include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl"
#include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl"
#include "shared/source/helpers/logical_state_helper.inl"
namespace NEO { namespace NEO {
typedef Gen11Family Family; typedef Gen11Family Family;
@@ -38,5 +37,4 @@ template class FlatBatchBufferHelperHw<Family>;
template struct MemorySynchronizationCommands<Family>; template struct MemorySynchronizationCommands<Family>;
template struct LriHelper<Family>; template struct LriHelper<Family>;
template LogicalStateHelper *LogicalStateHelper::create<Family>();
} // namespace NEO } // namespace NEO

View File

@@ -19,7 +19,6 @@ template <class T>
struct CmdParse; struct CmdParse;
namespace NEO { namespace NEO {
class LogicalStateHelper;
struct Gen11 { struct Gen11 {
#include "shared/source/generated/gen11/hw_cmds_generated_gen11.inl" #include "shared/source/generated/gen11/hw_cmds_generated_gen11.inl"
@@ -97,7 +96,6 @@ struct Gen11Family : public Gen11 {
using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t; using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const GPGPU_WALKER cmdInitGpgpuWalker; static const GPGPU_WALKER cmdInitGpgpuWalker;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad;

View File

@@ -16,10 +16,10 @@ using GfxFamily = Gen11Family;
template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStream, PreemptionMode newPreemptionMode, template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStream, PreemptionMode newPreemptionMode,
PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr); PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr);
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, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programCsrBaseAddressCmd<GfxFamily>(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programCsrBaseAddressCmd<GfxFamily>(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context); template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, OsContext *context);
template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation);
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs); 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);

View File

@@ -37,7 +37,7 @@ size_t EncodeWA<Family>::getAdditionalPipelineSelectSize(Device &device, bool is
} }
template <> template <>
void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) {
using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE; using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE;
using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT; using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT;
@@ -134,6 +134,5 @@ template struct EncodeEnableRayTracing<Family>;
template struct EncodeNoop<Family>; template struct EncodeNoop<Family>;
template struct EncodeStoreMemory<Family>; template struct EncodeStoreMemory<Family>;
template struct EncodeMemoryFence<Family>; template struct EncodeMemoryFence<Family>;
template struct EncodeKernelArgsBuffer<Family>;
template struct EnodeUserInterrupt<Family>; template struct EnodeUserInterrupt<Family>;
} // namespace NEO } // namespace NEO

View File

@@ -16,7 +16,6 @@ using Family = NEO::Gen12LpFamily;
#include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl"
#include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl"
#include "shared/source/helpers/local_memory_access_modes.h" #include "shared/source/helpers/local_memory_access_modes.h"
#include "shared/source/helpers/logical_state_helper.inl"
namespace NEO { namespace NEO {
@@ -208,6 +207,4 @@ template class GfxCoreHelperHw<Family>;
template class FlatBatchBufferHelperHw<Family>; template class FlatBatchBufferHelperHw<Family>;
template struct MemorySynchronizationCommands<Family>; template struct MemorySynchronizationCommands<Family>;
template struct LriHelper<Family>; template struct LriHelper<Family>;
template LogicalStateHelper *LogicalStateHelper::create<Family>();
} // namespace NEO } // namespace NEO

View File

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

View File

@@ -16,10 +16,10 @@ using GfxFamily = Gen12LpFamily;
template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStream, PreemptionMode newPreemptionMode, template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStream, PreemptionMode newPreemptionMode,
PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr); PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr);
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, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programCsrBaseAddressCmd<GfxFamily>(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programCsrBaseAddressCmd<GfxFamily>(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context); template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, OsContext *context);
template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation);
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs); 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);

View File

@@ -39,8 +39,7 @@ size_t EncodeComputeMode<Family>::getCmdSizeForComputeMode(const RootDeviceEnvir
} }
template <typename Family> template <typename Family>
void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) {
const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) {
} }
template <> template <>
@@ -76,7 +75,6 @@ template struct EncodeEnableRayTracing<Family>;
template struct EncodeNoop<Family>; template struct EncodeNoop<Family>;
template struct EncodeStoreMemory<Family>; template struct EncodeStoreMemory<Family>;
template struct EncodeMemoryFence<Family>; template struct EncodeMemoryFence<Family>;
template struct EncodeKernelArgsBuffer<Family>;
template struct EnodeUserInterrupt<Family>; template struct EnodeUserInterrupt<Family>;
} // namespace NEO } // namespace NEO

View File

@@ -13,7 +13,6 @@
#include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" #include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl"
#include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl"
#include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl"
#include "shared/source/helpers/logical_state_helper.inl"
namespace NEO { namespace NEO {
typedef Gen8Family Family; typedef Gen8Family Family;
@@ -78,6 +77,4 @@ template class GfxCoreHelperHw<Family>;
template class FlatBatchBufferHelperHw<Family>; template class FlatBatchBufferHelperHw<Family>;
template struct MemorySynchronizationCommands<Family>; template struct MemorySynchronizationCommands<Family>;
template struct LriHelper<Family>; template struct LriHelper<Family>;
template LogicalStateHelper *LogicalStateHelper::create<Family>();
} // namespace NEO } // namespace NEO

View File

@@ -20,7 +20,6 @@ template <class T>
struct CmdParse; struct CmdParse;
namespace NEO { namespace NEO {
class LogicalStateHelper;
struct Gen8 { struct Gen8 {
#include "shared/source/generated/gen8/hw_cmds_generated_gen8.inl" #include "shared/source/generated/gen8/hw_cmds_generated_gen8.inl"
@@ -98,7 +97,6 @@ struct Gen8Family : public Gen8 {
using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT; using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
using TimestampPacketType = uint32_t; using TimestampPacketType = uint32_t;
using LogicalStateHelperHw = LogicalStateHelper;
static const GPGPU_WALKER cmdInitGpgpuWalker; static const GPGPU_WALKER cmdInitGpgpuWalker;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData; static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad; static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad;

View File

@@ -55,19 +55,19 @@ size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, b
} }
template <> template <>
void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr) {
} }
template <> template <>
void PreemptionHelper::programCsrBaseAddressCmd<GfxFamily>(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { void PreemptionHelper::programCsrBaseAddressCmd<GfxFamily>(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr) {
} }
template <> template <>
void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context) { void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, OsContext *context) {
} }
template <> template <>
void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper) { void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation) {
} }
template <> template <>

View File

@@ -40,7 +40,7 @@ size_t EncodeComputeMode<Family>::getCmdSizeForComputeMode(const RootDeviceEnvir
template <typename Family> template <typename Family>
void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties,
const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { const RootDeviceEnvironment &rootDeviceEnvironment) {
using PIPE_CONTROL = typename Family::PIPE_CONTROL; using PIPE_CONTROL = typename Family::PIPE_CONTROL;
UNRECOVERABLE_IF(properties.threadArbitrationPolicy.value == ThreadArbitrationPolicy::NotPresent); UNRECOVERABLE_IF(properties.threadArbitrationPolicy.value == ThreadArbitrationPolicy::NotPresent);
@@ -80,6 +80,5 @@ template struct EncodeEnableRayTracing<Family>;
template struct EncodeNoop<Family>; template struct EncodeNoop<Family>;
template struct EncodeStoreMemory<Family>; template struct EncodeStoreMemory<Family>;
template struct EncodeMemoryFence<Family>; template struct EncodeMemoryFence<Family>;
template struct EncodeKernelArgsBuffer<Family>;
template struct EnodeUserInterrupt<Family>; template struct EnodeUserInterrupt<Family>;
} // namespace NEO } // namespace NEO

View File

@@ -12,7 +12,6 @@
#include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl" #include "shared/source/helpers/gfx_core_helper_bdw_and_later.inl"
#include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl"
#include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_icllp.inl"
#include "shared/source/helpers/logical_state_helper.inl"
#include <cstring> #include <cstring>
@@ -49,6 +48,4 @@ template class GfxCoreHelperHw<Family>;
template class FlatBatchBufferHelperHw<Family>; template class FlatBatchBufferHelperHw<Family>;
template struct MemorySynchronizationCommands<Family>; template struct MemorySynchronizationCommands<Family>;
template struct LriHelper<Family>; template struct LriHelper<Family>;
template LogicalStateHelper *LogicalStateHelper::create<Family>();
} // namespace NEO } // namespace NEO

View File

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

View File

@@ -71,10 +71,10 @@ template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStr
PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr); PreemptionMode oldPreemptionMode, GraphicsAllocation *preemptionCsr);
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, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programCsrBaseAddressCmd<GfxFamily>(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programCsrBaseAddressCmd<GfxFamily>(LinearStream &preambleCmdStream, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, LogicalStateHelper *logicalStateHelper, OsContext *context); template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device, OsContext *context);
template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation, LogicalStateHelper *logicalStateHelper); template void PreemptionHelper::programStateSipCmd<GfxFamily>(LinearStream &preambleCmdStream, GraphicsAllocation *sipAllocation);
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs); 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, const RootDeviceEnvironment &rootDeviceEnvironment); template void PreemptionHelper::programStateSipEndWa<GfxFamily>(LinearStream &cmdStream, const RootDeviceEnvironment &rootDeviceEnvironment);

View File

@@ -110,8 +110,6 @@ set(NEO_CORE_HELPERS
${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen_sse4.cpp ${CMAKE_CURRENT_SOURCE_DIR}/local_id_gen_sse4.cpp
${CMAKE_CURRENT_SOURCE_DIR}/local_work_size.cpp ${CMAKE_CURRENT_SOURCE_DIR}/local_work_size.cpp
${CMAKE_CURRENT_SOURCE_DIR}/local_work_size.h ${CMAKE_CURRENT_SOURCE_DIR}/local_work_size.h
${CMAKE_CURRENT_SOURCE_DIR}/logical_state_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/logical_state_helper.inl
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}memory_properties_helpers.cpp ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}memory_properties_helpers.cpp
${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers.h
${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers_base.inl ${CMAKE_CURRENT_SOURCE_DIR}/memory_properties_helpers_base.inl

View File

@@ -1,27 +0,0 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
namespace NEO {
class LinearStream;
class LogicalStateHelper {
public:
template <typename Family>
static LogicalStateHelper *create();
virtual ~LogicalStateHelper() = default;
virtual void writeStreamInline(LinearStream &linearStream, bool pipelinedState) = 0;
virtual void mergePipelinedState(const LogicalStateHelper &inputLogicalStateHelper) {}
protected:
LogicalStateHelper() = default;
};
} // namespace NEO

View File

@@ -1,17 +0,0 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/logical_state_helper.h"
namespace NEO {
template <typename GfxFamily>
LogicalStateHelper *LogicalStateHelper::create() {
return nullptr;
}
} // namespace NEO

View File

@@ -19,7 +19,6 @@ class Device;
struct DispatchFlags; struct DispatchFlags;
class GraphicsAllocation; class GraphicsAllocation;
class LinearStream; class LinearStream;
class LogicalStateHelper;
struct PipelineSelectArgs; struct PipelineSelectArgs;
struct StreamProperties; struct StreamProperties;
struct RootDeviceEnvironment; struct RootDeviceEnvironment;
@@ -34,7 +33,7 @@ struct PreambleHelper {
static void programPipelineSelect(LinearStream *pCommandStream, static void programPipelineSelect(LinearStream *pCommandStream,
const PipelineSelectArgs &pipelineSelectArgs, const PipelineSelectArgs &pipelineSelectArgs,
const RootDeviceEnvironment &rootDeviceEnvironment); const RootDeviceEnvironment &rootDeviceEnvironment);
static void programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); static void programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr);
static void addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType); static void addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType);
static void appendProgramVFEState(const RootDeviceEnvironment &rootDeviceEnvironment, const StreamProperties &streamProperties, void *cmd); static void appendProgramVFEState(const RootDeviceEnvironment &rootDeviceEnvironment, const StreamProperties &streamProperties, void *cmd);
static void *getSpaceForVfeState(LinearStream *pCommandStream, static void *getSpaceForVfeState(LinearStream *pCommandStream,
@@ -45,11 +44,10 @@ struct PreambleHelper {
uint32_t scratchSize, uint32_t scratchSize,
uint64_t scratchAddress, uint64_t scratchAddress,
uint32_t maxFrontEndThreads, uint32_t maxFrontEndThreads,
const StreamProperties &streamProperties, const StreamProperties &streamProperties);
LogicalStateHelper *logicalStateHelper);
static uint64_t getScratchSpaceAddressOffsetForVfeState(LinearStream *pCommandStream, void *pVfeState); static uint64_t getScratchSpaceAddressOffsetForVfeState(LinearStream *pCommandStream, void *pVfeState);
static void programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config, static void programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config,
GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper); GraphicsAllocation *preemptionCsr);
static void programSemaphoreDelay(LinearStream *pCommandStream); static void programSemaphoreDelay(LinearStream *pCommandStream);
static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM); static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM);
static bool isSystolicModeConfigurable(const RootDeviceEnvironment &rootDeviceEnvironment); static bool isSystolicModeConfigurable(const RootDeviceEnvironment &rootDeviceEnvironment);

View File

@@ -66,16 +66,16 @@ size_t PreambleHelper<GfxFamily>::getCmdSizeForPipelineSelect(const RootDeviceEn
template <typename GfxFamily> template <typename GfxFamily>
void PreambleHelper<GfxFamily>::programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config, void PreambleHelper<GfxFamily>::programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config,
GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { GraphicsAllocation *preemptionCsr) {
programL3(pCommandStream, l3Config); programL3(pCommandStream, l3Config);
programPreemption(pCommandStream, device, preemptionCsr, logicalStateHelper); programPreemption(pCommandStream, device, preemptionCsr);
programGenSpecificPreambleWorkArounds(pCommandStream, device.getHardwareInfo()); programGenSpecificPreambleWorkArounds(pCommandStream, device.getHardwareInfo());
programSemaphoreDelay(pCommandStream); programSemaphoreDelay(pCommandStream);
} }
template <typename GfxFamily> template <typename GfxFamily>
void PreambleHelper<GfxFamily>::programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr, LogicalStateHelper *logicalStateHelper) { void PreambleHelper<GfxFamily>::programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr) {
PreemptionHelper::programCsrBaseAddress<GfxFamily>(*pCommandStream, device, preemptionCsr, logicalStateHelper); PreemptionHelper::programCsrBaseAddress<GfxFamily>(*pCommandStream, device, preemptionCsr);
} }
template <typename GfxFamily> template <typename GfxFamily>

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019-2022 Intel Corporation * Copyright (C) 2019-2023 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -40,8 +40,7 @@ void PreambleHelper<GfxFamily>::programVfeState(void *pVfeState,
uint32_t scratchSize, uint32_t scratchSize,
uint64_t scratchAddress, uint64_t scratchAddress,
uint32_t maxFrontEndThreads, uint32_t maxFrontEndThreads,
const StreamProperties &streamProperties, const StreamProperties &streamProperties) {
LogicalStateHelper *logicalStateHelper) {
using MEDIA_VFE_STATE = typename GfxFamily::MEDIA_VFE_STATE; using MEDIA_VFE_STATE = typename GfxFamily::MEDIA_VFE_STATE;
auto pMediaVfeState = reinterpret_cast<MEDIA_VFE_STATE *>(pVfeState); auto pMediaVfeState = reinterpret_cast<MEDIA_VFE_STATE *>(pVfeState);

View File

@@ -106,8 +106,7 @@ void PreambleHelper<GfxFamily>::programVfeState(void *pVfeState,
uint32_t scratchSize, uint32_t scratchSize,
uint64_t scratchAddress, uint64_t scratchAddress,
uint32_t maxFrontEndThreads, uint32_t maxFrontEndThreads,
const StreamProperties &streamProperties, const StreamProperties &streamProperties) {
LogicalStateHelper *logicalStateHelper) {
using CFE_STATE = typename Family::CFE_STATE; using CFE_STATE = typename Family::CFE_STATE;
auto cfeState = reinterpret_cast<CFE_STATE *>(pVfeState); auto cfeState = reinterpret_cast<CFE_STATE *>(pVfeState);

View File

@@ -101,6 +101,5 @@ template struct EncodeEnableRayTracing<Family>;
template struct EncodeNoop<Family>; template struct EncodeNoop<Family>;
template struct EncodeStoreMemory<Family>; template struct EncodeStoreMemory<Family>;
template struct EncodeMemoryFence<Family>; template struct EncodeMemoryFence<Family>;
template struct EncodeKernelArgsBuffer<Family>;
template struct EnodeUserInterrupt<Family>; template struct EnodeUserInterrupt<Family>;
} // namespace NEO } // namespace NEO

View File

@@ -18,7 +18,6 @@ using Family = NEO::XeHpFamily;
#include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl" #include "shared/source/helpers/gfx_core_helper_bdw_to_dg2.inl"
#include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl"
#include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl"
#include "shared/source/helpers/logical_state_helper.inl"
#include "shared/source/os_interface/product_helper.h" #include "shared/source/os_interface/product_helper.h"
namespace NEO { namespace NEO {
@@ -154,5 +153,4 @@ template class FlatBatchBufferHelperHw<Family>;
template struct MemorySynchronizationCommands<Family>; template struct MemorySynchronizationCommands<Family>;
template struct LriHelper<Family>; template struct LriHelper<Family>;
template LogicalStateHelper *LogicalStateHelper::create<Family>();
} // namespace NEO } // namespace NEO

View File

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

View File

@@ -98,7 +98,7 @@ inline void EncodeAtomic<Family>::setMiAtomicAddress(MI_ATOMIC &atomic, uint64_t
} }
template <> template <>
void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) {
using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE; using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE;
using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT; using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT;
@@ -344,6 +344,5 @@ template struct EncodeEnableRayTracing<Family>;
template struct EncodeNoop<Family>; template struct EncodeNoop<Family>;
template struct EncodeStoreMemory<Family>; template struct EncodeStoreMemory<Family>;
template struct EncodeMemoryFence<Family>; template struct EncodeMemoryFence<Family>;
template struct EncodeKernelArgsBuffer<Family>;
template struct EnodeUserInterrupt<Family>; template struct EnodeUserInterrupt<Family>;
} // namespace NEO } // namespace NEO

View File

@@ -39,7 +39,7 @@ template <>
void CommandStreamReceiverHw<Family>::programEnginePrologue(LinearStream &csr) { void CommandStreamReceiverHw<Family>::programEnginePrologue(LinearStream &csr) {
if (!this->isEnginePrologueSent) { if (!this->isEnginePrologueSent) {
if (globalFenceAllocation) { if (globalFenceAllocation) {
EncodeMemoryFence<Family>::encodeSystemMemoryFence(csr, globalFenceAllocation, nullptr); EncodeMemoryFence<Family>::encodeSystemMemoryFence(csr, globalFenceAllocation);
} }
this->isEnginePrologueSent = true; this->isEnginePrologueSent = true;
} }

View File

@@ -20,7 +20,6 @@ using Family = NEO::XeHpcCoreFamily;
#include "shared/source/helpers/gfx_core_helper_pvc_and_later.inl" #include "shared/source/helpers/gfx_core_helper_pvc_and_later.inl"
#include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl"
#include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl"
#include "shared/source/helpers/logical_state_helper.inl"
namespace NEO { namespace NEO {
@@ -430,6 +429,4 @@ template class GfxCoreHelperHw<Family>;
template class FlatBatchBufferHelperHw<Family>; template class FlatBatchBufferHelperHw<Family>;
template struct MemorySynchronizationCommands<Family>; template struct MemorySynchronizationCommands<Family>;
template struct LriHelper<Family>; template struct LriHelper<Family>;
template LogicalStateHelper *LogicalStateHelper::create<Family>();
} // namespace NEO } // namespace NEO

View File

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

View File

@@ -129,7 +129,7 @@ void EncodeDispatchKernel<Family>::encodeAdditionalWalkerFields(const RootDevice
} }
template <> template <>
void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment, LogicalStateHelper *logicalStateHelper) { void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, StateComputeModeProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) {
using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE; using STATE_COMPUTE_MODE = typename Family::STATE_COMPUTE_MODE;
using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT; using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT;
using PIXEL_ASYNC_COMPUTE_THREAD_LIMIT = typename STATE_COMPUTE_MODE::PIXEL_ASYNC_COMPUTE_THREAD_LIMIT; using PIXEL_ASYNC_COMPUTE_THREAD_LIMIT = typename STATE_COMPUTE_MODE::PIXEL_ASYNC_COMPUTE_THREAD_LIMIT;
@@ -239,6 +239,5 @@ template struct EncodeEnableRayTracing<Family>;
template struct EncodeNoop<Family>; template struct EncodeNoop<Family>;
template struct EncodeStoreMemory<Family>; template struct EncodeStoreMemory<Family>;
template struct EncodeMemoryFence<Family>; template struct EncodeMemoryFence<Family>;
template struct EncodeKernelArgsBuffer<Family>;
template struct EnodeUserInterrupt<Family>; template struct EnodeUserInterrupt<Family>;
} // namespace NEO } // namespace NEO

View File

@@ -20,7 +20,6 @@ using Family = NEO::XeHpgCoreFamily;
#include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_tgllp_and_later.inl"
#include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl" #include "shared/source/helpers/gfx_core_helper_xehp_and_later.inl"
#include "shared/source/helpers/local_memory_access_modes.h" #include "shared/source/helpers/local_memory_access_modes.h"
#include "shared/source/helpers/logical_state_helper.inl"
namespace NEO { namespace NEO {
template <> template <>
@@ -187,6 +186,4 @@ template class GfxCoreHelperHw<Family>;
template class FlatBatchBufferHelperHw<Family>; template class FlatBatchBufferHelperHw<Family>;
template struct MemorySynchronizationCommands<Family>; template struct MemorySynchronizationCommands<Family>;
template struct LriHelper<Family>; template struct LriHelper<Family>;
template LogicalStateHelper *LogicalStateHelper::create<Family>();
} // namespace NEO } // namespace NEO

View File

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

View File

@@ -43,7 +43,6 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
using BaseClass::blitterDirectSubmission; using BaseClass::blitterDirectSubmission;
using BaseClass::checkPlatformSupportsGpuIdleImplicitFlush; using BaseClass::checkPlatformSupportsGpuIdleImplicitFlush;
using BaseClass::checkPlatformSupportsNewResourceImplicitFlush; using BaseClass::checkPlatformSupportsNewResourceImplicitFlush;
using BaseClass::createKernelArgsBufferAllocation;
using BaseClass::csrSizeRequestFlags; using BaseClass::csrSizeRequestFlags;
using BaseClass::dcFlushSupport; using BaseClass::dcFlushSupport;
using BaseClass::directSubmission; using BaseClass::directSubmission;
@@ -60,8 +59,6 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
using BaseClass::isBlitterDirectSubmissionEnabled; using BaseClass::isBlitterDirectSubmissionEnabled;
using BaseClass::isDirectSubmissionEnabled; using BaseClass::isDirectSubmissionEnabled;
using BaseClass::isPerDssBackedBufferSent; using BaseClass::isPerDssBackedBufferSent;
using BaseClass::kernelArgsBufferAllocation;
using BaseClass::logicalStateHelper;
using BaseClass::makeResident; using BaseClass::makeResident;
using BaseClass::perDssBackedBuffer; using BaseClass::perDssBackedBuffer;
using BaseClass::postInitFlagsSetup; using BaseClass::postInitFlagsSetup;

View File

@@ -70,7 +70,6 @@ set(NEO_CORE_tests_mocks
${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_l0_debugger.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_l0_debugger.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_logical_state_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_manager.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_operations_handler.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_operations_handler.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_migration_sync_data.h ${CMAKE_CURRENT_SOURCE_DIR}/mock_migration_sync_data.h

View File

@@ -35,7 +35,6 @@ class TestedDrmCommandStreamReceiver : public DrmCommandStreamReceiver<GfxFamily
using CommandStreamReceiver::globalFenceAllocation; using CommandStreamReceiver::globalFenceAllocation;
using CommandStreamReceiver::immWritePostSyncWriteOffset; using CommandStreamReceiver::immWritePostSyncWriteOffset;
using CommandStreamReceiver::latestSentTaskCount; using CommandStreamReceiver::latestSentTaskCount;
using CommandStreamReceiver::logicalStateHelper;
using CommandStreamReceiver::makeResident; using CommandStreamReceiver::makeResident;
using CommandStreamReceiver::tagAddress; using CommandStreamReceiver::tagAddress;
using CommandStreamReceiver::taskCount; using CommandStreamReceiver::taskCount;

View File

@@ -80,8 +80,6 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
bool isMultiOsContextCapable() const override { return multiOsContextCapable; } bool isMultiOsContextCapable() const override { return multiOsContextCapable; }
void createKernelArgsBufferAllocation() override {}
bool isGpuHangDetected() const override { bool isGpuHangDetected() const override {
if (isGpuHangDetectedReturnValue.has_value()) { if (isGpuHangDetectedReturnValue.has_value()) {
return *isGpuHangDetectedReturnValue; return *isGpuHangDetectedReturnValue;
@@ -257,7 +255,6 @@ class MockCsrHw2 : public CommandStreamReceiverHw<GfxFamily> {
using CommandStreamReceiverHw<GfxFamily>::postInitFlagsSetup; using CommandStreamReceiverHw<GfxFamily>::postInitFlagsSetup;
using CommandStreamReceiverHw<GfxFamily>::programL3; using CommandStreamReceiverHw<GfxFamily>::programL3;
using CommandStreamReceiverHw<GfxFamily>::programVFEState; using CommandStreamReceiverHw<GfxFamily>::programVFEState;
using CommandStreamReceiverHw<GfxFamily>::createKernelArgsBufferAllocation;
using CommandStreamReceiver::activePartitions; using CommandStreamReceiver::activePartitions;
using CommandStreamReceiver::activePartitionsConfig; using CommandStreamReceiver::activePartitionsConfig;
using CommandStreamReceiver::clearColorAllocation; using CommandStreamReceiver::clearColorAllocation;

View File

@@ -96,7 +96,6 @@ void MockDevice::resetCommandStreamReceiver(CommandStreamReceiver *newCsr, uint3
commandStreamReceivers[engineIndex].reset(newCsr); commandStreamReceivers[engineIndex].reset(newCsr);
commandStreamReceivers[engineIndex]->initializeTagAllocation(); commandStreamReceivers[engineIndex]->initializeTagAllocation();
commandStreamReceivers[engineIndex]->createGlobalFenceAllocation(); commandStreamReceivers[engineIndex]->createGlobalFenceAllocation();
commandStreamReceivers[engineIndex]->createKernelArgsBufferAllocation();
if (preemptionMode == PreemptionMode::MidThread) { if (preemptionMode == PreemptionMode::MidThread) {
commandStreamReceivers[engineIndex]->createPreemptionAllocation(); commandStreamReceivers[engineIndex]->createPreemptionAllocation();

View File

@@ -1,44 +0,0 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/command_stream/linear_stream.h"
#include "shared/source/helpers/logical_state_helper.h"
namespace NEO {
template <typename GfxFamily>
class LogicalStateHelperMock : public LogicalStateHelper {
public:
LogicalStateHelperMock() : LogicalStateHelper() {
}
void writeStreamInline(LinearStream &linearStream, bool pipelinedState) override {
writeStreamInlineCalledCounter++;
if (makeFakeStreamWrite) {
auto cmd = GfxFamily::cmdInitNoop;
cmd.setIdentificationNumber(0x123);
auto cmdBuffer = linearStream.getSpaceForCmd<typename GfxFamily::MI_NOOP>();
*cmdBuffer = cmd;
}
}
void mergePipelinedState(const LogicalStateHelper &inputLogicalStateHelper) override {
mergePipelinedStateCounter++;
latestInputLogicalStateHelperForMerge = &inputLogicalStateHelper;
}
const LogicalStateHelper *latestInputLogicalStateHelperForMerge = nullptr;
uint32_t writeStreamInlineCalledCounter = 0;
uint32_t mergePipelinedStateCounter = 0;
bool makeFakeStreamWrite = false;
};
} // namespace NEO

View File

@@ -93,10 +93,7 @@ void DrmMemoryManagerFixture::tearDown() {
mock->ioctlExpected.gemClose += enginesCount; mock->ioctlExpected.gemClose += enginesCount;
mock->ioctlExpected.gemWait += enginesCount; mock->ioctlExpected.gemWait += enginesCount;
} }
if (csr->getKernelArgsBufferAllocation()) {
mock->ioctlExpected.gemClose += enginesCount;
mock->ioctlExpected.gemWait += enginesCount;
}
mock->ioctlExpected.gemWait += additionalDestroyDeviceIoctls.gemWait.load(); mock->ioctlExpected.gemWait += additionalDestroyDeviceIoctls.gemWait.load();
mock->ioctlExpected.gemClose += additionalDestroyDeviceIoctls.gemClose.load(); mock->ioctlExpected.gemClose += additionalDestroyDeviceIoctls.gemClose.load();
delete device; delete device;

View File

@@ -20,7 +20,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDebu
preambleBuffer.resize(cmdSizePreemptionMidThread); preambleBuffer.resize(cmdSizePreemptionMidThread);
LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size()); LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size());
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr, nullptr); PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr);
HardwareParse hwParser; HardwareParse hwParser;
hwParser.parseCommands<GfxFamily>(preambleStream); hwParser.parseCommands<GfxFamily>(preambleStream);
@@ -44,7 +44,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenMidThreadPreemptionAndDisa
preambleBuffer.resize(cmdSizePreemptionMidThread); preambleBuffer.resize(cmdSizePreemptionMidThread);
LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size()); LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size());
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr, nullptr); PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr);
HardwareParse hwParser; HardwareParse hwParser;
hwParser.parseCommands<GfxFamily>(preambleStream); hwParser.parseCommands<GfxFamily>(preambleStream);
@@ -69,7 +69,7 @@ void SourceLevelDebuggerPreambleTest<GfxFamily>::givenPreemptionDisabledAndDebug
preambleBuffer.resize(cmdSizePreemptionMidThread); preambleBuffer.resize(cmdSizePreemptionMidThread);
LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size()); LinearStream preambleStream(&*preambleBuffer.begin(), preambleBuffer.size());
PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr, nullptr); PreemptionHelper::programStateSip<GfxFamily>(preambleStream, *mockDevice, nullptr);
HardwareParse hwParser; HardwareParse hwParser;
hwParser.parseCommands<GfxFamily>(preambleStream); hwParser.parseCommands<GfxFamily>(preambleStream);

View File

@@ -185,7 +185,7 @@ HWTEST_F(CommandEncoderTest, givenPlatformSupportingMiMemFenceWhenEncodingThenPr
size_t size = EncodeMemoryFence<FamilyType>::getSystemMemoryFenceSize(); size_t size = EncodeMemoryFence<FamilyType>::getSystemMemoryFenceSize();
EncodeMemoryFence<FamilyType>::encodeSystemMemoryFence(cmdStream, &allocation, nullptr); EncodeMemoryFence<FamilyType>::encodeSystemMemoryFence(cmdStream, &allocation);
if constexpr (FamilyType::isUsingMiMemFence) { if constexpr (FamilyType::isUsingMiMemFence) {
using STATE_SYSTEM_MEM_FENCE_ADDRESS = typename FamilyType::STATE_SYSTEM_MEM_FENCE_ADDRESS; using STATE_SYSTEM_MEM_FENCE_ADDRESS = typename FamilyType::STATE_SYSTEM_MEM_FENCE_ADDRESS;

View File

@@ -56,7 +56,7 @@ HWTEST_F(CommandEncodeStatesTest, givenDispatchInterfaceWhenDispatchKernelThenWa
dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
} }
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -75,7 +75,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenDebugFlagSetWhenProgr
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -100,7 +100,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithUnc
bool requiresUncachedMocs = true; bool requiresUncachedMocs = true;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, CmdParse<FamilyType>::parseCommandBuffer(commands,
@@ -127,7 +127,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithUnc
bool requiresUncachedMocs = true; bool requiresUncachedMocs = true;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, CmdParse<FamilyType>::parseCommandBuffer(commands,
@@ -154,7 +154,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs);
GenCmdList commands; GenCmdList commands;
@@ -182,7 +182,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs);
GenCmdList commands; GenCmdList commands;
@@ -209,7 +209,7 @@ HWTEST_F(CommandEncodeStatesUncachedMocsTests, whenEncodingDispatchKernelWithNon
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_FALSE(dispatchArgs.requiresUncachedMocs); EXPECT_FALSE(dispatchArgs.requiresUncachedMocs);
GenCmdList commands; GenCmdList commands;
@@ -233,7 +233,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCommandContainerWithUsedAvailableSizeWhen
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto cmdBuffersCountAfter = cmdContainer->getCmdBufferAllocations().size(); auto cmdBuffersCountAfter = cmdContainer->getCmdBufferAllocations().size();
@@ -251,7 +251,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeGraterThan
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock()); auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
auto &gfxcoreHelper = this->getHelper<GfxCoreHelper>(); auto &gfxcoreHelper = this->getHelper<GfxCoreHelper>();
@@ -268,7 +268,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, whenDispatchingKernelThenSe
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock()); auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -286,7 +286,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDebuggingEnabledAndAss
dispatchInterface->kernelDescriptor.kernelAttributes.flags.usesAssert = true; dispatchInterface->kernelDescriptor.kernelAttributes.flags.usesAssert = true;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock()); auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
EXPECT_TRUE(interfaceDescriptorData->getSoftwareExceptionEnable()); EXPECT_TRUE(interfaceDescriptorData->getSoftwareExceptionEnable());
@@ -303,7 +303,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenSlmTotalSizeEqualZeroW
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock()); auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -337,7 +337,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenOneBindingTableEntryWh
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock()); auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -367,7 +367,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhen
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock()); auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -398,7 +398,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenDispa
dispatchArgs.surfaceStateHeap = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE); dispatchArgs.surfaceStateHeap = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE);
dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock()); auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -433,7 +433,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersZeroWhenDisp
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock()); auto interfaceDescriptorData = static_cast<INTERFACE_DESCRIPTOR_DATA *>(cmdContainer->getIddBlock());
@@ -459,7 +459,7 @@ HWTEST_F(CommandEncodeStatesTest, givenIndirectOffsetsCountsWhenDispatchingKerne
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
dispatchArgs.isIndirect = true; dispatchArgs.isIndirect = true;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -488,7 +488,7 @@ HWTEST_F(CommandEncodeStatesTest, givenIndirectOffsetsSizeWhenDispatchingKernelT
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
dispatchArgs.isIndirect = true; dispatchArgs.isIndirect = true;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -530,7 +530,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
@@ -563,7 +563,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
@@ -591,7 +591,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeDe
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); auto dsh = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
@@ -622,7 +622,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -641,7 +641,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmNotCha
bool requiresUncachedMocs = true; bool requiresUncachedMocs = true;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -668,7 +668,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsAndSlmNotCha
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -692,7 +692,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenDirtyHeapsWhenDispatch
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
dispatchArgs.dcFlushEnable = MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment()); dispatchArgs.dcFlushEnable = MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment());
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList cmdList; GenCmdList cmdList;
CmdParse<FamilyType>::parseCommandBuffer(cmdList, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(cmdList, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -732,7 +732,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenCleanHeapsAndSlmChange
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -757,7 +757,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNextIddInBlockZeroWhenD
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -787,7 +787,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNextIddInBlockZeroWhenD
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -824,7 +824,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneWhenHeapI
dshBeforeFlush->getSpace(dshBeforeFlush->getAvailableSpace() - NEO::EncodeDispatchKernel<FamilyType>::getSizeRequiredDsh(kernelDescriptor, cmdContainer->getNumIddPerBlock())); dshBeforeFlush->getSpace(dshBeforeFlush->getAvailableSpace() - NEO::EncodeDispatchKernel<FamilyType>::getSizeRequiredDsh(kernelDescriptor, cmdContainer->getNumIddPerBlock()));
auto cpuBaseBeforeFlush = dshBeforeFlush->getCpuBase(); auto cpuBaseBeforeFlush = dshBeforeFlush->getCpuBase();
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -879,7 +879,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, giveNumSamplersOneAndNextID
auto cpuBaseBeforeFlush = dshBeforeFlush->getCpuBase(); auto cpuBaseBeforeFlush = dshBeforeFlush->getCpuBase();
auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -913,7 +913,7 @@ HWTEST_F(CommandEncodeStatesTest, givenPauseOnEnqueueSetToNeverWhenEncodingWalke
std::list<void *> cmdsToPatch; std::list<void *> cmdsToPatch;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
dispatchArgs.additionalCommands = &cmdsToPatch; dispatchArgs.additionalCommands = &cmdsToPatch;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_EQ(cmdsToPatch.size(), 0u); EXPECT_EQ(cmdsToPatch.size(), 0u);
} }
@@ -929,7 +929,7 @@ HWTEST_F(CommandEncodeStatesTest, givenPauseOnEnqueueSetToAlwaysWhenEncodingWalk
std::list<void *> cmdsToPatch; std::list<void *> cmdsToPatch;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
dispatchArgs.additionalCommands = &cmdsToPatch; dispatchArgs.additionalCommands = &cmdsToPatch;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_EQ(cmdsToPatch.size(), 4u); EXPECT_EQ(cmdsToPatch.size(), 4u);
} }
@@ -961,7 +961,7 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindfulKernelWhenDispatchingKernelThenS
if (EncodeDispatchKernel<FamilyType>::isDshNeeded(pDevice->getDeviceInfo())) { if (EncodeDispatchKernel<FamilyType>::isDshNeeded(pDevice->getDeviceInfo())) {
dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE); dispatchArgs.dynamicStateHeap = cmdContainer->getIndirectHeap(HeapType::DYNAMIC_STATE);
} }
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
@@ -990,7 +990,7 @@ HWTEST2_F(EncodeDispatchKernelTest, givenBindlessKernelWhenDispatchingKernelThen
auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); auto usedBefore = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed(); auto usedAfter = cmdContainer->getIndirectHeap(HeapType::SURFACE_STATE)->getUsed();
@@ -1050,7 +1050,7 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_EQ(pattern, *patchLocation); EXPECT_EQ(pattern, *patchLocation);
@@ -1078,7 +1078,7 @@ HWTEST_F(EncodeDispatchKernelTest, givenNonBindlessOrStatelessArgWhenDispatching
memset(ioh->getCpuBase(), 0, ioh->getMaxAvailableSpace()); memset(ioh->getCpuBase(), 0, ioh->getMaxAvailableSpace());
dispatchArgs.dispatchInterface = dispatchInterface.get(); dispatchArgs.dispatchInterface = dispatchInterface.get();
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_TRUE(memoryZeroed(ptrOffset(ioh->getCpuBase(), iohOffset), ioh->getMaxAvailableSpace() - iohOffset)); EXPECT_TRUE(memoryZeroed(ptrOffset(ioh->getCpuBase(), iohOffset), ioh->getMaxAvailableSpace() - iohOffset));
} }
@@ -1312,7 +1312,7 @@ HWTEST_F(BindlessCommandEncodeStatesContainerTest, givenBindlessKernelAndBindles
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EXPECT_EQ(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
} }
@@ -1349,7 +1349,7 @@ HWTEST_F(BindlessCommandEncodeStatesContainerTest, givenBindfulKernelWhenBindles
EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
} }
@@ -1388,7 +1388,7 @@ HWTEST2_F(NgenGeneratorDispatchKernelEncodeTest, givenBindfulKernelAndIsNotGener
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*commandContainer.get(), dispatchArgs);
if (isGeneratedByIgc) { if (isGeneratedByIgc) {
EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr); EXPECT_NE(commandContainer->getIndirectHeap(HeapType::SURFACE_STATE), nullptr);
@@ -1489,6 +1489,6 @@ HWTEST_F(CommandEncodeStatesTest, givenCommandContainerWhenIsKernelDispatchedFro
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
dispatchArgs.isKernelDispatchedFromImmediateCmdList = true; dispatchArgs.isKernelDispatchedFromImmediateCmdList = true;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
EXPECT_NE(0u, cmdContainer->getHeapWithRequiredSizeAndAlignmentCalled); EXPECT_NE(0u, cmdContainer->getHeapWithRequiredSizeAndAlignmentCalled);
} }

View File

@@ -37,7 +37,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenEventAddressWhenEncodeAndPVCA
dispatchArgs.eventAddress = eventAddress; dispatchArgs.eventAddress = eventAddress;
dispatchArgs.isTimestampEvent = true; dispatchArgs.isTimestampEvent = true;
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -62,7 +62,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenEventAddressWhenEncodeThenMoc
dispatchArgs.isTimestampEvent = true; dispatchArgs.isTimestampEvent = true;
dispatchArgs.dcFlushEnable = MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment()); dispatchArgs.dcFlushEnable = MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, pDevice->getRootDeviceEnvironment());
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -131,7 +131,7 @@ HWTEST2_F(CommandEncodeStatesTestDg2AndLater, givenOverridePreferredSlmAllocatio
bool requiresUncachedMocs = false; bool requiresUncachedMocs = false;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());

View File

@@ -40,7 +40,7 @@ HWTEST2_F(CommandEncodeStatesTestPvcAndLater, givenOverrideSlmTotalSizeDebugVari
cmdContainer->reset(); cmdContainer->reset();
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs); EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs, nullptr); EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
@@ -87,7 +87,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTestPvcAndLater, givenCommandCon
StreamProperties streamProperties{}; StreamProperties streamProperties{};
streamProperties.initSupport(rootDeviceEnvironment); streamProperties.initSupport(rootDeviceEnvironment);
streamProperties.stateComputeMode.setPropertiesAll(false, GrfConfig::LargeGrfNumber, 0u, PreemptionMode::Disabled); streamProperties.stateComputeMode.setPropertiesAll(false, GrfConfig::LargeGrfNumber, 0u, PreemptionMode::Disabled);
EncodeComputeMode<FamilyType>::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment, nullptr); EncodeComputeMode<FamilyType>::programComputeModeCommand(*cmdContainer->getCommandStream(), streamProperties.stateComputeMode, rootDeviceEnvironment);
GenCmdList commands; GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed()); CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());

Some files were not shown because too many files have changed in this diff Show More