Files
compute-runtime/shared/test/common/cmd_parse/cmd_parse_sip.inl
Kamil Kopryk 8210997f17 refactor: move csrBaseAddress cmdCast to separate file
Related-To: NEO-10641
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
2024-08-08 08:32:53 +02:00

24 lines
809 B
C++

/*
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
// clang-format off
using namespace NEO;
using STATE_SIP = GenStruct::STATE_SIP;
// clang-format on
template <>
STATE_SIP *genCmdCast<STATE_SIP *>(void *buffer) {
auto pCmd = reinterpret_cast<STATE_SIP *>(buffer);
return STATE_SIP::COMMAND_TYPE_GFXPIPE == pCmd->TheStructure.Common.CommandType &&
STATE_SIP::COMMAND_SUBTYPE_GFXPIPE_COMMON == pCmd->TheStructure.Common.CommandSubtype &&
STATE_SIP::_3D_COMMAND_OPCODE_GFXPIPE_NONPIPELINED == pCmd->TheStructure.Common._3DCommandOpcode &&
STATE_SIP::_3D_COMMAND_SUB_OPCODE_STATE_SIP == pCmd->TheStructure.Common._3DCommandSubOpcode
? pCmd
: nullptr;
}