mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 20:13:04 +08:00
Add start override to Direct Submission debug flags
Related-To: NEO-5010 Change-Id: I6d690d3f1aef9ad377ad44db0f3be753ad831f63 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
a4ba92338a
commit
e910e28819
@@ -100,7 +100,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
|
||||
bool initDirectSubmission(Device &device, OsContext &osContext) override;
|
||||
bool checkDirectSubmissionSupportsEngine(const DirectSubmissionProperties &directSubmissionProperty,
|
||||
aub_stream::EngineType contextEngineType);
|
||||
aub_stream::EngineType contextEngineType,
|
||||
bool &startOnInit);
|
||||
|
||||
protected:
|
||||
void programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags);
|
||||
|
||||
@@ -1070,15 +1070,17 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission(Device &dev
|
||||
startDirect = directSubmissionProperty.useRootDevice;
|
||||
}
|
||||
|
||||
bool submitOnInit = directSubmissionProperty.submitOnInit;
|
||||
bool engineSupported = checkDirectSubmissionSupportsEngine(directSubmissionProperty,
|
||||
contextEngineType);
|
||||
contextEngineType,
|
||||
submitOnInit);
|
||||
if (engineSupported && startDirect) {
|
||||
if (contextEngineType == aub_stream::ENGINE_BCS) {
|
||||
blitterDirectSubmission = DirectSubmissionHw<GfxFamily, BlitterDispatcher<GfxFamily>>::create(device, osContext);
|
||||
ret = blitterDirectSubmission->initialize(directSubmissionProperty.submitOnInit);
|
||||
ret = blitterDirectSubmission->initialize(submitOnInit);
|
||||
} else {
|
||||
directSubmission = DirectSubmissionHw<GfxFamily, RenderDispatcher<GfxFamily>>::create(device, osContext);
|
||||
ret = directSubmission->initialize(directSubmissionProperty.submitOnInit);
|
||||
ret = directSubmission->initialize(submitOnInit);
|
||||
this->dispatchMode = DispatchMode::ImmediateDispatch;
|
||||
}
|
||||
}
|
||||
@@ -1088,23 +1090,28 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission(Device &dev
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool CommandStreamReceiverHw<GfxFamily>::checkDirectSubmissionSupportsEngine(const DirectSubmissionProperties &directSubmissionProperty,
|
||||
aub_stream::EngineType contextEngineType) {
|
||||
aub_stream::EngineType contextEngineType,
|
||||
bool &startOnInit) {
|
||||
bool supported = directSubmissionProperty.engineSupported;
|
||||
startOnInit = directSubmissionProperty.submitOnInit;
|
||||
if (contextEngineType == aub_stream::ENGINE_BCS) {
|
||||
int32_t blitterOverrideKey = DebugManager.flags.DirectSubmissionOverrideBlitterSupport.get();
|
||||
if (blitterOverrideKey != -1) {
|
||||
supported = blitterOverrideKey == 0 ? false : true;
|
||||
startOnInit = blitterOverrideKey == 1 ? true : false;
|
||||
}
|
||||
} else if (contextEngineType == aub_stream::ENGINE_RCS) {
|
||||
int32_t renderOverrideKey = DebugManager.flags.DirectSubmissionOverrideRenderSupport.get();
|
||||
if (renderOverrideKey != -1) {
|
||||
supported = renderOverrideKey == 0 ? false : true;
|
||||
startOnInit = renderOverrideKey == 1 ? true : false;
|
||||
}
|
||||
} else {
|
||||
//assume else is CCS
|
||||
int32_t computeOverrideKey = DebugManager.flags.DirectSubmissionOverrideComputeSupport.get();
|
||||
if (computeOverrideKey != -1) {
|
||||
supported = computeOverrideKey == 0 ? false : true;
|
||||
startOnInit = computeOverrideKey == 1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user