Skip to content

Commit

Permalink
Merge branch 'xemu-project:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
backgamon authored Jan 3, 2025
2 parents 6420210 + 956ef0b commit 34e0b06
Show file tree
Hide file tree
Showing 25 changed files with 507 additions and 63 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@ jobs:
run: |
mkdir src
tar -C src -xf src.tar.gz
# Ensure subprojects are uploaded
rm src/subprojects/.gitignore
- name: Integrate Debian packaging
run: |
pushd src
Expand Down
13 changes: 0 additions & 13 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,6 @@
path = ui/thirdparty/implot
url = https://github.com/epezent/implot.git
ignore = untracked
[submodule "hw/xbox/nv2a/xxHash"]
path = util/xxHash
url = https://github.com/Cyan4973/xxHash.git
ignore = untracked
[submodule "genconfig"]
path = genconfig
url = https://github.com/mborgerson/genconfig.git
[submodule "tomlplusplus"]
path = tomlplusplus
url = https://github.com/marzer/tomlplusplus
[submodule "hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu"]
path = hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu
url = https://github.com/abaire/nv2a_vsh_cpu.git
[submodule "ui/thirdparty/httplib"]
path = ui/thirdparty/httplib
url = https://github.com/yhirose/cpp-httplib
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ else
git_submodules_action="ignore"
fi

git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu"
git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot genconfig"
git="git"

# Don't accept a target_list environment variable.
Expand Down
248 changes: 248 additions & 0 deletions data/duke.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 119 additions & 0 deletions data/ports.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions data/xmu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Section: games
Priority: optional
Maintainer: Matt Borgerson <[email protected]>
Build-Depends: debhelper (>= 11),
cmake,
git,
python3:any,
python3-yaml,
Expand Down
24 changes: 12 additions & 12 deletions hw/xbox/nv2a/pgraph/thirdparty/meson.build
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
nv2a_vsh_cpu_files = files(
'nv2a_vsh_cpu/src/nv2a_vsh_cpu.c',
'nv2a_vsh_cpu/src/nv2a_vsh_disassembler.c',
'nv2a_vsh_cpu/src/nv2a_vsh_emulator.c',
'nv2a_vsh_cpu/src/nv2a_vsh_emulator_execution_state.c',
)

libnv2a_vsh_cpu = static_library('nv2a_vsh_cpu',
sources: nv2a_vsh_cpu_files,
include_directories: ['.', 'nv2a_vsh_cpu/src'])
nv2a_vsh_cpu = declare_dependency(link_with: libnv2a_vsh_cpu,
include_directories: ['nv2a_vsh_cpu/src'])
nv2a_vsh_cpu_opts = cmake.subproject_options()
nv2a_vsh_cpu_opts.add_cmake_defines({
'CMAKE_OSX_ARCHITECTURES': cmake_macos_arch,
'nv2a_vsh_cpu_UNIT_TEST': 'OFF',
})
nv2a_vsh_cpu_subproj = cmake.subproject('nv2a_vsh_cpu', options: nv2a_vsh_cpu_opts)
nv2a_vsh_cpu = declare_dependency(include_directories: nv2a_vsh_cpu_subproj.include_directories('nv2a_vsh_emulator'),
link_with: [
nv2a_vsh_cpu_subproj.target('nv2a_vsh_emulator'),
nv2a_vsh_cpu_subproj.target('nv2a_vsh_cpu'),
nv2a_vsh_cpu_subproj.target('nv2a_vsh_disassembler'),
])

