mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Decompose hw helper for GTPin functionality
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
223a42c3c7
commit
da7eaff0fe
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.h"
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.inl"
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl"
|
||||
|
||||
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.h"
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.inl"
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl"
|
||||
|
||||
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.h"
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.inl"
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl"
|
||||
|
||||
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.h"
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.inl"
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl"
|
||||
|
||||
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018-2020 Intel Corporation
|
||||
# Copyright (C) 2018-2021 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -13,6 +13,7 @@ if(NOT DISABLED_GTPIN_SUPPORT)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper_bdw_plus.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_init.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_init.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_notify.h
|
||||
@@ -34,3 +35,5 @@ endif()
|
||||
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_GTPIN})
|
||||
set_property(GLOBAL PROPERTY RUNTIME_SRCS_GTPIN ${RUNTIME_SRCS_GTPIN})
|
||||
set(MSVC_DEF_ADDITIONAL_EXPORTS "${MSVC_DEF_ADDITIONAL_EXPORTS}" PARENT_SCOPE)
|
||||
|
||||
add_subdirectories()
|
||||
|
||||
@@ -55,15 +55,4 @@ void *GTPinHwHelperHw<GfxFamily>::getSurfaceState(Kernel *pKernel, size_t bti) {
|
||||
auto pSurfaceState = ptrOffset(pKernel->getSurfaceStateHeap(), pBts->getSurfaceStatePointer());
|
||||
return pSurfaceState;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool GTPinHwHelperHw<GfxFamily>::canUseSharedAllocation(const HardwareInfo &hwInfo) const {
|
||||
bool canUseSharedAllocation = false;
|
||||
if (DebugManager.flags.GTPinAllocateBufferInSharedMemory.get() != -1) {
|
||||
canUseSharedAllocation = !!DebugManager.flags.GTPinAllocateBufferInSharedMemory.get();
|
||||
}
|
||||
canUseSharedAllocation &= hwInfo.capabilityTable.ftrSvm;
|
||||
return canUseSharedAllocation;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
24
opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl
Normal file
24
opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
|
||||
#include "opencl/source/gtpin/gtpin_hw_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool GTPinHwHelperHw<GfxFamily>::canUseSharedAllocation(const HardwareInfo &hwInfo) const {
|
||||
bool canUseSharedAllocation = false;
|
||||
if (DebugManager.flags.GTPinAllocateBufferInSharedMemory.get() != -1) {
|
||||
canUseSharedAllocation = !!DebugManager.flags.GTPinAllocateBufferInSharedMemory.get();
|
||||
}
|
||||
canUseSharedAllocation &= hwInfo.capabilityTable.ftrSvm;
|
||||
return canUseSharedAllocation;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2017-2020 Intel Corporation
|
||||
# Copyright (C) 2017-2021 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -19,3 +19,4 @@ apply_macro_for_each_gen("TESTED")
|
||||
if(NOT DISABLED_GTPIN_SUPPORT)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gtpin})
|
||||
endif()
|
||||
add_subdirectories()
|
||||
|
||||
Reference in New Issue
Block a user