2018-02-05 22:07:21 +08:00
|
|
|
#
|
2018-09-18 15:11:08 +08:00
|
|
|
# Copyright (C) 2018 Intel Corporation
|
2018-02-05 22:07:21 +08:00
|
|
|
#
|
2018-09-18 15:11:08 +08:00
|
|
|
# SPDX-License-Identifier: MIT
|
2018-02-05 22:07:21 +08:00
|
|
|
#
|
|
|
|
|
2018-05-11 16:54:35 +08:00
|
|
|
set(RUNTIME_SRCS_GENX_CPP_WINDOWS
|
|
|
|
windows/command_stream_receiver
|
2018-08-17 19:38:09 +08:00
|
|
|
windows/gmm_callbacks
|
2018-02-05 22:07:21 +08:00
|
|
|
)
|
2018-05-11 16:54:35 +08:00
|
|
|
|
|
|
|
set(RUNTIME_SRCS_GENX_CPP_LINUX
|
|
|
|
linux/command_stream_receiver
|
2018-02-05 22:07:21 +08:00
|
|
|
)
|
|
|
|
|
2018-05-11 16:54:35 +08:00
|
|
|
set(RUNTIME_SRCS_GENX_H_BASE
|
2018-02-05 22:07:21 +08:00
|
|
|
aub_mapper.h
|
|
|
|
device_enqueue.h
|
|
|
|
hw_cmds.h
|
|
|
|
hw_cmds_generated.h
|
|
|
|
hw_info.h
|
|
|
|
reg_configs.h
|
|
|
|
scheduler_definitions.h
|
|
|
|
scheduler_igdrcl_built_in.inl
|
2018-05-11 16:54:35 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
set(RUNTIME_SRCS_GENX_CPP_BASE
|
|
|
|
aub_command_stream_receiver
|
|
|
|
aub_mem_dump
|
2018-07-05 17:23:28 +08:00
|
|
|
buffer
|
2018-05-11 16:54:35 +08:00
|
|
|
command_queue
|
|
|
|
command_stream_receiver_hw
|
2018-11-10 15:00:58 +08:00
|
|
|
command_stream_receiver_simulated_common_hw
|
2018-07-05 17:23:28 +08:00
|
|
|
device_queue
|
|
|
|
experimental_command_buffer
|
2018-05-11 16:54:35 +08:00
|
|
|
gpgpu_walker
|
|
|
|
hw_helper
|
|
|
|
hw_info
|
|
|
|
image
|
|
|
|
kernel_commands
|
|
|
|
preamble
|
|
|
|
preemption
|
|
|
|
sampler
|
|
|
|
state_base_address
|
|
|
|
tbx_command_stream_receiver
|
2018-02-05 22:07:21 +08:00
|
|
|
)
|
|
|
|
|
2018-03-22 18:35:24 +08:00
|
|
|
macro(macro_for_each_platform)
|
|
|
|
string(TOLOWER ${PLATFORM_IT} PLATFORM_IT_LOWER)
|
2018-05-11 16:54:35 +08:00
|
|
|
foreach(PLATFORM_FILE "hw_cmds_${PLATFORM_IT_LOWER}.h")
|
2018-03-22 18:35:24 +08:00
|
|
|
if(EXISTS ${GENX_PREFIX}/${PLATFORM_FILE})
|
2018-05-11 16:54:35 +08:00
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_H_BASE ${GENX_PREFIX}/${PLATFORM_FILE})
|
2018-03-22 18:35:24 +08:00
|
|
|
endif()
|
|
|
|
endforeach()
|
2018-02-05 22:07:21 +08:00
|
|
|
|
2018-05-29 18:15:24 +08:00
|
|
|
foreach(PLATFORM_FILE "hw_info_${PLATFORM_IT_LOWER}.inl")
|
2018-05-11 16:54:35 +08:00
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_BASE ${GENX_PREFIX}/${PLATFORM_FILE})
|
|
|
|
endforeach()
|
2018-06-05 20:09:30 +08:00
|
|
|
|
2018-06-21 18:06:32 +08:00
|
|
|
foreach(PLATFORM_FILE "hw_info_${PLATFORM_IT_LOWER}.h")
|
|
|
|
if(EXISTS ${GENX_PREFIX}/${PLATFORM_FILE})
|
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_H_BASE ${GENX_PREFIX}/${PLATFORM_FILE})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
2018-06-04 17:45:13 +08:00
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_LINUX ${GENX_PREFIX}/linux/hw_info_config_${PLATFORM_IT_LOWER}.inl)
|
2018-03-22 18:35:24 +08:00
|
|
|
endmacro()
|
2018-02-05 22:07:21 +08:00
|
|
|
|
2018-03-22 18:35:24 +08:00
|
|
|
macro(macro_for_each_gen)
|
|
|
|
set(GENX_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/${GEN_TYPE_LOWER})
|
|
|
|
# Add default GEN files
|
2018-05-11 16:54:35 +08:00
|
|
|
foreach(SRC_IT ${RUNTIME_SRCS_GENX_H_BASE})
|
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_H_BASE ${GENX_PREFIX}/${SRC_IT})
|
|
|
|
endforeach()
|
2018-05-24 21:05:38 +08:00
|
|
|
if(EXISTS "${GENX_PREFIX}/hw_cmds_generated_patched.h")
|
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_H_BASE "${GENX_PREFIX}/hw_cmds_generated_patched.h")
|
|
|
|
endif()
|
2018-06-21 18:06:32 +08:00
|
|
|
if(EXISTS "${GENX_PREFIX}/hw_cmds_base.h")
|
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_H_BASE "${GENX_PREFIX}/hw_cmds_base.h")
|
|
|
|
endif()
|
|
|
|
if(EXISTS "${GENX_PREFIX}/hw_info_${GEN_TYPE_LOWER}.h")
|
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_H_BASE "${GENX_PREFIX}/hw_info_${GEN_TYPE_LOWER}.h")
|
|
|
|
endif()
|
2018-05-11 16:54:35 +08:00
|
|
|
|
2018-03-22 18:35:24 +08:00
|
|
|
foreach(OS_IT "BASE" "WINDOWS" "LINUX")
|
2018-05-11 16:54:35 +08:00
|
|
|
foreach(SRC_IT ${RUNTIME_SRCS_GENX_CPP_${OS_IT}})
|
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_${OS_IT} ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp)
|
2018-02-05 22:07:21 +08:00
|
|
|
endforeach()
|
2018-03-22 18:35:24 +08:00
|
|
|
endforeach()
|
2018-02-05 22:07:21 +08:00
|
|
|
|
2018-03-22 18:35:24 +08:00
|
|
|
apply_macro_for_each_platform()
|
2018-06-05 20:09:30 +08:00
|
|
|
|
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_WINDOWS ${GENX_PREFIX}/windows/hw_info_config_${GEN_TYPE_LOWER}.cpp)
|
2018-06-04 17:45:13 +08:00
|
|
|
list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_LINUX ${GENX_PREFIX}/linux/hw_info_config_${GEN_TYPE_LOWER}.cpp)
|
|
|
|
|
2018-05-11 16:54:35 +08:00
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_family_full_${GEN_TYPE_LOWER}.cpp)
|
2018-05-30 15:09:54 +08:00
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_hw_info_config_${GEN_TYPE_LOWER}.cpp)
|
2018-06-04 16:20:09 +08:00
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/enable_${GEN_TYPE_LOWER}.cpp)
|
2018-02-05 22:07:21 +08:00
|
|
|
|
2018-05-11 16:54:35 +08:00
|
|
|
list(APPEND RUNTIME_SRCS_GENX_ALL_BASE ${RUNTIME_SRCS_${GEN_TYPE}_H_BASE})
|
|
|
|
list(APPEND RUNTIME_SRCS_GENX_ALL_BASE ${RUNTIME_SRCS_${GEN_TYPE}_CPP_BASE})
|
2018-03-22 18:35:24 +08:00
|
|
|
list(APPEND HW_SRC_LINK ${${GEN_TYPE}_SRC_LINK_BASE})
|
2018-05-11 16:54:35 +08:00
|
|
|
list(APPEND RUNTIME_SRCS_GENX_ALL_WINDOWS ${RUNTIME_SRCS_${GEN_TYPE}_CPP_WINDOWS})
|
|
|
|
list(APPEND RUNTIME_SRCS_GENX_ALL_LINUX ${RUNTIME_SRCS_${GEN_TYPE}_CPP_LINUX})
|
|
|
|
|
2018-03-22 18:35:24 +08:00
|
|
|
if(UNIX)
|
|
|
|
list(APPEND HW_SRC_LINK ${${GEN_TYPE}_SRC_LINK_LINUX})
|
|
|
|
endif()
|
2018-08-30 20:20:31 +08:00
|
|
|
if(NOT DISABLED_GTPIN_SUPPORT)
|
2018-03-22 18:35:24 +08:00
|
|
|
list(APPEND ${GEN_TYPE}_SRC_LINK_BASE ${GENX_PREFIX}/gtpin_setup_${GEN_TYPE_LOWER}.cpp)
|
2018-02-05 22:07:21 +08:00
|
|
|
endif()
|
2018-05-11 16:54:35 +08:00
|
|
|
|
2018-03-22 18:35:24 +08:00
|
|
|
endmacro()
|
|
|
|
|
|
|
|
apply_macro_for_each_gen("SUPPORTED")
|
2018-02-27 21:47:36 +08:00
|
|
|
|
2018-03-08 02:49:20 +08:00
|
|
|
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_GENX_ALL_BASE})
|
|
|
|
if(WIN32)
|
|
|
|
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_GENX_ALL_WINDOWS})
|
|
|
|
else()
|
|
|
|
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_GENX_ALL_LINUX})
|
|
|
|
endif()
|
|
|
|
set_property(GLOBAL PROPERTY RUNTIME_SRCS_GENX_ALL_BASE ${RUNTIME_SRCS_GENX_ALL_BASE})
|
|
|
|
set_property(GLOBAL PROPERTY RUNTIME_SRCS_GENX_ALL_LINUX ${RUNTIME_SRCS_GENX_ALL_LINUX})
|