fix: Unify command parse for MEM_SET

Related-To: NEO-13147

Signed-off-by: Vysochyn, Illia <illia.vysochyn@intel.com>
This commit is contained in:
Vysochyn, Illia
2025-01-08 18:43:46 +00:00
committed by Compute-Runtime-Automation
parent e742aa065c
commit 910816010f
2 changed files with 8 additions and 8 deletions

View File

@@ -7264,9 +7264,9 @@ typedef struct tagMEM_SET {
typedef enum tagCLIENT { typedef enum tagCLIENT {
CLIENT_2D_PROCESSOR = 0x2, CLIENT_2D_PROCESSOR = 0x2,
} CLIENT; } CLIENT;
typedef enum tagINSTRUCTIONTARGET_OPCODE { typedef enum tagINSTRUCTION_TARGETOPCODE {
INSTRUCTIONTARGET_OPCODE_OPCODE = 0x5B, INSTRUCTION_TARGETOPCODE_MEM_SET = 0x5b,
} INSTRUCTIONTARGET_OPCODE; } INSTRUCTION_TARGETOPCODE;
inline void init() { inline void init() {
memset(&TheStructure, 0, sizeof(TheStructure)); memset(&TheStructure, 0, sizeof(TheStructure));
TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1;
@@ -7274,7 +7274,7 @@ typedef struct tagMEM_SET {
TheStructure.Common.DestinationCompressible = DESTINATION_COMPRESSIBLE_NOT_COMPRESSIBLE; TheStructure.Common.DestinationCompressible = DESTINATION_COMPRESSIBLE_NOT_COMPRESSIBLE;
TheStructure.Common.FillType = FILL_TYPE_LINEAR_FILL; TheStructure.Common.FillType = FILL_TYPE_LINEAR_FILL;
TheStructure.Common.Client = CLIENT_2D_PROCESSOR; TheStructure.Common.Client = CLIENT_2D_PROCESSOR;
TheStructure.Common.InstructionTarget_Opcode = INSTRUCTIONTARGET_OPCODE::INSTRUCTIONTARGET_OPCODE_OPCODE; TheStructure.Common.InstructionTarget_Opcode = INSTRUCTION_TARGETOPCODE::INSTRUCTION_TARGETOPCODE_MEM_SET;
} }
static tagMEM_SET sInit() { static tagMEM_SET sInit() {
MEM_SET state; MEM_SET state;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2024 Intel Corporation * Copyright (C) 2024-2025 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@@ -14,9 +14,9 @@ template <>
MEM_SET *genCmdCast<MEM_SET *>(void *buffer) { MEM_SET *genCmdCast<MEM_SET *>(void *buffer) {
auto pCmd = reinterpret_cast<MEM_SET *>(buffer); auto pCmd = reinterpret_cast<MEM_SET *>(buffer);
return (0x5 == pCmd->TheStructure.Common.DwordLength && return (MEM_SET::DWORD_LENGTH::DWORD_LENGTH_EXCLUDES_DWORD_0_1 == pCmd->TheStructure.Common.DwordLength &&
0x5B == pCmd->TheStructure.Common.InstructionTarget_Opcode && MEM_SET::INSTRUCTION_TARGETOPCODE::INSTRUCTION_TARGETOPCODE_MEM_SET == pCmd->TheStructure.Common.InstructionTarget_Opcode &&
0x2 == pCmd->TheStructure.Common.Client) MEM_SET::CLIENT::CLIENT_2D_PROCESSOR == pCmd->TheStructure.Common.Client)
? pCmd ? pCmd
: nullptr; : nullptr;
} }