Remove from api_intercept api_enter

- create new api_enter file
- fix dependencies
- remove platform include form wddm

Change-Id: I5614c3aadbf373b58dfdb34f2f3dec8977e20a3d
This commit is contained in:
kamdiedrich
2020-01-02 13:20:18 +01:00
committed by sys_ocldev
parent 8e3c5892ac
commit cfca7215e3
10 changed files with 36 additions and 78 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2018-2019 Intel Corporation
# Copyright (C) 2018-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -10,6 +10,7 @@ set(RUNTIME_SRCS_API
${CMAKE_CURRENT_SOURCE_DIR}/additional_extensions.h
${CMAKE_CURRENT_SOURCE_DIR}/api.cpp
${CMAKE_CURRENT_SOURCE_DIR}/api.h
${CMAKE_CURRENT_SOURCE_DIR}/api_enter.h
${CMAKE_CURRENT_SOURCE_DIR}/cl_types.h
${CMAKE_CURRENT_SOURCE_DIR}/dispatch.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dispatch.h

View File

@@ -1,11 +1,12 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "public/cl_ext_private.h"
#include "runtime/api/api_enter.h"
#include "runtime/api/dispatch.h"
#include "CL/cl.h"

19
runtime/api/api_enter.h Normal file
View File

@@ -0,0 +1,19 @@
/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/utilities/logger.h"
#include "runtime/utilities/perf_profiler.h"
#define API_ENTER(retValPointer) \
LoggerApiEnterWrapper<NEO::FileLogger<globalDebugFunctionalityLevel>::enabled()> ApiWrapperForSingleCall(__FUNCTION__, retValPointer)
#if KMD_PROFILING == 1
#undef API_ENTER
#define API_ENTER(x) \
PerfProfilerApiWrapper globalPerfProfilersWrapperInstanceForSingleApiFunction(__FUNCTION__)
#endif

View File

