mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add mi_arb_check between blit commands
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b913cce8e4
commit
39e6548ef6
@@ -144,5 +144,6 @@ struct BlitCommandsHelper {
|
||||
static bool isCopyRegionPreferred(const Vec3<size_t> ©Size, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
static void programGlobalSequencerFlush(LinearStream &commandStream);
|
||||
static size_t getSizeForGlobalSequencerFlush();
|
||||
static bool miArbCheckWaRequired();
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -42,23 +42,44 @@ uint64_t BlitCommandsHelper<GfxFamily>::getMaxBlitHeight(const RootDeviceEnviron
|
||||
|
||||
template <typename GfxFamily>
|
||||
void BlitCommandsHelper<GfxFamily>::dispatchPostBlitCommand(LinearStream &linearStream) {
|
||||
if (DebugManager.flags.PostBlitCommand.get() == 0) {
|
||||
auto miArbCheckStream = linearStream.getSpaceForCmd<typename GfxFamily::MI_ARB_CHECK>();
|
||||
*miArbCheckStream = GfxFamily::cmdInitArbCheck;
|
||||
} else if (DebugManager.flags.PostBlitCommand.get() == 1) {
|
||||
if (DebugManager.flags.PostBlitCommand.get() != BlitterConstants::PostBlitMode::Default) {
|
||||
switch (DebugManager.flags.PostBlitCommand.get()) {
|
||||
case BlitterConstants::PostBlitMode::MiArbCheck:
|
||||
EncodeMiArbCheck<GfxFamily>::program(linearStream);
|
||||
return;
|
||||
case BlitterConstants::PostBlitMode::MiFlush:
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, false, false);
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (BlitCommandsHelper<GfxFamily>::miArbCheckWaRequired()) {
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, false, false);
|
||||
}
|
||||
|
||||
EncodeMiArbCheck<GfxFamily>::program(linearStream);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
size_t BlitCommandsHelper<GfxFamily>::estimatePostBlitCommandSize() {
|
||||
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);
|
||||
if (DebugManager.flags.PostBlitCommand.get() != BlitterConstants::PostBlitMode::Default) {
|
||||
switch (DebugManager.flags.PostBlitCommand.get()) {
|
||||
case BlitterConstants::PostBlitMode::MiArbCheck:
|
||||
return EncodeMiArbCheck<GfxFamily>::getCommandSize();
|
||||
case BlitterConstants::PostBlitMode::MiFlush:
|
||||
return EncodeMiFlushDW<GfxFamily>::getMiFlushDwCmdSizeForDataWrite();
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
if (BlitCommandsHelper<GfxFamily>::miArbCheckWaRequired()) {
|
||||
return (EncodeMiArbCheck<GfxFamily>::getCommandSize() + EncodeMiFlushDW<GfxFamily>::getMiFlushDwCmdSizeForDataWrite());
|
||||
}
|
||||
|
||||
return EncodeMiArbCheck<GfxFamily>::getCommandSize();
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -82,4 +82,9 @@ size_t BlitCommandsHelper<GfxFamily>::getSizeForGlobalSequencerFlush() {
|
||||
return 0u;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool BlitCommandsHelper<GfxFamily>::miArbCheckWaRequired() {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -71,6 +71,13 @@ enum class BlitDirection : uint32_t {
|
||||
HostPtrToImage,
|
||||
ImageToHostPtr
|
||||
};
|
||||
|
||||
enum PostBlitMode : int32_t {
|
||||
Default = -1,
|
||||
MiArbCheck = 0,
|
||||
MiFlush = 1,
|
||||
None = 2
|
||||
};
|
||||
} // namespace BlitterConstants
|
||||
|
||||
namespace CommonConstants {
|
||||
|
||||
Reference in New Issue
Block a user