mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:41:26 +08:00
Dont inject commands between blits
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a068a618e4
commit
f7905128ca
@@ -42,30 +42,23 @@ uint64_t BlitCommandsHelper<GfxFamily>::getMaxBlitHeight(const RootDeviceEnviron
|
||||
|
||||
template <typename GfxFamily>
|
||||
void BlitCommandsHelper<GfxFamily>::dispatchPostBlitCommand(LinearStream &linearStream) {
|
||||
switch (DebugManager.flags.PostBlitCommand.get()) {
|
||||
case 1:
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, false, false);
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
default: {
|
||||
if (DebugManager.flags.PostBlitCommand.get() == 0) {
|
||||
auto miArbCheckStream = linearStream.getSpaceForCmd<typename GfxFamily::MI_ARB_CHECK>();
|
||||
*miArbCheckStream = GfxFamily::cmdInitArbCheck;
|
||||
break;
|
||||
}
|
||||
} else if (DebugManager.flags.PostBlitCommand.get() == 1) {
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
size_t BlitCommandsHelper<GfxFamily>::estimatePostBlitCommandSize() {
|
||||
switch (DebugManager.flags.PostBlitCommand.get()) {
|
||||
case 1:
|
||||
return sizeof(typename GfxFamily::MI_FLUSH_DW);
|
||||
case 2:
|
||||
return 0;
|
||||
default:
|
||||
if (DebugManager.flags.PostBlitCommand.get() == 0) {
|
||||
return sizeof(typename GfxFamily::MI_ARB_CHECK);
|
||||
} else if (DebugManager.flags.PostBlitCommand.get() == 1) {
|
||||
return sizeof(typename GfxFamily::MI_FLUSH_DW);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -96,7 +96,8 @@ HWTEST_F(BlitTests, givenDebugVariableWhenEstimatingPostBlitsCommandSizeThenRetu
|
||||
|
||||
DebugManagerStateRestore restore{};
|
||||
|
||||
EXPECT_EQ(arbCheckSize, BlitCommandsHelper<FamilyType>::estimatePostBlitCommandSize());
|
||||
EXPECT_EQ(0u, BlitCommandsHelper<FamilyType>::estimatePostBlitCommandSize());
|
||||
|
||||
DebugManager.flags.PostBlitCommand.set(0);
|
||||
EXPECT_EQ(arbCheckSize, BlitCommandsHelper<FamilyType>::estimatePostBlitCommandSize());
|
||||
|
||||
@@ -117,9 +118,7 @@ HWTEST_F(BlitTests, givenDebugVariableWhenDispatchingPostBlitsCommandThenUseCorr
|
||||
|
||||
// -1: default
|
||||
BlitCommandsHelper<FamilyType>::dispatchPostBlitCommand(linearStream);
|
||||
CmdParse<FamilyType>::parseCommandBuffer(commands, linearStream.getCpuBase(), linearStream.getUsed());
|
||||
auto arbCheck = find<MI_ARB_CHECK *>(commands.begin(), commands.end());
|
||||
EXPECT_NE(commands.end(), arbCheck);
|
||||
EXPECT_EQ(0u, linearStream.getUsed());
|
||||
|
||||
// 0: MI_ARB_CHECK
|
||||
memset(streamBuffer, 0, sizeof(streamBuffer));
|
||||
@@ -128,7 +127,7 @@ HWTEST_F(BlitTests, givenDebugVariableWhenDispatchingPostBlitsCommandThenUseCorr
|
||||
DebugManager.flags.PostBlitCommand.set(0);
|
||||
BlitCommandsHelper<FamilyType>::dispatchPostBlitCommand(linearStream);
|
||||
CmdParse<FamilyType>::parseCommandBuffer(commands, linearStream.getCpuBase(), linearStream.getUsed());
|
||||
arbCheck = find<MI_ARB_CHECK *>(commands.begin(), commands.end());
|
||||
auto arbCheck = find<MI_ARB_CHECK *>(commands.begin(), commands.end());
|
||||
EXPECT_NE(commands.end(), arbCheck);
|
||||
|
||||
// 1: MI_FLUSH_DW
|
||||
|
||||
Reference in New Issue
Block a user