2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2022-06-29 02:52:33 +08:00
|
|
|
* Copyright (C) 2021-2022 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-06-30 03:17:47 +08:00
|
|
|
#include "shared/source/gen8/hw_cmds_base.h"
|
2022-07-25 23:30:11 +08:00
|
|
|
using GenStruct = NEO::Gen8;
|
|
|
|
using GenGfxFamily = NEO::Gen8Family;
|
2022-06-30 03:17:47 +08:00
|
|
|
|
2021-01-21 20:10:13 +08:00
|
|
|
#include "shared/test/common/cmd_parse/cmd_parse_base.inl"
|
|
|
|
#include "shared/test/common/cmd_parse/cmd_parse_base_mi_arb.inl"
|
|
|
|
#include "shared/test/common/cmd_parse/cmd_parse_gpgpu_walker.inl"
|
|
|
|
#include "shared/test/common/cmd_parse/cmd_parse_sip.inl"
|
2022-06-30 03:17:47 +08:00
|
|
|
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
2021-01-21 20:10:13 +08:00
|
|
|
#include "shared/test/common/cmd_parse/hw_parse.h"
|
|
|
|
#include "shared/test/common/cmd_parse/hw_parse.inl"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
template <>
|
2018-10-22 21:09:08 +08:00
|
|
|
size_t CmdParse<GenGfxFamily>::getCommandLengthHwSpecific(void *cmd) {
|
2017-12-21 07:45:38 +08:00
|
|
|
{
|
|
|
|
auto pCmd = genCmdCast<GPGPU_WALKER *>(cmd);
|
|
|
|
if (pCmd)
|
|
|
|
return pCmd->TheStructure.Common.DwordLength + 2;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
auto pCmd = genCmdCast<MEDIA_INTERFACE_DESCRIPTOR_LOAD *>(cmd);
|
|
|
|
if (pCmd)
|
|
|
|
return pCmd->TheStructure.Common.DwordLength + 2;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
auto pCmd = genCmdCast<MEDIA_VFE_STATE *>(cmd);
|
|
|
|
if (pCmd)
|
|
|
|
return pCmd->TheStructure.Common.DwordLength + 2;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
auto pCmd = genCmdCast<MEDIA_STATE_FLUSH *>(cmd);
|
|
|
|
if (pCmd)
|
|
|
|
return pCmd->TheStructure.Common.DwordLength + 2;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-01-30 20:11:30 +08:00
|
|
|
template <>
|
|
|
|
const char *CmdParse<GenGfxFamily>::getCommandNameHwSpecific(void *cmd) {
|
|
|
|
if (nullptr != genCmdCast<GPGPU_WALKER *>(cmd)) {
|
|
|
|
return "GPGPU_WALKER";
|
|
|
|
}
|
|
|
|
|
|
|
|
if (nullptr != genCmdCast<MEDIA_INTERFACE_DESCRIPTOR_LOAD *>(cmd)) {
|
|
|
|
return "MEDIA_INTERFACE_DESCRIPTOR_LOAD";
|
|
|
|
}
|
|
|
|
|
|
|
|
if (nullptr != genCmdCast<MEDIA_VFE_STATE *>(cmd)) {
|
|
|
|
return "MEDIA_VFE_STATE";
|
|
|
|
}
|
|
|
|
|
|
|
|
if (nullptr != genCmdCast<MEDIA_STATE_FLUSH *>(cmd)) {
|
|
|
|
return "MEDIA_STATE_FLUSH";
|
|
|
|
}
|
|
|
|
return "UNKNOWN";
|
|
|
|
}
|
|
|
|
|
2018-10-22 21:09:08 +08:00
|
|
|
template struct CmdParse<GenGfxFamily>;
|
2018-05-21 22:41:58 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2022-07-25 23:30:11 +08:00
|
|
|
template void HardwareParse::findHardwareCommands<Gen8Family>();
|
|
|
|
template void HardwareParse::findHardwareCommands<Gen8Family>(IndirectHeap *);
|
|
|
|
template const void *HardwareParse::getStatelessArgumentPointer<Gen8Family>(const KernelInfo &kernelInfo, uint32_t indexArg, IndirectHeap &ioh, uint32_t rootDeviceIndex);
|
|
|
|
template const typename Gen8Family::RENDER_SURFACE_STATE *HardwareParse::getSurfaceState<Gen8Family>(IndirectHeap *ssh, uint32_t index);
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|