mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 02:18:05 +08:00
refactor: move gmm callbacks definition to common place
- merge all the callbacks to single template class - store callback functions in global arrays - partially reuse callbacks on Linux Related-To: NEO-11080 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a7e40d1543
commit
ec36dd6275
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -20,6 +20,9 @@ extern GfxCoreHelperCreateFunctionType gfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
using Family = XeHpcCoreFamily;
|
||||
static auto gfxFamily = IGFX_XE_HPC_CORE;
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct GmmCallbacks;
|
||||
|
||||
struct EnableCoreXeHpcCore {
|
||||
EnableCoreXeHpcCore() {
|
||||
gfxCoreHelperFactory[gfxFamily] = GfxCoreHelperHw<Family>::create;
|
||||
@@ -27,6 +30,7 @@ struct EnableCoreXeHpcCore {
|
||||
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
||||
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
||||
populateFactoryTable<DebuggerL0Hw<Family>>();
|
||||
populateFactoryTable<GmmCallbacks<Family>>();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
13
shared/source/xe_hpc_core/gmm_callbacks_xe_hpc_core.cpp
Normal file
13
shared/source/xe_hpc_core/gmm_callbacks_xe_hpc_core.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h"
|
||||
|
||||
static auto gfxCore = IGFX_XE_HPC_CORE;
|
||||
using Family = NEO::XeHpcCoreFamily;
|
||||
|
||||
#include "gmm_callbacks.inl"
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/windows/gmm_callbacks.inl"
|
||||
#include "shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template struct DeviceCallbacks<XeHpcCoreFamily>;
|
||||
template struct TTCallbacks<XeHpcCoreFamily>;
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user