Enhance debug flag for post blit commands

Change-Id: Ia5dccd083d84ab1b7a1e772f7fd1d5344aa3c6b1
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2020-10-14 14:56:39 +02:00
committed by sys_ocldev
parent 971969ba15
commit 21988a81e1
4 changed files with 48 additions and 21 deletions

View File

@@ -73,7 +73,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, PauseOnGpuMode, -1, "-1: default (before and aft
DECLARE_DEBUG_VARIABLE(int32_t, EnableMultiStorageResources, -1, "-1: default, 0: Disable, 1: Enable")
DECLARE_DEBUG_VARIABLE(int32_t, LimitBlitterMaxWidth, -1, "-1: default, >=0: Max width")
DECLARE_DEBUG_VARIABLE(int32_t, LimitBlitterMaxHeight, -1, "-1: default, >=0: Max height")
DECLARE_DEBUG_VARIABLE(int32_t, FlushAfterEachBlit, -1, "-1: default, 0: disable, 1: enable")
DECLARE_DEBUG_VARIABLE(int32_t, PostBlitCommand, -1, "-1: default, 0: MI_ARB_CHECK, 1: MI_FLUSH, 2: Nothing")
DECLARE_DEBUG_VARIABLE(int32_t, OverridePreemptionSurfaceSizeInMb, -1, "-1: default, >=0 Override preemption surface size with value")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideLeastOccupiedBank, -1, "-1: default, >=0 Override least occupied bank with value")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideRevision, -1, "-1: default, >=0: Revision id")

View File

@@ -41,30 +41,30 @@ uint64_t BlitCommandsHelper<GfxFamily>::getMaxBlitHeight(const RootDeviceEnviron
template <typename GfxFamily>
void BlitCommandsHelper<GfxFamily>::dispatchPostBlitCommand(LinearStream &linearStream) {
bool useFlush = false;
if (DebugManager.flags.FlushAfterEachBlit.get() != -1) {
useFlush = static_cast<bool>(DebugManager.flags.FlushAfterEachBlit.get());
}
if (useFlush) {
switch (DebugManager.flags.PostBlitCommand.get()) {
case 1:
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, false, false);
} else {
break;
case 2:
break;
default: {
auto miArbCheckStream = linearStream.getSpaceForCmd<typename GfxFamily::MI_ARB_CHECK>();
*miArbCheckStream = GfxFamily::cmdInitArbCheck;
break;
}
}
}
template <typename GfxFamily>
size_t BlitCommandsHelper<GfxFamily>::estimatePostBlitCommandSize() {
bool useFlush = false;
if (DebugManager.flags.FlushAfterEachBlit.get() != -1) {
useFlush = static_cast<bool>(DebugManager.flags.FlushAfterEachBlit.get());
}
if (useFlush) {
switch (DebugManager.flags.PostBlitCommand.get()) {
case 1:
return sizeof(typename GfxFamily::MI_FLUSH_DW);
case 2:
return 0;
default:
return sizeof(typename GfxFamily::MI_ARB_CHECK);
}
return sizeof(typename GfxFamily::MI_ARB_CHECK);
}
template <typename GfxFamily>