summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO8
-rw-r--r--flake.lock18
-rw-r--r--flake.nix27
-rw-r--r--meson_options.txt6
-rw-r--r--src/render/meson.build107
5 files changed, 92 insertions, 74 deletions
diff --git a/TODO b/TODO
index 43db723..d8d374b 100644
--- a/TODO
+++ b/TODO
@@ -19,7 +19,7 @@
* Source Code
* Design Documents
-=== Manual:
+=== Manual
* Installation and Usage
== TODO
@@ -30,11 +30,12 @@
- [x] Small list refactor.
- [x] Commit libnaunet changes.
- [x] Consolidate spng, stb_img, and wuffs into one file with server/client ifdefs.
+ - [ ] Sink errored buffer fixes.
+ - [ ] Packet benchmark.
+ - Create packet, write bunch of ints, send to another thread, thread adds everything.
- [ ] Startup timing information.
- From main() to window_system_main() then everything in desktop_open().
- Might as well work on the cleanup part too.
- - [ ] Packet benchmark.
- - Create packet, write bunch of ints, send to another thread, thread adds everything.
- [ ] RPC header packing.
- [ ] Look for more obvious packet_stream/rpc optimizations.
@@ -168,6 +169,7 @@
- [x] Don't require shaderc if libplacebo found.
- [x] Audio optional based on if libpulse/libasound are found.
- [x] libalabaster option for release build with asserts (al_assert only).
+ - [ ] Web build.
=== External
- [ ] miniaudio dsound flush.
diff --git a/flake.lock b/flake.lock
index b6fbabd..7fba99f 100644
--- a/flake.lock
+++ b/flake.lock
@@ -41,11 +41,11 @@
]
},
"locked": {
- "lastModified": 1757256385,
- "narHash": "sha256-WK7tOhWwr15mipcckhDg2no/eSpM1nIh4C9le8HgHhk=",
+ "lastModified": 1757385184,
+ "narHash": "sha256-LCxtQn9ajvOgGRbQIRUJgfP7clMGGvV1SDW1HcSb0zk=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "f35703b412c67b48e97beb6e27a6ab96a084cd37",
+ "rev": "26993d87fd0d3b14f7667b74ad82235f120d986e",
"type": "github"
},
"original": {
@@ -96,11 +96,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
- "lastModified": 1757331535,
- "narHash": "sha256-YYw87rHNMkp6NxT0hThxY5E6zXsQpDtCyWqUNViAmVQ=",
+ "lastModified": 1757427959,
+ "narHash": "sha256-p0i07rLfAMzJWYfsjFOXEtIWeS1EGVxJaCi9gfyCwRE=",
"owner": "nix-community",
"repo": "NixOS-WSL",
- "rev": "dedb70d7fa9f06d9bac5e75481af4685415de49c",
+ "rev": "785f1b67b6c53de088f640f2a7da50ca4b2d7161",
"type": "github"
},
"original": {
@@ -143,11 +143,11 @@
},
"nixpkgs_3": {
"locked": {
- "lastModified": 1757068644,
- "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=",
+ "lastModified": 1757347588,
+ "narHash": "sha256-tLdkkC6XnsY9EOZW9TlpesTclELy8W7lL2ClL+nma8o=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9",
+ "rev": "b599843bad24621dcaa5ab60dac98f9b0eb1cabe",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 6b8d9ed..91ff9a3 100644
--- a/flake.nix
+++ b/flake.nix
@@ -21,14 +21,14 @@
outputs = { self, nixpkgs, nixgl, nixos-hardware, nixos-wsl, home-manager }: let
overlays = [
(self: super: {
- #libplacebo = super.libplacebo.overrideAttrs (oldAttrs: {
- # patches = [
- # ./subprojects/packagefiles/libplacebo/cache_ref_rect.diff
- # ./subprojects/packagefiles/libplacebo/fix_rotate.diff
- # ./subprojects/packagefiles/libplacebo/glClientWaitSync_0_return.diff
- # ./subprojects/packagefiles/libplacebo/info_priv_hash.diff
- # ];
- #});
+ libplacebo = super.libplacebo.overrideAttrs (oldAttrs: {
+ patches = oldAttrs.patches ++ [
+ ./subprojects/packagefiles/libplacebo/cache_ref_rect.diff
+ ./subprojects/packagefiles/libplacebo/fix_rotate.diff
+ ./subprojects/packagefiles/libplacebo/glClientWaitSync_0_return.diff
+ ./subprojects/packagefiles/libplacebo/info_priv_hash.diff
+ ];
+ });
#libass = super.libass.overrideAttrs (oldAttrs: { patches = []; });
libcue = super.libcue.overrideAttrs (oldAttrs: {
patches = [
@@ -93,7 +93,7 @@
cd "$out"
${lib.getExe meson} subprojects download \
- libalabaster libnaunet stela miniaudio linmath.h notcurses
+ libalabaster libnaunet stela miniaudio linmath.h notcurses stb
cd "$out/subprojects/libalabaster"
${lib.getExe meson} subprojects download c89atomic
@@ -150,7 +150,7 @@
pipewire
libpulseaudio
libva
- #libplacebo
+ libplacebo
xxHash
lcms
shaderc
@@ -354,6 +354,10 @@
export SHELL="${pkgs.bashInteractive}/bin/bash"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.stdenv.cc.cc.lib}/lib"
export XDG_DATA_DIRS="${pkgs.mesa}/share:$XDG_DATA_DIRS"
+ alias wine="${pkgs.nixgl.nixGLIntel}/bin/nixGLIntel wine"
+ # Silence Wine logging and enable Esync by default.
+ export WINEDEBUG=-all
+ export WINEESYNC=1
export NIX_BUILD_SHELL=$SHELL
export NIX_SHELL="camu-mingw64"
export PS1="(\$NIX_SHELL)"$PS1
@@ -384,6 +388,9 @@
shellHook = ''
export SHELL="${pkgs.bashInteractive}/bin/bash"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.stdenv.cc.cc.lib}/lib"
+ alias wine="${pkgs.nixgl.nixGLIntel}/bin/nixGLIntel wine"
+ export WINEDEBUG=-all
+ export WINEESYNC=1
export NIX_BUILD_SHELL=$SHELL
export NIX_SHELL="camu-mingw32"
export PS1="(\$NIX_SHELL)"$PS1
diff --git a/meson_options.txt b/meson_options.txt
index 79fe3e7..fb06ae9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,14 +1,14 @@
# Options
-option('codecs', type: 'array', choices: ['ffmpeg', 'stb_image', 'wuffs', 'spng'], value: ['ffmpeg'])
+option('codecs', type: 'array', choices: ['ffmpeg', 'stb_image', 'wuffs', 'spng'], value: ['ffmpeg', 'stb_image'])
option('codec-hwaccels', type: 'array', choices: ['vulkan', 'vaapi', 'mediacodec', 'd3d11va', 'dxva2'], value: [], yield: true)
option('codec-ffmpeg-version', type: 'combo', choices: ['system', '8', '7', '6', '5', '4', '3', '2'], value: 'system')
option('renderer', type: 'combo', choices: ['libplacebo', 'momo'], value: 'libplacebo')
option('renderer-api', type: 'combo', choices: ['vulkan', 'dx11', 'gl', 'gl-rpi'], value: 'vulkan', yield: true)
option('renderer-compiler', type: 'combo', choices: ['glslang', 'shaderc'], value: 'shaderc')
option('subtitles', type: 'feature', value: 'enabled')
-option('window', type: 'combo', choices: ['wayland', 'x11', 'win32', 'glfw', 'glfm'], value: 'x11')
+option('window', type: 'combo', choices: ['wayland', 'x11', 'win32', 'glfw', 'glfm'], value: 'wayland')
option('win32-compat', type: 'boolean', value: false, yield: true)
-option('release-asserts', type: 'boolean', value: false, yield: true)
+option('release-asserts', type: 'boolean', value: true, yield: true)
option('tests', type: 'feature', value: 'auto', yield: true)
# Executables ("Fruits")
diff --git a/src/render/meson.build b/src/render/meson.build
index 748d9e4..6df21e7 100644
--- a/src/render/meson.build
+++ b/src/render/meson.build
@@ -135,59 +135,68 @@ elif get_option('renderer') == 'libplacebo'
endif
if get_option('subtitles').enabled()
- libass_opts = ['test=disabled']
- if not is_windows
- libass_opts += ['fontconfig=enabled']
- # libass(e46aede):meson.build:126
- fontconfig = dependency('fontconfig',
- version: '>=2.10.92',
+ libass_found = false
+ if 'libass' not in get_option('force_fallback_for')
+ libass = dependency('libass', required: false, allow_fallback: false)
+ if libass.found()
+ libass_found = true
+ endif
+ endif
+ if not libass_found
+ libass_opts = ['test=disabled']
+ if not is_windows
+ libass_opts += ['fontconfig=enabled']
+ # libass(e46aede):meson.build:126
+ fontconfig = dependency('fontconfig',
+ version: '>=2.10.92',
+ default_options: [
+ 'doc=disabled',
+ 'nls=disabled',
+ 'tests=disabled',
+ 'tools=disabled',
+ 'cache-build=disabled'
+ ])
+ else
+ libass_opts += ['directwrite=enabled']
+ endif
+ # libass(e46aede):meson.build:84
+ # fontconfig(72b9a48):meson.build:28
+ freetype = dependency('freetype2',
+ version: '>=9.17.3',
+ default_options: [
+ 'warning_level=0',
+ 'tests=disabled',
+ 'harfbuzz=disabled',
+ 'png=disabled'
+ ])
+ # libass(e46aede):meson.build:90
+ fribidi = dependency('fribidi',
+ version: '>=0.19.1',
+ default_options: [
+ 'warning_level=0',
+ 'c_args=-Wno-stringop-overflow', # This doesn't work.
+ 'docs=false',
+ 'tests=false',
+ 'bin=false'
+ ])
+ # freetype2(42608f7):meson.build:346
+ harfbuz = dependency('harfbuzz',
+ version: '>=2.0.0',
default_options: [
- 'doc=disabled',
- 'nls=disabled',
+ 'glib=disabled',
+ 'gobject=disabled',
+ 'cairo=disabled',
+ 'chafa=disabled',
+ 'freetype=disabled',
+ # This does not override yield, and yielding breaks the build if tests=enabled.
+ # https://github.com/mesonbuild/meson/issues/5214
'tests=disabled',
- 'tools=disabled',
- 'cache-build=disabled'
+ 'introspection=disabled',
+ 'docs=disabled',
+ 'utilities=disabled'
])
- else
- libass_opts += ['directwrite=enabled']
+ libass = dependency('libass', default_options: libass_opts)
endif
- # libass(e46aede):meson.build:84
- # fontconfig(72b9a48):meson.build:28
- freetype = dependency('freetype2',
- version: '>=9.17.3',
- default_options: [
- 'warning_level=0',
- 'tests=disabled',
- 'harfbuzz=disabled',
- 'png=disabled'
- ])
- # libass(e46aede):meson.build:90
- fribidi = dependency('fribidi',
- version: '>=0.19.1',
- default_options: [
- 'warning_level=0',
- 'c_args=-Wno-stringop-overflow', # This doesn't work.
- 'docs=false',
- 'tests=false',
- 'bin=false'
- ])
- # freetype2(42608f7):meson.build:346
- harfbuz = dependency('harfbuzz',
- version: '>=2.0.0',
- default_options: [
- 'glib=disabled',
- 'gobject=disabled',
- 'cairo=disabled',
- 'chafa=disabled',
- 'freetype=disabled',
- # This does not override yield, and yielding breaks the build if tests=enabled.
- # https://github.com/mesonbuild/meson/issues/5214
- 'tests=disabled',
- 'introspection=disabled',
- 'docs=disabled',
- 'utilities=disabled'
- ])
- libass = dependency('libass', default_options: libass_opts)
render_deps += [libass]
render_args += ['-DCAMU_HAVE_SUBTITLES']
endif