mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Cleanup: updateStreamProperties(), SBA tracking
Fixes found out while working on the StateBaseAddress adaptation to StreamProperties. Removing unused parameters, improving code reuse (further improvements come with following commits). Related-To: NEO-6774 Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f6ecb1bc0c
commit
e1b80ba1a8
@@ -125,9 +125,9 @@ struct CommandQueueHw : public CommandQueueImp {
|
||||
inline void allocateTagsManagerHeapsAndMakeThemResidentIfSWTagsEnabled(NEO::LinearStream &commandStream);
|
||||
inline void makeSbaTrackingBufferResidentIfL0DebuggerEnabled(bool isDebugEnabled);
|
||||
inline void programCommandQueueDebugCmdsForSourceLevelOrL0DebuggerIfEnabled(bool isDebugEnabled, NEO::LinearStream &commandStream);
|
||||
inline void programSbaWithUpdatedGsbaIfDirty(CommandListExecutionContext &ctx,
|
||||
ze_command_list_handle_t hCommandList,
|
||||
NEO::LinearStream &commandStream);
|
||||
inline void programStateBaseAddressWithGsbaIfDirty(CommandListExecutionContext &ctx,
|
||||
ze_command_list_handle_t hCommandList,
|
||||
NEO::LinearStream &commandStream);
|
||||
inline void programCsrBaseAddressIfPreemptionModeInitial(bool isPreemptionModeInitial, NEO::LinearStream &commandStream);
|
||||
inline void programStateSip(bool isStateSipRequired, NEO::LinearStream &commandStream);
|
||||
inline void updateOneCmdListPreemptionModeAndCtxStatePreemption(CommandListExecutionContext &ctx,
|
||||
|
||||
@@ -144,7 +144,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsRegular(
|
||||
|
||||
this->programPipelineSelectIfGpgpuDisabled(child);
|
||||
this->programCommandQueueDebugCmdsForSourceLevelOrL0DebuggerIfEnabled(ctx.isDebugEnabled, child);
|
||||
this->programSbaWithUpdatedGsbaIfDirty(ctx, phCommandLists[0], child);
|
||||
this->programStateBaseAddressWithGsbaIfDirty(ctx, phCommandLists[0], child);
|
||||
this->programCsrBaseAddressIfPreemptionModeInitial(ctx.isPreemptionModeInitial, child);
|
||||
this->programStateSip(ctx.stateSipRequired, child);
|
||||
this->makePreemptionAllocationResidentForModeMidThread(ctx.isDevicePreemptionModeMidThread);
|
||||
@@ -716,7 +716,7 @@ void CommandQueueHw<gfxCoreFamily>::programCommandQueueDebugCmdsForSourceLevelOr
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
void CommandQueueHw<gfxCoreFamily>::programSbaWithUpdatedGsbaIfDirty(
|
||||
void CommandQueueHw<gfxCoreFamily>::programStateBaseAddressWithGsbaIfDirty(
|
||||
CommandListExecutionContext &ctx,
|
||||
ze_command_list_handle_t hCommandList,
|
||||
NEO::LinearStream &cmdStream) {
|
||||
|
||||
@@ -79,17 +79,13 @@ void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool
|
||||
|
||||
NEO::StateBaseAddressHelper<GfxFamily>::programStateBaseAddress(stateBaseAddressHelperArgs);
|
||||
*sbaCmdBuf = sbaCmd;
|
||||
csr->setGSBAStateDirty(false);
|
||||
|
||||
if (NEO::Debugger::isDebugEnabled(internalUsage) && device->getL0Debugger()) {
|
||||
|
||||
NEO::Debugger::SbaAddresses sbaAddresses = {};
|
||||
NEO::EncodeStateBaseAddress<GfxFamily>::setSbaAddressesForDebugger(sbaAddresses, sbaCmd);
|
||||
|
||||
device->getL0Debugger()->programSbaTrackingCommands(commandStream, sbaAddresses);
|
||||
}
|
||||
bool sbaTrackingEnabled = (NEO::Debugger::isDebugEnabled(this->internalUsage) && device->getL0Debugger());
|
||||
NEO::EncodeStateBaseAddress<GfxFamily>::setSbaTrackingForL0DebuggerIfEnabled(sbaTrackingEnabled, *neoDevice, commandStream, sbaCmd, true);
|
||||
|
||||
NEO::EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(commandStream, {}, false, hwInfo, isRcs);
|
||||
|
||||
csr->setGSBAStateDirty(false);
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/command_stream/csr_definitions.h"
|
||||
#include "shared/source/command_stream/scratch_space_controller.h"
|
||||
@@ -76,13 +77,12 @@ void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool
|
||||
*sbaCmdBuf = sbaCmd;
|
||||
}
|
||||
|
||||
if (NEO::Debugger::isDebugEnabled(internalUsage) && device->getL0Debugger()) {
|
||||
|
||||
NEO::Debugger::SbaAddresses sbaAddresses = {};
|
||||
NEO::EncodeStateBaseAddress<GfxFamily>::setSbaAddressesForDebugger(sbaAddresses, sbaCmd);
|
||||
|
||||
device->getL0Debugger()->programSbaTrackingCommands(commandStream, sbaAddresses);
|
||||
}
|
||||
bool sbaTrackingEnabled = (NEO::Debugger::isDebugEnabled(this->internalUsage) && device->getL0Debugger());
|
||||
NEO::EncodeStateBaseAddress<GfxFamily>::setSbaTrackingForL0DebuggerIfEnabled(sbaTrackingEnabled,
|
||||
*neoDevice,
|
||||
commandStream,
|
||||
sbaCmd,
|
||||
true);
|
||||
|
||||
auto heap = neoDevice->getBindlessHeapsHelper()->getHeap(NEO::BindlessHeapsHelper::GLOBAL_SSH);
|
||||
NEO::StateBaseAddressHelper<GfxFamily>::programBindingTableBaseAddress(
|
||||
|
||||
Reference in New Issue
Block a user