|
|
|
@ -1,8 +1,8 @@ |
|
|
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project |
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
|
|
|
|
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project SPDX-License-Identifier: |
|
|
|
# GPL-2.0-or-later |
|
|
|
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project |
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later |
|
|
|
|
|
|
|
add_subdirectory(host_shaders) |
|
|
|
|
|
|
|
@ -12,8 +12,7 @@ if(LIBVA_FOUND) |
|
|
|
list(APPEND FFmpeg_LIBRARIES ${LIBVA_LIBRARIES}) |
|
|
|
endif() |
|
|
|
|
|
|
|
add_library( |
|
|
|
video_core STATIC |
|
|
|
add_library(video_core STATIC |
|
|
|
buffer_cache/buffer_base.h |
|
|
|
buffer_cache/buffer_cache_base.h |
|
|
|
buffer_cache/buffer_cache.cpp |
|
|
|
@ -316,7 +315,8 @@ add_library( |
|
|
|
vulkan_common/nsight_aftermath_tracker.h |
|
|
|
vulkan_common/vma.cpp |
|
|
|
vulkan_common/vma.h |
|
|
|
vulkan_common/vulkan.h) |
|
|
|
vulkan_common/vulkan.h |
|
|
|
) |
|
|
|
|
|
|
|
target_link_libraries(video_core PUBLIC common core) |
|
|
|
target_link_libraries(video_core PUBLIC glad shader_recompiler stb bc_decoder) |
|
|
|
@ -336,52 +336,38 @@ target_link_libraries(video_core PRIVATE sirit Vulkan::Headers Vulkan::UtilityHe |
|
|
|
|
|
|
|
if (ENABLE_NSIGHT_AFTERMATH) |
|
|
|
if (NOT DEFINED ENV{NSIGHT_AFTERMATH_SDK}) |
|
|
|
message( |
|
|
|
FATAL_ERROR "Environment variable NSIGHT_AFTERMATH_SDK has to be provided" |
|
|
|
) |
|
|
|
message(FATAL_ERROR "Environment variable NSIGHT_AFTERMATH_SDK has to be provided") |
|
|
|
endif() |
|
|
|
if (NOT WIN32) |
|
|
|
message( |
|
|
|
FATAL_ERROR "Nsight Aftermath doesn't support non-Windows platforms") |
|
|
|
message(FATAL_ERROR "Nsight Aftermath doesn't support non-Windows platforms") |
|
|
|
endif() |
|
|
|
target_compile_definitions(video_core PRIVATE HAS_NSIGHT_AFTERMATH) |
|
|
|
target_include_directories(video_core |
|
|
|
PRIVATE "$ENV{NSIGHT_AFTERMATH_SDK}/include") |
|
|
|
target_include_directories(video_core PRIVATE "$ENV{NSIGHT_AFTERMATH_SDK}/include") |
|
|
|
endif() |
|
|
|
|
|
|
|
if (MSVC) |
|
|
|
target_compile_options( |
|
|
|
video_core |
|
|
|
PRIVATE /we4242 # 'identifier': conversion from 'type1' to 'type2', possible |
|
|
|
# loss of data |
|
|
|
/we4244 # 'conversion': conversion from 'type1' to 'type2', possible |
|
|
|
# loss of data |
|
|
|
target_compile_options(video_core PRIVATE |
|
|
|
/we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data |
|
|
|
/we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data |
|
|
|
) |
|
|
|
else() |
|
|
|
if (APPLE) |
|
|
|
# error: declaration shadows a typedef in 'interval_base_set<SubType, |
|
|
|
# DomainT, Compare, Interval, Alloc>' error: implicit conversion loses |
|
|
|
# integer precision: 'int' to 'boost::icl::bound_type' (aka 'unsigned char') |
|
|
|
target_compile_options(video_core PRIVATE -Wno-shadow |
|
|
|
-Wno-unused-local-typedef) |
|
|
|
# error: declaration shadows a typedef in 'interval_base_set<SubType, DomainT, Compare, Interval, Alloc>' |
|
|
|
# error: implicit conversion loses integer precision: 'int' to 'boost::icl::bound_type' (aka 'unsigned char') |
|
|
|
target_compile_options(video_core PRIVATE -Wno-shadow -Wno-unused-local-typedef) |
|
|
|
else() |
|
|
|
target_compile_options(video_core PRIVATE -Werror=conversion) |
|
|
|
endif() |
|
|
|
|
|
|
|
target_compile_options(video_core PRIVATE -Wno-sign-conversion) |
|
|
|
target_compile_options(video_core PRIVATE |
|
|
|
-Wno-sign-conversion |
|
|
|
) |
|
|
|
|
|
|
|
# xbyak |
|
|
|
set_source_files_properties( |
|
|
|
macro/macro_jit_x64.cpp PROPERTIES COMPILE_OPTIONS |
|
|
|
"-Wno-conversion;-Wno-shadow") |
|
|
|
set_source_files_properties(macro/macro_jit_x64.cpp PROPERTIES COMPILE_OPTIONS "-Wno-conversion;-Wno-shadow") |
|
|
|
|
|
|
|
# VMA |
|
|
|
set_source_files_properties( |
|
|
|
vulkan_common/vma.cpp |
|
|
|
PROPERTIES |
|
|
|
COMPILE_OPTIONS |
|
|
|
"-Wno-conversion;-Wno-unused-variable;-Wno-unused-parameter;-Wno-missing-field-initializers" |
|
|
|
) |
|
|
|
set_source_files_properties(vulkan_common/vma.cpp PROPERTIES COMPILE_OPTIONS "-Wno-conversion;-Wno-unused-variable;-Wno-unused-parameter;-Wno-missing-field-initializers") |
|
|
|
|
|
|
|
# Get around GCC failing with intrinsics in Debug |
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_BUILD_TYPE MATCHES "Debug") |
|
|
|
@ -390,8 +376,10 @@ else() |
|
|
|
endif() |
|
|
|
|
|
|
|
if (ARCHITECTURE_x86_64) |
|
|
|
target_sources(video_core PRIVATE macro/macro_jit_x64.cpp |
|
|
|
macro/macro_jit_x64.h) |
|
|
|
target_sources(video_core PRIVATE |
|
|
|
macro/macro_jit_x64.cpp |
|
|
|
macro/macro_jit_x64.h |
|
|
|
) |
|
|
|
target_link_libraries(video_core PUBLIC xbyak::xbyak) |
|
|
|
|
|
|
|
if (NOT MSVC) |
|
|
|
|