mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Use L3_CONTROL only for DG1
Related-To: LOCI-1877 Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a79f67958e
commit
6f555d6258
@@ -10,6 +10,7 @@ set(NEO_SHARED_TESTS_CMD_PARSE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_base_mi_arb.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_compute_mode.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_gpgpu_walker.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_l3_control.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_mi_arb.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_sip.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gen_cmd_parse.h
|
||||
|
||||
32
shared/test/common/cmd_parse/cmd_parse_l3_control.inl
Normal file
32
shared/test/common/cmd_parse/cmd_parse_l3_control.inl
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2016-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
using namespace NEO;
|
||||
using L3_CONTROL_BASE = GenStruct::L3_CONTROL_BASE;
|
||||
using L3_CONTROL = GenStruct::L3_CONTROL;
|
||||
|
||||
template <>
|
||||
L3_CONTROL_BASE *genCmdCast<L3_CONTROL_BASE *>(void *buffer) {
|
||||
auto pCmd = reinterpret_cast<L3_CONTROL_BASE *>(buffer);
|
||||
|
||||
return L3_CONTROL_BASE::TYPE_GFXPIPE == pCmd->TheStructure.Common.Type &&
|
||||
L3_CONTROL_BASE::COMMAND_SUBTYPE_GFXPIPE_3D == pCmd->TheStructure.Common.CommandSubtype &&
|
||||
L3_CONTROL_BASE::_3D_COMMAND_OPCODE_L3_CONTROL == pCmd->TheStructure.Common._3DCommandOpcode &&
|
||||
L3_CONTROL_BASE::_3D_COMMAND_SUB_OPCODE_L3_CONTROL == pCmd->TheStructure.Common._3DCommandSubOpcode
|
||||
? pCmd
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
template <>
|
||||
L3_CONTROL *genCmdCast<L3_CONTROL *>(void *buffer) {
|
||||
auto pCmd = genCmdCast<L3_CONTROL_BASE *>(buffer);
|
||||
if (pCmd == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return reinterpret_cast<L3_CONTROL *>(pCmd);
|
||||
}
|
||||
@@ -1,14 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
* Copyright (C) 2016-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/cmd_parse/cmd_parse_l3_control.inl"
|
||||
|
||||
size_t getAdditionalCommandLengthHwSpecific(void *cmd) {
|
||||
using L3_CONTROL_WITH_POST_SYNC = typename GenGfxFamily::L3_CONTROL;
|
||||
using L3_CONTROL_WITHOUT_POST_SYNC = typename GenGfxFamily::L3_CONTROL;
|
||||
|
||||
auto pCmdWithPostSync = genCmdCast<L3_CONTROL_WITH_POST_SYNC *>(cmd);
|
||||
if (pCmdWithPostSync)
|
||||
return pCmdWithPostSync->getBase().TheStructure.Common.Length + 2;
|
||||
|
||||
auto pCmdWithoutPostSync = genCmdCast<L3_CONTROL_WITHOUT_POST_SYNC *>(cmd);
|
||||
if (pCmdWithoutPostSync)
|
||||
return pCmdWithoutPostSync->getBase().TheStructure.Common.Length + 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *getAdditionalCommandNameHwSpecific(void *cmd) {
|
||||
using L3_CONTROL_WITH_POST_SYNC = typename GenGfxFamily::L3_CONTROL;
|
||||
using L3_CONTROL_WITHOUT_POST_SYNC = typename GenGfxFamily::L3_CONTROL;
|
||||
|
||||
if (nullptr != genCmdCast<L3_CONTROL_WITH_POST_SYNC *>(cmd)) {
|
||||
return "L3_CONTROL(POST_SYNC)";
|
||||
}
|
||||
|
||||
if (nullptr != genCmdCast<L3_CONTROL_WITHOUT_POST_SYNC *>(cmd)) {
|
||||
return "L3_CONTROL(NO_POST_SYNC)";
|
||||
}
|
||||
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
@@ -1098,6 +1098,7 @@ using IsAtLeastGen12lp = IsAtLeastGfxCore<IGFX_GEN12LP_CORE>;
|
||||
|
||||
using IsBXT = IsProduct<IGFX_BROXTON>;
|
||||
using IsCFL = IsProduct<IGFX_COFFEELAKE>;
|
||||
using IsDG1 = IsProduct<IGFX_DG1>;
|
||||
using IsEHL = IsProduct<IGFX_ELKHARTLAKE>;
|
||||
using IsGLK = IsProduct<IGFX_GEMINILAKE>;
|
||||
using IsICLLP = IsProduct<IGFX_ICELAKE_LP>;
|
||||
|
||||
Reference in New Issue
Block a user