2020-01-30 00:43:20 +08:00
|
|
|
#
|
2021-03-10 02:02:59 +08:00
|
|
|
# Copyright (C) 2020-2021 Intel Corporation
|
2020-01-30 00:43:20 +08:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
|
|
|
|
|
|
|
set(CORE_SRCS_GENX_H_BASE
|
2020-08-19 18:18:18 +08:00
|
|
|
hw_cmds.h
|
|
|
|
hw_info.h
|
|
|
|
hw_cmds_base.h
|
2020-08-27 04:36:51 +08:00
|
|
|
aub_mapper.h
|
2020-01-30 00:43:20 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(CORE_RUNTIME_SRCS_GENX_CPP_BASE
|
2021-09-23 17:03:22 +08:00
|
|
|
aub_command_stream_receiver
|
2021-09-27 19:41:26 +08:00
|
|
|
aub_mem_dump
|
2020-08-19 18:18:18 +08:00
|
|
|
command_encoder
|
|
|
|
command_stream_receiver_hw
|
2021-09-23 17:03:22 +08:00
|
|
|
command_stream_receiver_simulated_common_hw
|
|
|
|
create_device_command_stream_receiver
|
2021-06-08 03:47:12 +08:00
|
|
|
direct_submission
|
2020-08-19 18:18:18 +08:00
|
|
|
hw_helper
|
2021-09-24 03:59:00 +08:00
|
|
|
hw_info
|
2020-08-19 18:18:18 +08:00
|
|
|
preamble
|
|
|
|
preemption
|
2020-11-26 21:40:53 +08:00
|
|
|
state_base_address
|
2021-09-23 17:03:22 +08:00
|
|
|
tbx_command_stream_receiver
|
2020-01-30 00:43:20 +08:00
|
|
|
)
|
|
|
|
|
2021-09-27 20:07:42 +08:00
|
|
|
set(CORE_RUNTIME_SRCS_GENX_CPP_WDDM
|
2021-09-23 17:03:22 +08:00
|
|
|
windows/command_stream_receiver
|
2020-08-19 18:18:18 +08:00
|
|
|
windows/direct_submission
|
2021-09-24 04:20:46 +08:00
|
|
|
windows/gmm_callbacks
|
2020-01-16 00:02:47 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(CORE_RUNTIME_SRCS_GENX_CPP_LINUX
|
2021-09-23 17:03:22 +08:00
|
|
|
linux/command_stream_receiver
|
2020-08-19 18:18:18 +08:00
|
|
|
linux/direct_submission
|
2020-01-16 00:02:47 +08:00
|
|
|
)
|
|
|
|
|
2020-01-30 00:43:20 +08:00
|
|
|
macro(macro_for_each_platform)
|
|
|
|
string(TOLOWER ${PLATFORM_IT} PLATFORM_IT_LOWER)
|
|
|
|
|
2021-03-10 02:02:59 +08:00
|
|
|
foreach(BRANCH_DIR ${BRANCH_DIR_LIST})
|
2021-09-24 03:59:00 +08:00
|
|
|
set(PLATFORM_FILE "hw_info_setup_${PLATFORM_IT_LOWER}.inl")
|
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}/definitions${BRANCH_DIR_SUFFIX}${PLATFORM_FILE})
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_CPP_BASE ${SRC_FILE})
|
|
|
|
endif()
|
2021-06-30 06:18:07 +08:00
|
|
|
foreach(BRANCH ${BRANCH_DIR_LIST})
|
2021-08-04 08:04:09 +08:00
|
|
|
|
2021-09-14 21:18:04 +08:00
|
|
|
set(PLATFORM_FILE "hw_cmds_${PLATFORM_IT_LOWER}.h")
|
|
|
|
set(PATH_TO_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}${PLATFORM_FILE})
|
|
|
|
if(EXISTS ${PATH_TO_FILE})
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_H_BASE ${PATH_TO_FILE})
|
|
|
|
endif()
|
2021-06-30 06:18:07 +08:00
|
|
|
|
2021-09-12 23:12:32 +08:00
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}linux/hw_info_config_${PLATFORM_IT_LOWER}.cpp)
|
|
|
|
if(EXISTS ${SRC_FILE})
|
2021-09-27 20:07:42 +08:00
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_CPP_LINUX ${SRC_FILE})
|
2021-09-12 23:12:32 +08:00
|
|
|
endif()
|
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}windows/hw_info_config_${PLATFORM_IT_LOWER}.cpp)
|
|
|
|
if(EXISTS ${SRC_FILE})
|
2021-09-27 20:07:42 +08:00
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_CPP_WINDOWS ${SRC_FILE})
|
2021-09-12 23:12:32 +08:00
|
|
|
endif()
|
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}enable_hw_info_config_${PLATFORM_IT_LOWER}.cpp)
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
|
|
|
endif()
|
2021-08-04 08:04:09 +08:00
|
|
|
|
2021-08-09 16:38:18 +08:00
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/ail${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}${PLATFORM_IT_LOWER}/ail_configuration_${PLATFORM_IT_LOWER}.cpp)
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
|
|
|
endif()
|
|
|
|
|
2021-07-19 20:20:47 +08:00
|
|
|
set(SRC_FILE "${CORE_GENX_PREFIX}/os_agnostic_hw_info_config_${PLATFORM_IT_LOWER}.inl")
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_H_BASE ${SRC_FILE})
|
|
|
|
endif()
|
2021-08-04 08:04:09 +08:00
|
|
|
|
2021-09-24 03:59:00 +08:00
|
|
|
set(PLATFORM_FILE "hw_info_${PLATFORM_IT_LOWER}.cpp")
|
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}${BRANCH}${PLATFORM_FILE})
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_CPP_BASE ${SRC_FILE})
|
|
|
|
endif()
|
2021-03-10 02:02:59 +08:00
|
|
|
endforeach()
|
|
|
|
endforeach()
|
|
|
|
|
2020-01-30 00:43:20 +08:00
|
|
|
endmacro()
|
|
|
|
|
|
|
|
macro(macro_for_each_gen)
|
2020-12-19 00:25:12 +08:00
|
|
|
foreach(BRANCH ${BRANCH_DIR_LIST})
|
|
|
|
set(CORE_GENX_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH}${GEN_TYPE_LOWER})
|
2021-06-18 18:05:17 +08:00
|
|
|
set(GENERATED_GENX_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/generated${BRANCH}${GEN_TYPE_LOWER})
|
2020-01-30 00:43:20 +08:00
|
|
|
|
2020-12-19 00:25:12 +08:00
|
|
|
foreach(BRANCH_DIR ${BRANCH_DIR_LIST})
|
|
|
|
foreach(SRC_IT ${CORE_SRCS_GENX_H_BASE} "hw_info_${GEN_TYPE_LOWER}.h")
|
|
|
|
set(SRC_FILE ${CORE_GENX_PREFIX}${BRANCH_DIR}${SRC_IT})
|
2020-08-07 01:38:21 +08:00
|
|
|
if(EXISTS ${SRC_FILE})
|
2020-12-19 00:25:12 +08:00
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_H_BASE ${SRC_FILE})
|
2020-08-07 01:38:21 +08:00
|
|
|
endif()
|
|
|
|
endforeach()
|
2020-01-30 00:43:20 +08:00
|
|
|
|
2021-09-27 20:07:42 +08:00
|
|
|
foreach(OS_IT "BASE" "WDDM" "LINUX")
|
2020-12-19 00:25:12 +08:00
|
|
|
foreach(SRC_IT ${CORE_RUNTIME_SRCS_GENX_CPP_${OS_IT}})
|
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp)
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_CPP_${OS_IT} ${SRC_FILE})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endforeach()
|
2020-08-07 01:38:21 +08:00
|
|
|
|
2020-12-19 00:25:12 +08:00
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}/enable_family_full_core_${GEN_TYPE_LOWER}.cpp)
|
2020-08-07 01:38:21 +08:00
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
|
|
|
endif()
|
2020-12-19 00:25:12 +08:00
|
|
|
|
2021-09-14 21:40:26 +08:00
|
|
|
set(SRC_FILE ${CORE_GENX_PREFIX}${BRANCH_DIR}enable_${GEN_TYPE_LOWER}.cpp)
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
|
|
|
endif()
|
|
|
|
set(SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR}${GEN_TYPE_LOWER}/enable_${GEN_TYPE_LOWER}.cpp)
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${SRC_FILE})
|
|
|
|
endif()
|
2021-03-10 02:02:59 +08:00
|
|
|
|
2021-07-19 20:20:47 +08:00
|
|
|
set(SRC_FILE "${CORE_GENX_PREFIX}/os_agnostic_hw_info_config_${GEN_TYPE_LOWER}.inl")
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_H_BASE ${SRC_FILE})
|
|
|
|
endif()
|
|
|
|
|
2021-08-30 07:41:42 +08:00
|
|
|
set(SRC_FILE "${NEO_SOURCE_DIR}/third_party${BRANCH_DIR}sip_kernels/${GEN_TYPE_LOWER}/sip_kernel_${GEN_TYPE_LOWER}.cpp")
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_CPP_BASE ${SRC_FILE})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(SRC_FILE "${NEO_SOURCE_DIR}/third_party${BRANCH_DIR}sip_kernels/${GEN_TYPE_LOWER}/sip_kernel_${GEN_TYPE_LOWER}.h")
|
|
|
|
if(EXISTS ${SRC_FILE})
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_H_BASE ${SRC_FILE})
|
|
|
|
endif()
|
|
|
|
|
2020-07-30 19:03:34 +08:00
|
|
|
endforeach()
|
2020-12-19 00:25:12 +08:00
|
|
|
if(EXISTS ${GENERATED_GENX_PREFIX}/hw_cmds_generated_${GEN_TYPE_LOWER}.inl)
|
|
|
|
list(APPEND CORE_SRCS_${GEN_TYPE}_H_BASE "${GENERATED_GENX_PREFIX}/hw_cmds_generated_${GEN_TYPE_LOWER}.inl")
|
|
|
|
endif()
|
2020-07-30 19:03:34 +08:00
|
|
|
endforeach()
|
2020-08-07 01:38:21 +08:00
|
|
|
apply_macro_for_each_platform()
|
|
|
|
|
2020-01-30 00:43:20 +08:00
|
|
|
list(APPEND CORE_SRCS_GENX_ALL_BASE ${CORE_SRCS_${GEN_TYPE}_H_BASE})
|
|
|
|
list(APPEND CORE_SRCS_GENX_ALL_BASE ${CORE_SRCS_${GEN_TYPE}_CPP_BASE})
|
|
|
|
|
2020-01-16 00:02:47 +08:00
|
|
|
list(APPEND CORE_SRCS_GENX_ALL_WINDOWS ${CORE_SRCS_${GEN_TYPE}_CPP_WINDOWS})
|
2021-09-27 20:07:42 +08:00
|
|
|
list(APPEND CORE_SRCS_GENX_ALL_WDDM ${CORE_SRCS_${GEN_TYPE}_CPP_WDDM})
|
2020-01-16 00:02:47 +08:00
|
|
|
list(APPEND CORE_SRCS_GENX_ALL_LINUX ${CORE_SRCS_${GEN_TYPE}_CPP_LINUX})
|
|
|
|
|
|
|
|
list(APPEND CORE_SRCS_LINK ${${GEN_TYPE}_SRC_LINK_BASE})
|
2020-01-30 00:43:20 +08:00
|
|
|
endmacro()
|
|
|
|
|
|
|
|
apply_macro_for_each_gen("SUPPORTED")
|
2020-03-16 21:57:15 +08:00
|
|
|
|
|
|
|
set_property(GLOBAL PROPERTY CORE_SRCS_GENX_ALL_BASE ${CORE_SRCS_GENX_ALL_BASE})
|
|
|
|
set_property(GLOBAL PROPERTY CORE_SRCS_GENX_ALL_LINUX ${CORE_SRCS_GENX_ALL_LINUX})
|
2021-09-28 03:35:49 +08:00
|
|
|
set_property(GLOBAL PROPERTY CORE_SRCS_GENX_ALL_WDDM ${CORE_SRCS_GENX_ALL_WDDM})
|
2020-03-16 21:57:15 +08:00
|
|
|
set_property(GLOBAL PROPERTY CORE_SRCS_GENX_ALL_WINDOWS ${CORE_SRCS_GENX_ALL_WINDOWS})
|