mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-15 23:40:29 +02:00
The core and the headless tools no longer use mutexes, condition variables, spinlocks, std::atomic, std::thread or volatile flags. Threads hand off through libretro-common's retro_atomic and rthreads plus a few small pieces on top of them in Common/Thread: Thread, MpscQueue, EventCounter, ParkingLot waits and ReaderGate. Every wait blocks until it's woken; nothing polls on a timer. State that only one thread touches just loses its lock. The PSP filesystem, sceIo and the savedata dialog now belong to the emulation thread: async reads and writes run when they're queued and complete later in emulated time, and the IO and savedata threads are gone. The friend finder only talks to the adhoc server and hands what it gets to the emulation thread. GPU init always runs on the thread that starts the game. The Vulkan render and compile queues, pipeline and render pass caches, delete list and SPIR-V cache, the GL render queue, the software renderer's jit caches, the file loader caches, the web debugger, UPnP, input, savestates, logging and the GE debugger all hand off through queues and atomics. The IR jit's spinning profiler thread goes. A CPU thread with nothing to run now sleeps until work is queued instead of spinning. Headless with --debugger waits for a client while stopped, and ends the run once every client that connected has left. Web server shutdown keeps servicing the CPU queue until the server has finished.
96 lines
2.6 KiB
CMake
96 lines
2.6 KiB
CMake
set(ARMIPS_REGEXP OFF CACHE BOOL "" FORCE)
|
|
set(ARMIPS_LIBRARY_ONLY ON CACHE BOOL "" FORCE)
|
|
if(WIN32)
|
|
set(ARMIPS_USE_STD_FILESYSTEM ON CACHE BOOL "" FORCE)
|
|
endif()
|
|
|
|
add_subdirectory(armips)
|
|
|
|
if(NOT USING_GLES2)
|
|
add_subdirectory(glew)
|
|
endif()
|
|
|
|
set(ENABLE_GLSLANG_BINARIES OFF CACHE BOOL "let's not build binaries we don't need" FORCE)
|
|
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS ON CACHE BOOL "let's not use exceptions" FORCE)
|
|
set(ENABLE_SPVREMAPPER OFF CACHE BOOL "we don't need spvremapper" FORCE)
|
|
|
|
# This is really a workaround for an NDK 20 compiler issue (PPSSPP issue #12105), but shouldn't hurt.
|
|
if(ANDROID)
|
|
set(ENABLE_HLSL OFF CACHE BOOL "let's not build HLSL support we don't need" FORCE)
|
|
endif()
|
|
|
|
# This works around a bug in cpu_features when ${CMAKE_BINARY_DIR} != ${CMAKE_CURRENT_BINRARY_DIR}.
|
|
# We also disable the list_cpu_features binary.
|
|
add_subdirectory(cmake/cpu_features EXCLUDE_FROM_ALL)
|
|
|
|
set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "" FORCE)
|
|
set(ENABLE_GLSLANG_INSTALL OFF)
|
|
add_subdirectory(glslang EXCLUDE_FROM_ALL)
|
|
add_subdirectory(snappy)
|
|
add_subdirectory(lua-build)
|
|
add_subdirectory(at3_standalone)
|
|
add_subdirectory(udis86)
|
|
add_subdirectory(SPIRV-Cross-build)
|
|
add_subdirectory(rcheevos-build)
|
|
add_subdirectory(gason)
|
|
add_subdirectory(vma)
|
|
add_subdirectory(cityhash)
|
|
add_subdirectory(lzma-sdk)
|
|
add_subdirectory(basis_universal)
|
|
add_subdirectory(pugixml)
|
|
add_subdirectory(libkirk)
|
|
add_subdirectory(sfmt19937)
|
|
add_subdirectory(xbrz)
|
|
|
|
add_library(xxhash STATIC
|
|
xxhash.c
|
|
xxhash.h
|
|
)
|
|
|
|
set(aemu_postoffice_client_obj
|
|
aemu_postoffice_client/postoffice.c
|
|
aemu_postoffice_client/postoffice_mem_stdc.c
|
|
aemu_postoffice_client/log_impl_ppsspp.cpp
|
|
)
|
|
|
|
if(WIN32)
|
|
list(APPEND aemu_postoffice_client_obj
|
|
aemu_postoffice_client/sock_impl_windows.c
|
|
)
|
|
endif()
|
|
|
|
if(LINUX OR ANDROID OR MACOSX OR IOS OR BSD)
|
|
list(APPEND aemu_postoffice_client_obj
|
|
aemu_postoffice_client/sock_impl_linux.c
|
|
)
|
|
endif()
|
|
|
|
add_library(aemu_postoffice_client STATIC
|
|
${aemu_postoffice_client_obj}
|
|
)
|
|
# Its close handshake parks on libretro-common's eventcount.
|
|
target_link_libraries(aemu_postoffice_client libretro-common)
|
|
|
|
set(FT_REQUIRE_ZLIB OFF CACHE BOOL "" FORCE)
|
|
set(FT_REQUIRE_BZIP2 OFF CACHE BOOL "" FORCE)
|
|
set(FT_REQUIRE_PNG OFF CACHE BOOL "" FORCE)
|
|
set(FT_REQUIRE_HARFBUZZ OFF CACHE BOOL "" FORCE)
|
|
set(FT_REQUIRE_BROTLI OFF CACHE BOOL "" FORCE)
|
|
if(NOT LIBRETRO AND NOT USE_SYSTEM_FREETYPE)
|
|
add_subdirectory(freetype freetype-build)
|
|
endif()
|
|
|
|
if(NOT HTTPS_NOT_AVAILABLE)
|
|
add_subdirectory(naett-build)
|
|
endif()
|
|
|
|
if(BUILD_BUNDLED_FFMPEG)
|
|
add_subdirectory(ffmpeg-build)
|
|
endif()
|
|
|
|
if(ANDROID)
|
|
if (ARM64)
|
|
add_subdirectory(libadrenotools)
|
|
endif()
|
|
endif()
|