@@ -1,10 +1,11 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/debug_settings/debug_settings_manager.h"
#include "core/execution_environment/root_device_environment.h"
#include "core/helpers/hw_info.h"
#include "runtime/device/device.h"

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -7,6 +7,8 @@
#include "drm_neo.h"
#include "core/debug_settings/debug_settings_manager.h"
#include "core/helpers/debug_helpers.h"
#include "core/helpers/hw_info.h"
#include "core/memory_manager/memory_constants.h"
#include "core/os_interface/linux/os_inc.h"

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -7,6 +7,8 @@
#include "gdi_interface.h"
#include "core/debug_settings/debug_settings_manager.h"
namespace NEO {
inline const std::string getGdiName() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -11,65 +11,6 @@
#include <d3dkmthk.h>
namespace NEO {
// IDs for easy system times identification
enum SystemCallsIds {
SYSTIMER_ID_OPENADAPTERFROMHDC = 1,
SYSTIMER_ID_OPENADAPTERFROMLUID = 2,
SYSTIMER_ID_CLOSEADAPTER = 3,
SYSTIMER_ID_QUERYADAPTERINFO = 4,
SYSTIMER_ID_ESCAPE = 5,
SYSTIMER_ID_CREATEDEVICE = 6,
SYSTIMER_ID_DESTROYDEVICE = 7,
SYSTIMER_ID_CREATECONTEXT = 8,
SYSTIMER_ID_DESTROYCONTEXT = 9,
SYSTIMER_ID_CREATEALLOCATION = 10,
SYSTIMER_ID_DESTROYALLOCATION = 11,
SYSTIMER_ID_OPENRESOURCE = 12,
SYSTIMER_ID_QUERYRESOURCEINFO = 13,
SYSTIMER_ID_LOCK = 14,
SYSTIMER_ID_UNLOCK = 15,
SYSTIMER_ID_RENDER = 16,
SYSTIMER_ID_CREATESYNCHRONIZATIONOBJECT = 17,
SYSTIMER_ID_DESTROYSYNCHRONIZATIONOBJECT = 18,
SYSTIMER_ID_SIGNALSYNCHRONIZATIONOBJECT = 19,
SYSTIMER_ID_WAITFORSYNCHRONIZATIONOBJECT = 20,
SYSTIMER_ID_CREATESYNCHRONIZATIONOBJECT2 = 21,
SYSTIMER_ID_GETDEVICESTATE = 22,
SYSTIMER_ID_MAKERESIDENT = 23,
SYSTIMER_ID_EVICT = 24,
SYSTIMER_ID_WAITFORSYNCHRONIZATIONOBJECTFROMCPU = 25,
SYSTIMER_ID_SIGNALSYNCHRONIZATIONOBJECTFROMCPU = 26,
SYSTIMER_ID_WAITFORSYNCHRONIZATIONOBJECTFROMGPU = 27,
SYSTIMER_ID_SIGNALSYNCHRONIZATIONOBJECTFROMGPU = 28,
SYSTIMER_ID_CREATEPAGINGQUEUE = 29,
SYSTIMER_ID_D3DDDI_DESTROYPAGINGQUEUE = 30,
SYSTIMER_ID_LOCK2 = 31,
SYSTIMER_ID_UNLOCK2 = 32,
SYSTIMER_ID_INVALIDATECACHE = 33,
SYSTIMER_ID_D3DDDI_MAPGPUVIRTUALADDRESS = 34,
SYSTIMER_ID_D3DDDI_RESERVEGPUVIRTUALADDRESS = 35,
SYSTIMER_ID_FREEGPUVIRTUALADDRESS = 36,
SYSTIMER_ID_UPDATEGPUVIRTUALADDRESS = 37,
SYSTIMER_ID_CREATECONTEXTVIRTUAL = 38,
SYSTIMER_ID_SUBMITCOMMAND = 39,
SYSTIMER_ID_OPENSYNCOBJECTFROMNTHANDLE2 = 40,
SYSTIMER_ID_OPENSYNCOBJECTNTHANDLEFROMNAME = 41,
SYSTIMER_ID_DESTROYALLOCATION2 = 42,
SYSTIMER_ID_REGISTERTRIMNOTIFICATION = 43,
SYSTIMER_ID_UNREGISTERTRIMNOTIFICATION = 44,
SYSTIMER_ID_QUERYRESOURCEINFOFROMNTHANDLE = 45,
SYSTIMER_ID_OPENRESOURCEFROMNTHANDLE = 46,
SYSTIMER_ID_CREATEHWQUEUE = 47,
SYSTIMER_ID_DESTROYHWQUEUE = 48,
SYSTIMER_ID_SUBMITCOMMANDTOHWQUEUE = 49,
SYSTIMER_ID_SLEEP_0 = 100,
SYSTIMER_ID_WAIT_FOR_KMD = 200,
SYSTIMER_ID_CMD_COMPLETE = 300,
SYSTIMER_ID_OGL = 400,
};
template <typename Param>
class ThkWrapper {
typedef NTSTATUS(APIENTRY *Func)(Param);

View File

@@ -28,7 +28,6 @@
#include "runtime/os_interface/windows/wddm/wddm_interface.h"
#include "runtime/os_interface/windows/wddm_allocation.h"
#include "runtime/os_interface/windows/wddm_residency_allocations_container.h"
#include "runtime/platform/platform.h"
#include "gmm_memory.h"
@@ -117,7 +116,7 @@ bool Wddm::init(HardwareInfo &outHardwareInfo) {
return false;
}
platform()->peekExecutionEnvironment()->initGmm();
rootDeviceEnvironment.executionEnvironment.initGmm();
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(outHardwareInfo);

View File

@@ -1,31 +1,22 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/utilities/logger.h"
#include "runtime/utilities/perf_profiler.h"
#define API_ENTER(retValPointer) \
LoggerApiEnterWrapper<NEO::FileLogger<globalDebugFunctionalityLevel>::enabled()> ApiWrapperForSingleCall(__FUNCTION__, retValPointer)
#define SYSTEM_ENTER()
#define SYSTEM_LEAVE(id)
#define WAIT_ENTER()
#define WAIT_LEAVE()
#if KMD_PROFILING == 1
#undef API_ENTER
#undef SYSTEM_ENTER
#undef SYSTEM_LEAVE
#undef WAIT_ENTER
#undef WAIT_LEAVE
#define API_ENTER(x) \
PerfProfilerApiWrapper globalPerfProfilersWrapperInstanceForSingleApiFunction(__FUNCTION__)
#define SYSTEM_ENTER() \
PerfProfiler::create(); \
gPerfProfiler->systemEnter();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -8,6 +8,7 @@
#pragma once
#include "core/helpers/aligned_memory.h"
#include "core/helpers/hw_helper.h"
#include "core/helpers/options.h"
#include "runtime/os_interface/linux/drm_memory_manager.h"
#include "runtime/os_interface/linux/drm_neo.h"
#include "unit_tests/helpers/gtest_helpers.h"