Update programming BarrierEnable
Related-To: NEO-3211 Change-Id: I27d04d12414738c8e4a3eef1d29967e47a61c0fb Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
parent
4d76fe93b0
commit
96031e7bba
|
@ -466,8 +466,8 @@ typedef struct tagINTERFACE_DESCRIPTOR_DATA {
|
|||
inline SHARED_LOCAL_MEMORY_SIZE getSharedLocalMemorySize(void) const {
|
||||
return static_cast<SHARED_LOCAL_MEMORY_SIZE>(TheStructure.Common.SharedLocalMemorySize);
|
||||
}
|
||||
inline void setBarrierEnable(const bool value) {
|
||||
TheStructure.Common.BarrierEnable = value;
|
||||
inline void setBarrierEnable(const uint32_t value) {
|
||||
TheStructure.Common.BarrierEnable = (value > 0u) ? 1u : 0u;
|
||||
}
|
||||
inline bool getBarrierEnable(void) const {
|
||||
return (TheStructure.Common.BarrierEnable);
|
||||
|
|
|
@ -468,8 +468,8 @@ typedef struct tagINTERFACE_DESCRIPTOR_DATA {
|
|||
inline SHARED_LOCAL_MEMORY_SIZE getSharedLocalMemorySize(void) const {
|
||||
return static_cast<SHARED_LOCAL_MEMORY_SIZE>(TheStructure.Common.SharedLocalMemorySize);
|
||||
}
|
||||
inline void setBarrierEnable(const bool value) {
|
||||
TheStructure.Common.BarrierEnable = value;
|
||||
inline void setBarrierEnable(const uint32_t value) {
|
||||
TheStructure.Common.BarrierEnable = (value > 0u) ? 1u : 0u;
|
||||
}
|
||||
inline bool getBarrierEnable(void) const {
|
||||
return (TheStructure.Common.BarrierEnable);
|
||||
|
|
|
@ -461,8 +461,8 @@ typedef struct tagINTERFACE_DESCRIPTOR_DATA {
|
|||
inline SHARED_LOCAL_MEMORY_SIZE getSharedLocalMemorySize(void) const {
|
||||
return static_cast<SHARED_LOCAL_MEMORY_SIZE>(TheStructure.Common.SharedLocalMemorySize);
|
||||
}
|
||||
inline void setBarrierEnable(const bool value) {
|
||||
TheStructure.Common.BarrierEnable = value;
|
||||
inline void setBarrierEnable(const uint32_t value) {
|
||||
TheStructure.Common.BarrierEnable = (value > 0u) ? 1u : 0u;
|
||||
}
|
||||
inline bool getBarrierEnable(void) const {
|
||||
return (TheStructure.Common.BarrierEnable);
|
||||
|
|
|
@ -198,7 +198,7 @@ void DeviceQueueHw<GfxFamily>::setupIndirectState(IndirectHeap &surfaceStateHeap
|
|||
pIDDestination[blockIndex + i] = *pBlockID;
|
||||
pIDDestination[blockIndex + i].setKernelStartPointerHigh(gpuAddress >> 32);
|
||||
pIDDestination[blockIndex + i].setKernelStartPointer((uint32_t)gpuAddress);
|
||||
pIDDestination[blockIndex + i].setBarrierEnable(pBlockInfo->patchInfo.executionEnvironment->HasBarriers > 0);
|
||||
pIDDestination[blockIndex + i].setBarrierEnable(pBlockInfo->patchInfo.executionEnvironment->HasBarriers);
|
||||
pIDDestination[blockIndex + i].setDenormMode(INTERFACE_DESCRIPTOR_DATA::DENORM_MODE_SETBYKERNEL);
|
||||
|
||||
// Set offset to sampler states, block's DHSOffset is added by scheduler
|
||||
|
|
|
@ -163,7 +163,7 @@ size_t HardwareCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
|||
auto programmableIDSLMSize = static_cast<typename INTERFACE_DESCRIPTOR_DATA::SHARED_LOCAL_MEMORY_SIZE>(computeSlmValues(kernel.slmTotalSize));
|
||||
|
||||
pInterfaceDescriptor->setSharedLocalMemorySize(programmableIDSLMSize);
|
||||
pInterfaceDescriptor->setBarrierEnable(!!kernel.getKernelInfo().patchInfo.executionEnvironment->HasBarriers);
|
||||
pInterfaceDescriptor->setBarrierEnable(kernel.getKernelInfo().patchInfo.executionEnvironment->HasBarriers);
|
||||
|
||||
PreemptionHelper::programInterfaceDescriptorDataPreemption<GfxFamily>(pInterfaceDescriptor, preemptionMode);
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ set(IGDRCL_SRCS_tests_gen_common
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/exclude_tests/exclude_test_exclude.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gen_cmd_parse.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gen_commands_common_validation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/matchers.h
|
||||
${NEO_CORE_DIRECTORY}/unit_tests/test_macros${BRANCH_DIR_SUFFIX}/test.h
|
||||
)
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/gen_common/hw_cmds.h"
|
||||
#include "test.h"
|
||||
|
||||
using InterfaceDescriptorDataTests = ::testing::Test;
|
||||
|
||||
HWTEST_F(InterfaceDescriptorDataTests, givenVariousValuesWhenCallingSetBarrierEnableThenCorrectValueIsSet) {
|
||||
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
||||
INTERFACE_DESCRIPTOR_DATA idd = FamilyType::cmdInitInterfaceDescriptorData;
|
||||
|
||||
idd.setBarrierEnable(0);
|
||||
EXPECT_FALSE(idd.getBarrierEnable());
|
||||
|
||||
idd.setBarrierEnable(1);
|
||||
EXPECT_TRUE(idd.getBarrierEnable());
|
||||
|
||||
idd.setBarrierEnable(2);
|
||||
EXPECT_TRUE(idd.getBarrierEnable());
|
||||
}
|
Loading…
Reference in New Issue