taisei/src/util/meson.build

47 lines
910 B
Meson
Raw Permalink Normal View History

util_deps = []
util_src = files(
'assert.c',
'crap.c',
'env.c',
'fbmgr.c',
'fbpair.c',
'fbutil.c',
'geometry.c',
'graphics.c',
'io.c',
'kvparser.c',
'miscmath.c',
'pngcruft.c',
'rectpack.c',
2024-06-16 21:50:48 +02:00
'sort_r.c',
Texturing overhaul: GPU compression, sRGB sampling, swizzles, etc. (#240) * WIP compressed textures, swizzles, sRGB sampling, ... * refactor texture type info & fix random bugs * fix preprocessing of sRGB textures * handle y-flipped basis textures * glcommon: better WebGL compat for compressed format detection * missed WEBGL_compressed_texture_pvrtc * implement compressed texture xcoding and uploading * Add basis_universal submodule * Reorganize texture loader code Clean up some code Isolate Basis Universal loader into a separate module * Add wrapper script for encoding .basis textures * basisu: honor custom metadata written by the mkbasis.py script * mkbasis.py: add --incredibly-slow and --dry-run * Move pixmap code from util/ to pixmap/ * Add an on-disk transcode cache for basis textures to speed up loads * Compress texture cache with zlib * Use readable format names for basisu cache filenames * basisu: mip bias test code * basisu: small caching cleanup * add TAISEI_BASISU_MIP_BIAS env variable * Improve OpenGL format matching heuristics * Document considerations for compressed format priority * Remove dead code * Enable two forgotten formats, BC3_RGBA and ATC_RGBA Also prefer BC7 over BC1/BC3 * Recognize GL_ANGLE_compressed_texture_etc for ETC2 textures * Default depth buffers to 24-bit; remove ANGLE hack * Fix glcommon_check_extension for GLES2/legacy gl * Add renderer feature bit for texture swizzle masks * glcommon: Fixup internal formats for GLES2 Sized internal formats are not allowed in GLES2 * Fix emscripten compile errors * Update basis_universal * remove more dead code * revert irrelevant stage4 change * shut up UBSan * basisu: shut up some debug spam * Add normalmap sampling helper to util.glslh * basisu: add a gray-alpha mode * mkbasis.py: Abort if image dimansions aren't multiples of 4 * Add basic Basis Universal encoding documentation (WIP) * doc/basisu: Add paragraph about modes; minor tweaks * basisu: workarounds for GL texture size requirements * gles20: fix uncompressed sRGB formats * Partial workaround for missing swizzles in gles2 and webgl * remove invalid assertion * New renderer API to expose glDrawBuffers-like functionality * stagedraw: disable all color outputs for copy_depth pass required for WebGL compatibility * support GL_ANGLE_request_extension * emscripten: include *.basis in gfx package Also fix a potential problem when more than one .pkgdir is used to construct emscripten packages * Don't rely on emscripten runtime to enable webgl extensions
2020-08-15 13:51:12 +02:00
'strbuf.c',
'stringops.c',
)
if is_developer_build
util_src += files('debug.c')
endif
build,ci: Build system maintenance (#350) Squashed commit of the following: commit 9ab0197ee148b15252d9aa8a962474b8c1afd1a5 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 28 23:05:58 2022 +0100 build: add dummy descriptions for deprecated options commit b0c41d4719ce3076d6867bb68ee4991823059d78 Author: Alice D <alice@starwitch.productions> Date: Mon Dec 26 15:18:09 2022 -0500 update docker containers with ones containing meson 0.63.3 commit a2dd4173fc94527f0ab21f6cf4a50b88bbd893bf Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:20:44 2022 +0100 build: featurize audio options commit 7c59e2a56966db2fdba55578cd1b65501f50c3cf Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:20:35 2022 +0100 build: remove dead code commit cf500af137d88a4dd340e31bea024b50fc52559d Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:07:37 2022 +0100 doc: update BUILD.rst commit 9764ac706f6780bd47e9adb4a7635be7f2d4dc1f Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 17:12:37 2022 +0100 ci: disable WGI joystick backend for SDL Fails to build with latest llvm-mingw commit 2d4f310b903eeae5a76437ca6151e2468fff2f27 Author: p-sam <p-sam@d3vs.net> Date: Sun Dec 25 17:03:47 2022 +0100 switch: fix missing include commit 9264f1649df458ed970274e2ed8336b572429263 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 24 14:36:41 2022 +0100 ci: update meson to 0.63.3 due to a bug commit 3e37be3d8f9bd69c8349b8f33154c1074c528081 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 24 13:42:34 2022 +0100 ci: update build options commit 281a39a4f5718b48f8c05ef261d76c3d2f12fd7e Author: Alice D <alice@starwitch.productions> Date: Sun Dec 18 00:17:07 2022 -0500 ci: change when apt is cleaned up for switch image commit 2f2100a84cc55a194f55bc1993da0dffe15d5243 Author: Alice D <alice@starwitch.productions> Date: Sun Dec 18 00:11:08 2022 -0500 ci: bump switch homebrew container version commit ebaff59260d5518d526d9ceb28eb0636ac207de0 Author: Alice D <alice@starwitch.productions> Date: Sat Dec 17 22:55:39 2022 -0500 ci: bump windows container version commit 7ce6f234199a9c8028debf1dc009a8b4f6cfebd4 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 07:36:28 2022 +0100 build: featurize renderer options commit a345f21b35f6f8c9ca761f6307731727bf98d54a Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 07:33:30 2022 +0100 build: revert to explicit fallback for libzstd Implicit fallback causes conflicts in the basis_universal subproject https://github.com/mesonbuild/meson/issues/11189 commit b2de61f5c50d1d1246bb39ad6c8cc0ca829ec0df Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 05:29:29 2022 +0100 build: remove debug_opengl This option was always misdocumented, as it only controlled whether GL debugging is on by default. You can still control it with the TAISEI_GL_DEBUG environment variable, which is set to 1 in meson devenv. commit 4c659ba19517ccd4f2bbd70d3af2b7dcbf0f711e Author: Andrei Alexeyev <akari@taisei-project.org> Date: Fri Dec 16 08:03:37 2022 +0100 build: set up useful env vars for meson devenv Makes Taisei load resources from the source tree, making live reload work; enables OpenGL debugging by default; works around ASan stack use after return false positives. commit 1ddc58b84ae7c5b7733c1c31bfa4b6619d84a04a Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 08:06:32 2022 +0100 build: featurize docs; always install licenses commit c3a94d7f5bdeab1c5180972c20526fa54ca37703 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:46:28 2022 +0100 build: featurize shader_transpiler commit 619d82ae36a3360c5151623412037eb88bc6acd9 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:38:30 2022 +0100 build: allow libzip fallback by default commit 79ab72292a54dc77c739b7abdee307549cacd527 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:35:51 2022 +0100 build: featurize use_libcrypto commit b393077f716f77af59df6c62cb83d16b0e409880 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 05:03:20 2022 +0100 build: featurize validate_glsl commit 7d76484079e3dda8ea042852b61f66908eb174c9 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 04:34:31 2022 +0100 build: featurize some more installation options commit 17c0bda2050c5544433b7a25ceaab9270d1ba09c Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 03:24:46 2022 +0100 build: deprecate enable_zip for vfs_zip; convert package_data into feature commit 9a4ef8c091b71218fe872afcc66d47e055f7ab75 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 02:37:55 2022 +0100 build: deprecate developer=auto; default to false commit 807240e508cd375402973bdabd8a0cf0ad4d9d71 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 02:24:04 2022 +0100 build: move subproject fallback info into wraps commit 08c953f48773326e4b2b2082052d0654fd540ed2 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:57:33 2022 +0100 build: deprecate 'static' option Meson has a built-in `prefer_static` now commit c5756015374eeef71fcc443d911e1679bfb64167 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:49:31 2022 +0100 build: remove complicated shaderc detection logic Meson does all of this internally since 0.51.0 commit cd2d460d4b6dbb291a4bd1b99e87a9cb69805203 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:45:17 2022 +0100 build: Require meson >=0.63.0 commit 10abd790f7d71fecc0884ffb4f32880f4f0ddd4d Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 05:16:47 2022 +0100 ci: remove meson dist version workaround from release workflow Meson should know the correct version now commit 31a07d8c3cbaec0a49d23e912d74d2e0fd3478d1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 03:46:28 2022 +0100 build: use built-in summary() function commit 0c47f6d14b63335ee051346cb48955f3452b9823 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 04:33:01 2022 +0100 build: remove -Dversion_fallback and introduce .VERSION file The version script will now first try to read the version from a .VERSION file in the source root. If that file does not exist, it will query git. The .VERSION file is not included in the git repository, it is generated for inclusion in source tarballs. Package maintainers who had any use for -Dversion_fallback may want to create the .VERSION file themselves. Additionally, some git-specific files have been removed from source tarballs. commit d32332a5e378b8fb183b1e1609746e60f76aeadc Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 03:00:07 2022 +0100 build: set the "real" version in project() commit f9a3fbc72956fa680e4b1ed6b3f9dba636c26768 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 01:50:08 2022 +0100 build: raise meson_version and remove some legacy workarounds Effectively 0.56.0 was already required since we started using some of its features at some point. This also fixes all current meson warnings.
2022-12-28 23:15:55 +01:00
if dep_crypto.found()
util_src += files('sha256_openssl.c')
else
util_src += files('sha256.c')
endif
if host_machine.system() == 'windows'
# NOTE: Even if we ever build this with something like Midipix, we'd
# probably still want to use the winapi implementation of this here.
util_src += files('platform_win32.c')
else
# No have_posix check, it might just work.
util_src += files('platform_posix.c')
endif
2020-11-19 00:12:51 +01:00
if dep_gamemode.found()
util_src += files('gamemode.c')
else
util_src += files('gamemode_stub.c')
endif