diff --git a/level_zero/core/source/mutable_cmdlist/mutable_semaphore_wait_hw.inl b/level_zero/core/source/mutable_cmdlist/mutable_semaphore_wait_hw.inl index 006efcfaab..e90cd058c3 100644 --- a/level_zero/core/source/mutable_cmdlist/mutable_semaphore_wait_hw.inl +++ b/level_zero/core/source/mutable_cmdlist/mutable_semaphore_wait_hw.inl @@ -58,7 +58,8 @@ void MutableSemaphoreWaitHw::restoreWithSemaphoreAddress(GpuAddress s template void MutableSemaphoreWaitHw::setSemaphoreValue(uint64_t value) { - NEO::EncodeSemaphore::setMiSemaphoreWaitValue(semWait, value); + auto semWaitCmd = reinterpret_cast(semWait); + semWaitCmd->setSemaphoreDataDword(static_cast(value)); } } // namespace L0::MCL diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp index 3a1979fa2c..5858c1e1ae 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp @@ -91,6 +91,11 @@ HWTEST_F(BcsTests, givenDebugCapabilityWhenEstimatingCommandSizeThenAddAllRequir constexpr uint32_t numberOfBlts = 3; constexpr size_t bltSize = (numberOfBlts * max2DBlitSize); + waArgs.isWaRequired = true; + auto expectedSize = (cmdsSizePerBlit * numberOfBlts) + debugCommandsSize + (2 * MemorySynchronizationCommands::getSizeForAdditionalSynchronization(NEO::FenceType::release, pDevice->getRootDeviceEnvironment())) + + EncodeMiFlushDW::getCommandSizeWithWa(waArgs) + sizeof(typename FamilyType::MI_BATCH_BUFFER_END); + expectedSize = alignUp(expectedSize, MemoryConstants::cacheLineSize); + MockGraphicsAllocation bufferMockAllocation(0, 1u, AllocationType::buffer, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::localMemory, MemoryManager::maxOsContextCount); MockGraphicsAllocation hostMockAllocation(0, 1u, AllocationType::externalHostPtr, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system64KBPages, MemoryManager::maxOsContextCount); @@ -101,19 +106,6 @@ HWTEST_F(BcsTests, givenDebugCapabilityWhenEstimatingCommandSizeThenAddAllRequir BlitPropertiesContainer blitPropertiesContainer; blitPropertiesContainer.push_back(blitProperties); - waArgs.isWaRequired = true; - auto &rootDeviceEnvironment = pClDevice->getRootDeviceEnvironment(); - auto expectedSize = (cmdsSizePerBlit * numberOfBlts) + debugCommandsSize + (2 * MemorySynchronizationCommands::getSizeForAdditionalSynchronization(NEO::FenceType::release, rootDeviceEnvironment)) + - EncodeMiFlushDW::getCommandSizeWithWa(waArgs) + sizeof(typename FamilyType::MI_BATCH_BUFFER_END); - - bool deviceToHostPostSyncFenceRequired = rootDeviceEnvironment.getProductHelper().isDeviceToHostCopySignalingFenceRequired() && - !hostMockAllocation.isAllocatedInLocalMemoryPool() && - bufferMockAllocation.isAllocatedInLocalMemoryPool(); - if (deviceToHostPostSyncFenceRequired) { - expectedSize += MemorySynchronizationCommands::getSizeForAdditionalSynchronization(NEO::FenceType::release, rootDeviceEnvironment); - } - - expectedSize = alignUp(expectedSize, MemoryConstants::cacheLineSize); auto estimatedSize = BlitCommandsHelper::estimateBlitCommandsSize( blitPropertiesContainer, false, true, false, false, pClDevice->getRootDeviceEnvironment()); diff --git a/shared/source/command_container/command_encoder.h b/shared/source/command_container/command_encoder.h index 41a3579d99..0a8108c3b1 100644 --- a/shared/source/command_container/command_encoder.h +++ b/shared/source/command_container/command_encoder.h @@ -592,7 +592,8 @@ struct EncodeSemaphore { static constexpr size_t getSizeMiSemaphoreWait() { return sizeof(MI_SEMAPHORE_WAIT); } - static void setMiSemaphoreWaitValue(void *cmd, uint64_t semaphoreValue); + protected: + static void appendSemaphoreCommand(MI_SEMAPHORE_WAIT &cmd, uint64_t compareData, bool indirect, bool useQwordData, bool switchOnUnsuccessful); }; template diff --git a/shared/source/command_container/command_encoder_from_xe_hpg_core_to_xe3_core.inl b/shared/source/command_container/command_encoder_from_xe_hpg_core_to_xe3_core.inl index ed9fef7d68..d1b2baf632 100644 --- a/shared/source/command_container/command_encoder_from_xe_hpg_core_to_xe3_core.inl +++ b/shared/source/command_container/command_encoder_from_xe_hpg_core_to_xe3_core.inl @@ -31,32 +31,9 @@ void EncodeSurfaceState::convertSurfaceStateToPacked(R_SURFACE_STATE *su } template -void EncodeSemaphore::programMiSemaphoreWait(MI_SEMAPHORE_WAIT *cmd, - uint64_t compareAddress, - uint64_t compareData, - COMPARE_OPERATION compareMode, - bool registerPollMode, - bool waitMode, - bool useQwordData, - bool indirect, - bool switchOnUnsuccessful) { +void EncodeSemaphore::appendSemaphoreCommand(MI_SEMAPHORE_WAIT &cmd, uint64_t compareData, bool indirect, bool useQwordData, bool switchOnUnsuccessful) { constexpr uint64_t upper32b = static_cast(std::numeric_limits::max()) << 32; UNRECOVERABLE_IF(useQwordData || (compareData & upper32b)); - - MI_SEMAPHORE_WAIT localCmd = Family::cmdInitMiSemaphoreWait; - localCmd.setCompareOperation(compareMode); - localCmd.setSemaphoreDataDword(static_cast(compareData)); - localCmd.setSemaphoreGraphicsAddress(compareAddress); - localCmd.setWaitMode(waitMode ? MI_SEMAPHORE_WAIT::WAIT_MODE::WAIT_MODE_POLLING_MODE : MI_SEMAPHORE_WAIT::WAIT_MODE::WAIT_MODE_SIGNAL_MODE); - localCmd.setRegisterPollMode(registerPollMode ? MI_SEMAPHORE_WAIT::REGISTER_POLL_MODE::REGISTER_POLL_MODE_REGISTER_POLL : MI_SEMAPHORE_WAIT::REGISTER_POLL_MODE::REGISTER_POLL_MODE_MEMORY_POLL); - localCmd.setIndirectSemaphoreDataDword(indirect); - - *cmd = localCmd; -} - -template -void EncodeSemaphore::setMiSemaphoreWaitValue(void *cmd, uint64_t semaphoreValue) { - reinterpret_cast(cmd)->setSemaphoreDataDword(static_cast(semaphoreValue)); } template diff --git a/shared/source/command_container/command_encoder_xehp_and_later.inl b/shared/source/command_container/command_encoder_xehp_and_later.inl index ccced434ae..d50af20ac9 100644 --- a/shared/source/command_container/command_encoder_xehp_and_later.inl +++ b/shared/source/command_container/command_encoder_xehp_and_later.inl @@ -831,6 +831,29 @@ void EncodeSurfaceState::encodeExtraBufferParams(EncodeSurfaceStateArgs surfaceState->setCompressionFormat(compressionFormat); } +template +void EncodeSemaphore::programMiSemaphoreWait(MI_SEMAPHORE_WAIT *cmd, + uint64_t compareAddress, + uint64_t compareData, + COMPARE_OPERATION compareMode, + bool registerPollMode, + bool waitMode, + bool useQwordData, + bool indirect, + bool switchOnUnsuccessful) { + MI_SEMAPHORE_WAIT localCmd = Family::cmdInitMiSemaphoreWait; + localCmd.setCompareOperation(compareMode); + localCmd.setSemaphoreDataDword(static_cast(compareData)); + localCmd.setSemaphoreGraphicsAddress(compareAddress); + localCmd.setWaitMode(waitMode ? MI_SEMAPHORE_WAIT::WAIT_MODE::WAIT_MODE_POLLING_MODE : MI_SEMAPHORE_WAIT::WAIT_MODE::WAIT_MODE_SIGNAL_MODE); + localCmd.setRegisterPollMode(registerPollMode ? MI_SEMAPHORE_WAIT::REGISTER_POLL_MODE::REGISTER_POLL_MODE_REGISTER_POLL : MI_SEMAPHORE_WAIT::REGISTER_POLL_MODE::REGISTER_POLL_MODE_MEMORY_POLL); + localCmd.setIndirectSemaphoreDataDword(indirect); + + EncodeSemaphore::appendSemaphoreCommand(localCmd, compareData, indirect, useQwordData, switchOnUnsuccessful); + + *cmd = localCmd; +} + template inline void EncodeWA::encodeAdditionalPipelineSelect(LinearStream &stream, const PipelineSelectArgs &args, bool is3DPipeline, const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs) {} diff --git a/shared/source/gen12lp/command_encoder_gen12lp.cpp b/shared/source/gen12lp/command_encoder_gen12lp.cpp index 8a26d00211..584f3eb71f 100644 --- a/shared/source/gen12lp/command_encoder_gen12lp.cpp +++ b/shared/source/gen12lp/command_encoder_gen12lp.cpp @@ -582,11 +582,6 @@ void EncodeSemaphore::programMiSemaphoreWait(MI_SEMAPHORE_WAIT *cmd, *cmd = localCmd; } -template -void EncodeSemaphore::setMiSemaphoreWaitValue(void *cmd, uint64_t semaphoreValue) { - reinterpret_cast(cmd)->setSemaphoreDataDword(static_cast(semaphoreValue)); -} - template void EncodeEnableRayTracing::programEnableRayTracing(LinearStream &commandStream, uint64_t backBuffer) { } @@ -716,6 +711,12 @@ template void EncodeSurfaceState::convertSurfaceStateToPacked(R_SURFACE_STATE *surfaceState, ImageInfo &imgInfo) { } +template +void EncodeSemaphore::appendSemaphoreCommand(MI_SEMAPHORE_WAIT &cmd, uint64_t compareData, bool indirect, bool useQwordData, bool switchOnUnsuccessful) { + constexpr uint64_t upper32b = static_cast(std::numeric_limits::max()) << 32; + UNRECOVERABLE_IF(useQwordData || (compareData & upper32b)); +} + template template void EncodeDispatchKernel::setScratchAddress(uint64_t &scratchAddress, uint32_t requiredScratchSlot0Size, uint32_t requiredScratchSlot1Size, IndirectHeap *ssh, CommandStreamReceiver &submissionCsr) { diff --git a/shared/source/generated/xe3p_core/hw_cmds_generated_xe3p_core.inl b/shared/source/generated/xe3p_core/hw_cmds_generated_xe3p_core.inl index 5acdcf36d9..b991e500ca 100644 --- a/shared/source/generated/xe3p_core/hw_cmds_generated_xe3p_core.inl +++ b/shared/source/generated/xe3p_core/hw_cmds_generated_xe3p_core.inl @@ -8084,187 +8084,6 @@ typedef struct tagMI_SEMAPHORE_WAIT { } MI_SEMAPHORE_WAIT; STATIC_ASSERT(20 == sizeof(MI_SEMAPHORE_WAIT)); -typedef struct tagMI_SEMAPHORE_WAIT_64 { - union tagTheStructure { - struct tagCommon { - // DWORD 0 - uint32_t DwordLength : BITFIELD_RANGE(0, 7); - uint32_t SwTokenInfo : BITFIELD_RANGE(8, 10); - uint32_t QueueSwitchMode : BITFIELD_RANGE(11, 11); - uint32_t CompareOperation : BITFIELD_RANGE(12, 14); - uint32_t CommandControlledInhibitContextSwitch : BITFIELD_RANGE(15, 15); - uint32_t RegisterPollMode : BITFIELD_RANGE(16, 16); - uint32_t IndirectSemaphoreDataDword : BITFIELD_RANGE(17, 17); - uint32_t WorkloadPartitionIdOffsetEnable : BITFIELD_RANGE(18, 18); - uint32_t _64BCompareDisable : BITFIELD_RANGE(19, 19); - uint32_t SemaphoreInterrupt : BITFIELD_RANGE(20, 20); - uint32_t FastModePoll : BITFIELD_RANGE(21, 21); - uint32_t MemoryType : BITFIELD_RANGE(22, 22); - uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); - uint32_t CommandType : BITFIELD_RANGE(29, 31); - // DWORD 1 - uint64_t SemaphoreDataDword; - // DWORD 3 - uint64_t Reserved_96 : BITFIELD_RANGE(0, 1); - uint64_t SemaphoreAddress : BITFIELD_RANGE(2, 63); - // DWORD 5 - uint64_t SemaphoreToken; - } Common; - uint32_t RawData[7]; - } TheStructure; - typedef enum tagDWORD_LENGTH { - DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x5, - } DWORD_LENGTH; - typedef enum tagQUEUE_SWITCH_MODE { - QUEUE_SWITCH_MODE_SWITCH_AFTER_COMMAND_IS_PARSED = 0x0, - QUEUE_SWITCH_MODE_SWITCH_QUEUE_ON_UNSUCCESSFUL = 0x1, - } QUEUE_SWITCH_MODE; - typedef enum tagCOMPARE_OPERATION { - COMPARE_OPERATION_SAD_GREATER_THAN_SDD = 0x0, - COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD = 0x1, - COMPARE_OPERATION_SAD_LESS_THAN_SDD = 0x2, - COMPARE_OPERATION_SAD_LESS_THAN_OR_EQUAL_SDD = 0x3, - COMPARE_OPERATION_SAD_EQUAL_SDD = 0x4, - COMPARE_OPERATION_SAD_NOT_EQUAL_SDD = 0x5, - } COMPARE_OPERATION; - typedef enum tagWAIT_MODE { // patched - WAIT_MODE_SIGNAL_MODE = 0x0, - WAIT_MODE_POLLING_MODE = 0x1, - } WAIT_MODE; - typedef enum tagREGISTER_POLL_MODE { - REGISTER_POLL_MODE_MEMORY_POLL = 0x0, - REGISTER_POLL_MODE_REGISTER_POLL = 0x1, - } REGISTER_POLL_MODE; - typedef enum tag_64B_COMPARE_DISABLE { - _64B_COMPARE_DISABLE_64B_COMPARE = 0x0, - _64B_COMPARE_DISABLE_32B_COMPARE = 0x1, - } _64B_COMPARE_DISABLE; - typedef enum tagMEMORY_TYPE { - MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS = 0x0, - MEMORY_TYPE_GLOBAL_GRAPHICS_ADDRESS = 0x1, - } MEMORY_TYPE; - typedef enum tagMI_COMMAND_OPCODE { - MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT = 0x3b, // patched (name only): for compatibility between MI_SEMAPHORE_WAIT and MI_SEMAPHORE_WAIT_64 - } MI_COMMAND_OPCODE; - typedef enum tagCOMMAND_TYPE { - COMMAND_TYPE_MI_COMMAND = 0x0, - } COMMAND_TYPE; - inline void init() { - memset(&TheStructure, 0, sizeof(TheStructure)); - TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1; - TheStructure.Common.QueueSwitchMode = QUEUE_SWITCH_MODE_SWITCH_AFTER_COMMAND_IS_PARSED; - TheStructure.Common.CompareOperation = COMPARE_OPERATION_SAD_GREATER_THAN_SDD; - TheStructure.Common.RegisterPollMode = REGISTER_POLL_MODE_MEMORY_POLL; // patched - TheStructure.Common._64BCompareDisable = _64B_COMPARE_DISABLE_64B_COMPARE; - TheStructure.Common.MemoryType = MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS; - TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT; // patched - TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND; - } - static tagMI_SEMAPHORE_WAIT_64 sInit() { - MI_SEMAPHORE_WAIT_64 state; - state.init(); - return state; - } - inline uint32_t &getRawData(const uint32_t index) { - UNRECOVERABLE_IF(index >= 7); - return TheStructure.RawData[index]; - } - inline void setSwTokenInfo(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x7); - TheStructure.Common.SwTokenInfo = value; - } - inline uint32_t getSwTokenInfo() const { - return TheStructure.Common.SwTokenInfo; - } - inline void setQueueSwitchMode(const QUEUE_SWITCH_MODE value) { - TheStructure.Common.QueueSwitchMode = value; - } - inline QUEUE_SWITCH_MODE getQueueSwitchMode() const { - return static_cast(TheStructure.Common.QueueSwitchMode); - } - inline void setCompareOperation(const COMPARE_OPERATION value) { - TheStructure.Common.CompareOperation = value; - } - inline COMPARE_OPERATION getCompareOperation() const { - return static_cast(TheStructure.Common.CompareOperation); - } - inline void setCommandControlledInhibitContextSwitch(const bool value) { - TheStructure.Common.CommandControlledInhibitContextSwitch = value; - } - inline bool getCommandControlledInhibitContextSwitch() const { - return TheStructure.Common.CommandControlledInhibitContextSwitch; - } - inline void setRegisterPollMode(const REGISTER_POLL_MODE value) { - TheStructure.Common.RegisterPollMode = value; - } - inline REGISTER_POLL_MODE getRegisterPollMode() const { - return static_cast(TheStructure.Common.RegisterPollMode); - } - inline void setIndirectSemaphoreDataDword(const bool value) { - TheStructure.Common.IndirectSemaphoreDataDword = value; - } - inline bool getIndirectSemaphoreDataDword() const { - return TheStructure.Common.IndirectSemaphoreDataDword; - } - inline void setWorkloadPartitionIdOffsetEnable(const bool value) { - TheStructure.Common.WorkloadPartitionIdOffsetEnable = value; - } - inline bool getWorkloadPartitionIdOffsetEnable() const { - return TheStructure.Common.WorkloadPartitionIdOffsetEnable; - } - inline void set64BCompareDisable(const _64B_COMPARE_DISABLE value) { - TheStructure.Common._64BCompareDisable = value; - } - inline _64B_COMPARE_DISABLE get64BCompareDisable() const { - return static_cast<_64B_COMPARE_DISABLE>(TheStructure.Common._64BCompareDisable); - } - inline void setSemaphoreInterrupt(const bool value) { - TheStructure.Common.SemaphoreInterrupt = value; - } - inline bool getSemaphoreInterrupt() const { - return TheStructure.Common.SemaphoreInterrupt; - } - inline void setFastModePoll(const bool value) { - TheStructure.Common.FastModePoll = value; - } - inline bool getFastModePoll() const { - return TheStructure.Common.FastModePoll; - } - inline void setMemoryType(const MEMORY_TYPE value) { - TheStructure.Common.MemoryType = value; - } - inline MEMORY_TYPE getMemoryType() const { - return static_cast(TheStructure.Common.MemoryType); - } - inline void setSemaphoreDataDword(const uint64_t value) { - TheStructure.Common.SemaphoreDataDword = value; - } - inline uint64_t getSemaphoreDataDword() const { - return TheStructure.Common.SemaphoreDataDword; - } - typedef enum tagSEMAPHOREADDRESS { - SEMAPHOREADDRESS_BIT_SHIFT = 0x2, - SEMAPHOREADDRESS_ALIGN_SIZE = 0x4, - } SEMAPHOREADDRESS; - inline void setSemaphoreGraphicsAddress(const uint64_t value) { - TheStructure.Common.SemaphoreAddress = value >> SEMAPHOREADDRESS_BIT_SHIFT; - } - inline uint64_t getSemaphoreGraphicsAddress() const { // patched - return TheStructure.Common.SemaphoreAddress << SEMAPHOREADDRESS_BIT_SHIFT; - } - inline void setSemaphoreToken(const uint64_t value) { - TheStructure.Common.SemaphoreToken = value; - } - inline uint64_t getSemaphoreToken() const { - return TheStructure.Common.SemaphoreToken; - } - inline WAIT_MODE getWaitMode() const { - return WAIT_MODE_POLLING_MODE; // patched - 64-bit semaphore always pool - } - -} MI_SEMAPHORE_WAIT_64; -STATIC_ASSERT(28 == sizeof(MI_SEMAPHORE_WAIT_64)); - typedef struct tagMI_STORE_DATA_IMM { union tagTheStructure { struct tagCommon { diff --git a/shared/source/helpers/in_order_cmd_helpers.h b/shared/source/helpers/in_order_cmd_helpers.h index b141c65499..258e023c3c 100644 --- a/shared/source/helpers/in_order_cmd_helpers.h +++ b/shared/source/helpers/in_order_cmd_helpers.h @@ -7,7 +7,6 @@ #pragma once -#include "shared/source/command_container/command_encoder.h" #include "shared/source/helpers/common_types.h" #include "shared/source/helpers/mt_helpers.h" #include "shared/source/helpers/non_copyable_or_moveable.h" @@ -249,7 +248,8 @@ struct PatchCmd { } } - EncodeSemaphore::setMiSemaphoreWaitValue(cmd1, static_cast(baseCounterValue + appendCounterValue)); + auto semaphoreCmd = reinterpret_cast(cmd1); + semaphoreCmd->setSemaphoreDataDword(static_cast(baseCounterValue + appendCounterValue)); } void patchComputeWalker(uint64_t appendCounterValue); diff --git a/shared/source/xe3p_core/hw_cmds_base.h b/shared/source/xe3p_core/hw_cmds_base.h index fc9ed9cab4..92a03a9c9f 100644 --- a/shared/source/xe3p_core/hw_cmds_base.h +++ b/shared/source/xe3p_core/hw_cmds_base.h @@ -125,8 +125,6 @@ struct Xe3pCoreFamily : public Xe3pCore { using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM; using TimestampPacketType = uint64_t; using StallingBarrierType = PIPE_CONTROL; - using MI_SEMAPHORE_WAIT_LEGACY = MI_SEMAPHORE_WAIT; - using MI_SEMAPHORE_WAIT = MI_SEMAPHORE_WAIT_64; static const COMPUTE_WALKER_2 cmdInitGpgpuWalker2; static const COMPUTE_WALKER cmdInitGpgpuWalker; static const CFE_STATE cmdInitCfeState; @@ -139,7 +137,6 @@ struct Xe3pCoreFamily : public Xe3pCore { static const STATE_COMPUTE_MODE cmdInitStateComputeMode; static const _3DSTATE_BINDING_TABLE_POOL_ALLOC cmdInitStateBindingTablePoolAlloc; static const MI_SEMAPHORE_WAIT cmdInitMiSemaphoreWait; - static const MI_SEMAPHORE_WAIT_LEGACY cmdInitMiSemaphoreWaitLegacy; static const RENDER_SURFACE_STATE cmdInitRenderSurfaceState; static const POSTSYNC_DATA cmdInitPostSyncData; static const MI_SET_PREDICATE cmdInitSetPredicate; diff --git a/shared/test/common/cmd_parse/cmd_parse_base.inl b/shared/test/common/cmd_parse/cmd_parse_base.inl index cac49eab8d..9e0d89bbeb 100644 --- a/shared/test/common/cmd_parse/cmd_parse_base.inl +++ b/shared/test/common/cmd_parse/cmd_parse_base.inl @@ -24,7 +24,7 @@ using STATE_BASE_ADDRESS = typename StateBaseAddressTypeHelperaddAggregatedEventUsageCounter(7); EXPECT_EQ(7u, inOrderExecInfo->getAggregatedEventUsageCounter()); } - -HWTEST_F(CommandEncoderTests, givenMiSemaphoreWaitCommandWhenSettingSemaphoreValueThenValueIsSet) { - auto semaphoreCmd = FamilyType::cmdInitMiSemaphoreWait; - const uint32_t testValue = 0x12345678ul; - - EncodeSemaphore::setMiSemaphoreWaitValue(reinterpret_cast(&semaphoreCmd), testValue); - EXPECT_EQ(testValue, semaphoreCmd.getSemaphoreDataDword()); -}