mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Reorganization directory structure [4/n]
Change-Id: Ib868ed62d12ea8f9f123644219ba299e86a658ac
This commit is contained in:
71
shared/test/unit_test/gen8/cmd_parse_gen8.cpp
Normal file
71
shared/test/unit_test/gen8/cmd_parse_gen8.cpp
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/test/unit_test/gen_common/gen_cmd_parse.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
using GenStruct = NEO::GEN8;
|
||||
using GenGfxFamily = NEO::BDWFamily;
|
||||
#include "opencl/test/unit_test/gen_common/cmd_parse_base.inl"
|
||||
#include "opencl/test/unit_test/gen_common/cmd_parse_base_mi_arb.inl"
|
||||
#include "opencl/test/unit_test/gen_common/cmd_parse_gpgpu_walker.inl"
|
||||
#include "opencl/test/unit_test/gen_common/cmd_parse_sip.inl"
|
||||
#include "opencl/test/unit_test/helpers/hw_parse.h"
|
||||
#include "opencl/test/unit_test/helpers/hw_parse.inl"
|
||||
|
||||
template <>
|
||||
size_t CmdParse<GenGfxFamily>::getCommandLengthHwSpecific(void *cmd) {
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
template struct CmdParse<GenGfxFamily>;
|
||||
|
||||
namespace NEO {
|
||||
template void HardwareParse::findHardwareCommands<BDWFamily>();
|
||||
template void HardwareParse::findHardwareCommands<BDWFamily>(IndirectHeap *);
|
||||
template const void *HardwareParse::getStatelessArgumentPointer<BDWFamily>(const Kernel &kernel, uint32_t indexArg, IndirectHeap &ioh);
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user