mirror of
https://github.com/libretro/parallel-gx2.git
synced 2026-11-07 04:25:58 -10:00
Under libretro the Vulkan instance, device, surface and swapchain are the frontend's: the core is handed a device and queue (the shared-device constructor) and draws into the image the frontend gives it. Everything the standalone emulator used to make its own was still compiled in and never ran: the default constructor with its instance creation and device selection, GetDevices, the X11, XCB, Wayland, Win32 and Metal surface creation (CocoaSurface.mm), SwapchainInfoVk, swapchain acquire, recreate and present, the swapchain blit pipeline and descriptor layout, and the Breath of the Wild workaround that forked a child process to probe RADV before creating an instance. All of it is removed (SwapchainInfoVk and CocoaSurface are listed in .upstream-excluded). What touched the swapchain on the way keeps its libretro behaviour: BeginFrame reports no frame, ClearColorbuffer and ImguiInit do nothing, ImguiBegin returns false after the base class's setup, IsPadWindowActive follows the DRC layout, and a screenshot is always a single one. With no VK_USE_PLATFORM_* defined, vulkan.h includes no window-system header, and Common/platform.h no longer includes Xlib, Xrender or Xutil: the Linux build needs no headers beyond the compiler's, so the CI jobs and the README install none. tools/check_no_wsi.sh, run in both CIs, fails on an X11, XCB, Wayland, GL or EGL include, a VK_USE_PLATFORM_* define or a platform surface or context entry point in the core.
212 lines
6.1 KiB
YAML
212 lines
6.1 KiB
YAML
# DESCRIPTION: GitLab CI/CD for libRetro (NOT FOR GitLab-proper)
|
|
|
|
##############################################################################
|
|
################################# BOILERPLATE ################################
|
|
##############################################################################
|
|
|
|
# Core definitions
|
|
.core-defs:
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
CORENAME: parallel_gx2
|
|
|
|
# Inclusion templates, required for the build to work
|
|
include:
|
|
################################## DESKTOPS ################################
|
|
# Windows
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/windows-x64-mingw.yml'
|
|
|
|
# Linux 64-bit
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/linux-x64.yml'
|
|
|
|
# Linux ARM 64-bit
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/linux-aarch64.yml'
|
|
|
|
# MacOS x64
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/osx-x64.yml'
|
|
|
|
# MacOS arm64
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/osx-arm64.yml'
|
|
|
|
################################## CELLULAR ################################
|
|
# Android
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/android-make.yml'
|
|
|
|
# iOS arm64
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/ios-arm64.yml'
|
|
|
|
# tvOS arm64
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/tvos-arm64.yml'
|
|
|
|
################################## MISC ####################################
|
|
# webOS aarch64
|
|
- project: 'libretro-infrastructure/ci-templates'
|
|
file: '/webos-make.yml'
|
|
|
|
# Stages for building
|
|
stages:
|
|
- build-prepare
|
|
- build-shared
|
|
- test
|
|
|
|
##############################################################################
|
|
#################################### STAGES ##################################
|
|
##############################################################################
|
|
#
|
|
################################### DESKTOPS #################################
|
|
# Linux needs no system headers beyond the compiler's: the GL context and the
|
|
# Vulkan surface and swapchain are the frontend's.
|
|
.core-defs-linux:
|
|
extends: .core-defs
|
|
variables:
|
|
# Cemu is C++20
|
|
CC: gcc-12
|
|
CXX: g++-12
|
|
|
|
# Windows 64-bit
|
|
libretro-build-windows-x64:
|
|
extends:
|
|
- .libretro-windows-x64-mingw-make-default
|
|
- .core-defs
|
|
|
|
# Linux 64-bit
|
|
libretro-build-linux-x64:
|
|
extends:
|
|
- .libretro-linux-x64-make-default
|
|
- .core-defs-linux
|
|
# Ubuntu Xenial's GCC cannot build C++20; backports is the same family
|
|
# of image with newer compilers, gcc-12 among them.
|
|
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:backports
|
|
|
|
# Linux ARM 64-bit
|
|
libretro-build-linux-aarch64:
|
|
extends:
|
|
- .libretro-linux-aarch64-make-default
|
|
- .core-defs-linux
|
|
|
|
# macOS Intel
|
|
libretro-build-osx-x64:
|
|
tags:
|
|
- mac-apple-silicon
|
|
extends:
|
|
- .libretro-osx-x64-make-default
|
|
- .core-defs
|
|
variables:
|
|
arch: x86_64
|
|
|
|
# macOS arm64
|
|
libretro-build-osx-arm64:
|
|
extends:
|
|
- .libretro-osx-arm64-make-default
|
|
- .core-defs
|
|
|
|
################################### CELLULAR #################################
|
|
# Android ARMv8a
|
|
android-arm64-v8a:
|
|
extends:
|
|
- .libretro-android-make-arm64-v8a
|
|
- .core-defs
|
|
|
|
# Android x86_64 (for play only)
|
|
android-x86_64:
|
|
extends:
|
|
- .libretro-android-make-x86_64
|
|
- .core-defs
|
|
|
|
# iOS arm64: Metal only, the Vulkan renderer needs MoltenVK and a
|
|
# frontend surface the core does not get here
|
|
libretro-build-ios-arm64:
|
|
extends:
|
|
- .libretro-ios-arm64-make-default
|
|
- .core-defs
|
|
variables:
|
|
IOS_MINVER: "13.4"
|
|
|
|
# tvOS arm64
|
|
libretro-build-tvos-arm64:
|
|
extends:
|
|
- .libretro-tvos-arm64-make-default
|
|
- .core-defs
|
|
variables:
|
|
MINVER: "13.4"
|
|
|
|
################################## MISC ####################################
|
|
# webOS aarch64
|
|
libretro-build-webos-aarch64:
|
|
extends:
|
|
- .libretro-webos-aarch64-make-default
|
|
- .core-defs
|
|
|
|
#################################### TESTS ###################################
|
|
# The network layer that stands in for libcurl and OpenSSL
|
|
# (dependencies/curl-compat), against local HTTP and TLS servers.
|
|
test-curl-compat:
|
|
stage: test
|
|
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:backports
|
|
needs: []
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
CC: gcc-12
|
|
CXX: g++-12
|
|
before_script:
|
|
- apt-get update -qq
|
|
- apt-get install -y --no-install-recommends python3 openssl
|
|
script:
|
|
- ./dependencies/curl-compat/test/run_tests.sh
|
|
- make -C dependencies/curl-compat/test clean
|
|
- SANITIZER=address,undefined ./dependencies/curl-compat/test/run_tests.sh
|
|
- make -C dependencies/curl-compat/test clean
|
|
- SANITIZER=thread ./dependencies/curl-compat/test/run_tests.sh
|
|
|
|
# The OpenGL GPU as a cothread of the frontend's thread (LatteGpuCothread.h):
|
|
# the run/yield protocol, exit and restart, and libco on several threads at
|
|
# once. ThreadSanitizer does not follow stack switches, so not under it.
|
|
test-gpu-cothread:
|
|
stage: test
|
|
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:backports
|
|
needs: []
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
CC: gcc-12
|
|
CXX: g++-12
|
|
script:
|
|
- ./test/gpu_cothread/run_tests.sh
|
|
- make -C test/gpu_cothread clean
|
|
- SANITIZER=address,undefined ./test/gpu_cothread/run_tests.sh
|
|
|
|
# The lock-free handoffs between the core's threads: the recompiler's work
|
|
# queue, the GPU thread's wake, the audio ring.
|
|
test-handoff:
|
|
stage: test
|
|
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:backports
|
|
needs: []
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
CC: gcc-12
|
|
CXX: g++-12
|
|
script:
|
|
- ./test/handoff/run_tests.sh
|
|
- make -C test/handoff clean
|
|
- SANITIZER=thread ./test/handoff/run_tests.sh
|
|
- make -C test/handoff clean
|
|
- SANITIZER=address,undefined ./test/handoff/run_tests.sh
|
|
|
|
# No X11/XCB/Wayland/GL/EGL header, VK_USE_PLATFORM_* or platform surface
|
|
# entry point in the core: the frontend owns the context and the surface.
|
|
test-no-wsi:
|
|
stage: test
|
|
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-amd64-ubuntu:backports
|
|
needs: []
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
script:
|
|
- ./tools/check_no_wsi.sh
|