Add blitter support to direct submission

Related-To: NEO-5010

Change-Id: I084cec54a233e920b2868d2a61c60d1d87d0a91e
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2020-08-31 19:50:48 +02:00
parent c7e92738c6
commit 1afc985577
7 changed files with 189 additions and 12 deletions

View File

@@ -99,6 +99,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
}
bool initDirectSubmission(Device &device, OsContext &osContext) override;
bool checkDirectSubmissionSupportsEngine(const DirectSubmissionProperties &directSubmissionProperty,
aub_stream::EngineType contextEngineType);
protected:
void programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags);

View File

@@ -1070,7 +1070,9 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission(Device &dev
startDirect = directSubmissionProperty.useRootDevice;
}
if (directSubmissionProperty.engineSupported && startDirect) {
bool engineSupported = checkDirectSubmissionSupportsEngine(directSubmissionProperty,
contextEngineType);
if (engineSupported && startDirect) {
if (contextEngineType == aub_stream::ENGINE_BCS) {
blitterDirectSubmission = DirectSubmissionHw<GfxFamily, BlitterDispatcher<GfxFamily>>::create(device, osContext);
ret = blitterDirectSubmission->initialize(directSubmissionProperty.submitOnInit);
@@ -1084,4 +1086,29 @@ inline bool CommandStreamReceiverHw<GfxFamily>::initDirectSubmission(Device &dev
return ret;
}
template <typename GfxFamily>
inline bool CommandStreamReceiverHw<GfxFamily>::checkDirectSubmissionSupportsEngine(const DirectSubmissionProperties &directSubmissionProperty,
aub_stream::EngineType contextEngineType) {
bool supported = directSubmissionProperty.engineSupported;
if (contextEngineType == aub_stream::ENGINE_BCS) {
int32_t blitterOverrideKey = DebugManager.flags.DirectSubmissionOverrideBlitterSupport.get();
if (blitterOverrideKey != -1) {
supported = blitterOverrideKey == 0 ? false : true;
}
} else if (contextEngineType == aub_stream::ENGINE_RCS) {
int32_t renderOverrideKey = DebugManager.flags.DirectSubmissionOverrideRenderSupport.get();
if (renderOverrideKey != -1) {
supported = renderOverrideKey == 0 ? false : true;
}
} else {
//assume else is CCS
int32_t computeOverrideKey = DebugManager.flags.DirectSubmissionOverrideComputeSupport.get();
if (computeOverrideKey != -1) {
supported = computeOverrideKey == 0 ? false : true;
}
}
return supported;
}
} // namespace NEO