libgloffscreen = static_library('libgloffscreen',
sources: files('gloffscreen/common.c', 'gloffscreen/sdl.c'),
Expand Down
1 change: 0 additions & 1 deletion hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu
Submodule nv2a_vsh_cpu deleted from d5a730
File renamed without changes.
24 changes: 12 additions & 12 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ have_ga = get_option('guest_agent') \
have_block = have_system or have_tools

python = import('python').find_installation()
cmake = import('cmake')
cmake_macos_arch = host_machine.cpu() == 'aarch64' ? 'arm64' : host_machine.cpu()

if cpu not in supported_cpus
host_arch = 'unknown'
Expand Down Expand Up @@ -390,7 +392,8 @@ have_vhost_net = have_vhost_net_kernel or have_vhost_net_user or have_vhost_net_
libm = cc.find_library('m', required: false)

if targetos == 'windows'
threads = dependency('', required: false)
threads = declare_dependency()
meson.override_dependency('threads', threads)
else
threads = dependency('threads')
endif
Expand Down Expand Up @@ -1198,8 +1201,6 @@ elif targetos == 'linux'
endif

if vulkan.found()
cmake = import('cmake')

if not libglslang.found()
# FIXME: Get spirv-tools to enable opt.
glslang_opts = cmake.subproject_options()
Expand Down Expand Up @@ -1243,12 +1244,6 @@ if (have_system or have_tools) and (virgl.found() or opengl.found())
endif
have_vhost_user_gpu = have_vhost_user_gpu and virgl.found() and opengl.found() and gbm.found()

tomllib = static_library('tomlpp', sources: files('toml.cpp'),
include_directories: 'tomlplusplus/include')
toml = declare_dependency(compile_args: ['-DTOML_HEADER_ONLY=0'],
include_directories: 'tomlplusplus/include',
link_with: tomllib)

genconfig = declare_dependency(include_directories: 'genconfig')

openssl = dependency('openssl', method: 'pkg-config', required: true,
Expand Down Expand Up @@ -2900,6 +2895,12 @@ config_host_data.set('CONFIG_CAPSTONE', capstone.found())
config_host_data.set('CONFIG_FDT', fdt.found())
config_host_data.set('CONFIG_SLIRP', slirp.found())

tomlplusplus_proj = subproject('tomlplusplus', default_options: ['default_library=static'])
tomlplusplus = tomlplusplus_proj.get_variable('tomlplusplus_dep')

xxhash_proj = subproject('xxhash', default_options: ['default_library=static'])
xxhash = xxhash_proj.get_variable('xxhash_dep')

#####################
# Generated sources #
#####################
Expand Down Expand Up @@ -3200,8 +3201,7 @@ util_ss.add_all(trace_ss)
util_ss = util_ss.apply(config_all, strict: false)
libqemuutil = static_library('qemuutil',
sources: util_ss.sources() + stub_ss.sources() + genh,
include_directories: 'util/xxHash',
dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman])
dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman, xxhash])
qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res,
dependencies: [event_loop_base])
Expand Down Expand Up @@ -3252,7 +3252,7 @@ specific_ss.add(files('xemu-xbe.c', 'xemu-version.c'))

common_ss.add(files('cpus-common.c'))

common_ss.add(toml)
common_ss.add(tomlplusplus)
common_ss.add(genconfig)

subdir('softmmu')
Expand Down
8 changes: 4 additions & 4 deletions scripts/archive-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ submodules="dtc meson ui/keycodemapdb"
submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"

# xemu extras
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig"
submodules="$submodules hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu"
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot genconfig"

subprojects="glslang SPIRV-Reflect volk VulkanMemoryAllocator"
subprojects="glslang SPIRV-Reflect volk VulkanMemoryAllocator nv2a_vsh_cpu tomlplusplus cpp-httplib xxhash"

sub_deinit=""

Expand Down Expand Up @@ -61,8 +60,9 @@ test $? -ne 0 && error "failed to archive qemu"

for sp in $subprojects; do
meson subprojects download $sp
sp_dir=$(grep -oP '^directory = \K.*' subprojects/${sp}.wrap || echo ${sp})
# test $? -ne 0 && error "failed to download subproject $sp"
tar --append --file "$tar_file" --exclude=.git subprojects/$sp
tar --append --file "$tar_file" --exclude=.git subprojects/$sp_dir
test $? -ne 0 && error "failed to append subproject $sp to $tar_file"
done

Expand Down
Loading

0 comments on commit 34e0b06

Please sign in to comment.