Commit graph

25 commits

Author SHA1 Message Date
Andrei Alexeyev
7c1843cffa
build: add option to disable gamemode integration 2023-09-28 17:43:14 +02:00
Andrei Alexeyev
df6b97caf7
stageobjects,objectpool: simplify and reimplement on top of arenas
All pools now allocate from the same arena that is initialized once with
8MB of initial space and never deallocated, only reset between stages.
2023-04-07 16:08:49 +02:00
Stone Tickle
08c4723f92
build: fix errors found by muon analyze (#358)
I found a few small errors while testing muon analyze on this project.
2023-02-23 22:06:56 +02:00
Andrei Alexeyev
267f47fc0e
build,ci: Build system maintenance (#350)
Squashed commit of the following:

commit 9ab0197ee1
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 28 23:05:58 2022 +0100

    build: add dummy descriptions for deprecated options

commit b0c41d4719
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 a2dd4173fc
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Sun Dec 25 19:20:44 2022 +0100

    build: featurize audio options

commit 7c59e2a569
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Sun Dec 25 19:20:35 2022 +0100

    build: remove dead code

commit cf500af137
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Sun Dec 25 19:07:37 2022 +0100

    doc: update BUILD.rst

commit 9764ac706f
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 2d4f310b90
Author: p-sam <p-sam@d3vs.net>
Date:   Sun Dec 25 17:03:47 2022 +0100

    switch: fix missing include

commit 9264f1649d
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 3e37be3d8f
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Sat Dec 24 13:42:34 2022 +0100

    ci: update build options

commit 281a39a4f5
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 2f2100a84c
Author: Alice D <alice@starwitch.productions>
Date:   Sun Dec 18 00:11:08 2022 -0500

    ci: bump switch homebrew container version

commit ebaff59260
Author: Alice D <alice@starwitch.productions>
Date:   Sat Dec 17 22:55:39 2022 -0500

    ci: bump windows container version

commit 7ce6f23419
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Sat Dec 17 07:36:28 2022 +0100

    build: featurize renderer options

commit a345f21b35
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 b2de61f5c5
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 4c659ba195
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 1ddc58b84a
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 08:06:32 2022 +0100

    build: featurize docs; always install licenses

commit c3a94d7f5b
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 07:46:28 2022 +0100

    build: featurize shader_transpiler

commit 619d82ae36
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 07:38:30 2022 +0100

    build: allow libzip fallback by default

commit 79ab72292a
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 07:35:51 2022 +0100

    build: featurize use_libcrypto

commit b393077f71
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 05:03:20 2022 +0100

    build: featurize validate_glsl

commit 7d76484079
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 04:34:31 2022 +0100

    build: featurize some more installation options

commit 17c0bda205
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 9a4ef8c091
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 02:37:55 2022 +0100

    build: deprecate developer=auto; default to false

commit 807240e508
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 02:24:04 2022 +0100

    build: move subproject fallback info into wraps

commit 08c953f487
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 c575601537
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 cd2d460d4b
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Wed Dec 14 01:45:17 2022 +0100

    build: Require meson >=0.63.0

commit 10abd790f7
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 31a07d8c3c
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Mon Dec 12 03:46:28 2022 +0100

    build: use built-in summary() function

commit 0c47f6d14b
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 d32332a5e3
Author: Andrei Alexeyev <akari@taisei-project.org>
Date:   Mon Dec 12 03:00:07 2022 +0100

    build: set the "real" version in project()

commit f9a3fbc729
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
Andrei Alexeyev
dcb630b37d
stageinfo,stage: implement stage hot-reloading
POSIX platforms only. Must be enabled via -Dstages_live_reload=true.
2022-02-05 17:58:42 +02:00
Andrei Alexeyev
f73b1d6891
Abandon standard C conformance and require GNU extensions
Removed the use_gnu_ext option as well as fallback paths for compilers
that don't support GNU extensions. To my knowledge, none of those
compilers support C11 to a sufficient extent to compile Taisei anyway,
and those fallbacks are very poorly tested.

Pedantic warnings are now disabled, and extensions that are common to
reasonably recent versions of GCC and clang are permitted to be relied
on (list of allowed extensions TBA).
2021-08-31 23:33:16 +03:00
Andrei Alexeyev
8480d41b7b
Audio rewrite (#236)
This replaces SDL_mixer with an internal streaming and mixing system,
relying only on basic SDL audio support. It's also a partial refactor of
the audio API, most notably BGM-related. The BGM metadata resource type
is gone, as well as the `.bgm` files. The metadata is now stored inside
the `.opus` files directly, using standard Opus tags.
2020-06-22 17:41:03 +03:00
Andrei Alexeyev
40a604a6a5
Add 'use_gnu_ext' option
Controls the USE_GNU_EXTENSIONS define in compat.h
2020-03-31 22:51:31 +03:00
Andrei Alexeyev
0fdea86be1
Implement Robin Hood hashing (#200)
* Implement Robin Hood hashing

This replaces the previous separate chaining implementation. This
approach is more memory-efficient, cache-friendly, and puts much less
stress on the memory allocator.

* Replace crc32 with fnva1

Also attempt to make the compiler pre-hash as much stuff as possible at
build time.
2020-03-17 10:09:49 +02:00
Alice
0b29dd473b
OpenGL ES 3.0/ANGLE support on macOS (#190)
* fixing OpenGL ES 3.0 support in macOS

* make GLES libraries loaded via buildconf vars

* fix relative install paths for macOS

* fix indenting, add comments

* fix indentation for REAL this time (thanks editorconfig)
2020-02-20 04:16:28 +02:00
Andrei Alexeyev
8ccc472e27
build: support building shaderc and spirv-cross CLI from subprojects 2019-11-27 17:18:50 +02:00
Andrei Alexeyev
69dc964c22
Add deprecation_warnings option
Controls treatment of warnings caused by attr_deprecated.

Can be one of the following values:

    * default: No special treatment.
    * error: Always treat as errors, regardless of the werror option.
    * no-error: Never treat as errors, regardless of the werror option.
    * ignore: Suppress the warnings.
2019-10-03 03:22:54 +03:00
Andrei Alexeyev
abe4ddf260
refactor audio (module system like that of renderer) 2019-03-05 21:43:01 +02:00
Andrei Alexeyev
1d9a307b94
Add a basic shader cache; move some files around
The cache is currently only used to speed up SPIR-V transpilation.
2019-02-08 21:08:24 +02:00
Andrei Alexeyev
9af300d4df
add 'developer' option to decouple cheats etc. from build type
developer=true  --> DEBUG macro is set, regardless of build type
    developer=false --> DEBUG macro is not set, regardless of build type
    developer=auto  --> DEBUG macro is set only on debug* build types;
    this matches old behavior and is the default.
2019-01-25 02:02:56 +02:00
Andrei Alexeyev
fa802dbd94
Some refactoring
* Added (and fixed) a few useful warnings
    * Removed some dead code
    * Cleaned up the build system files a bit
    * Once again separated ZIP support from data packaging
    * Converted macOS cross-compilation options into cross-file properties
2019-01-24 22:24:43 +02:00
Andrei Alexeyev
2414474c89
OpenGL ES 3.0 rendering backend (#148)
* First steps towards shader transpilation

Needs to be manually enabled via -Dshader_transpiler=true.

Requires shaderc. https://github.com/google/shaderc

Not yet functional due to missing SPIRV-Cross integration. SPIRV-Cross
currently does not have an official C API, and crossc is too minimal to
be useful. The current plan is to extend crossc and vendor it, while
also sending PRs upstream.

* Integrate crossc; shader transpilation for GLES now works

* fix leak

* gles30 backend now playable on Mesa with 3.2 context

Some rendering issues are present. Identified so far:
    - Marisa's lasers are invisible
    - Death effect looks wrong

Also, a small pixmap manipulation library has been written, and the
texture uploading API redesigned around it.

* fix marisa lasers in GLES (uniform name clashed with builtin)

* fix player death effect in GLES (another name clash)

* Dump ANGLE's translated shader code in debug log

* fix screenshots

* Drop support for triangle fans, switch to strips

Fans offer no advantage over strips, and they've been removed in D3D10+,
so ANGLE has to emulate them.

* crude workaround for an ANGLE bug

* Re-enable GL debug labels, fix an issue with them that affected ANGLE (but was always technically a bug)

* fix race condition in shaderc initialization

* New SDL_RWops interface for vertex buffers

* Optimize VBO streaming via buffering updates

Measurable performance improvement even with the main gl33 renderer,
drastic improvement with ANGLE.

* Fix the depth texture binding problem under ANGLE

Apparently it hates GL_DEPTH_COMPONENT16 for some reason. Sized internal
formats are not supported in GLES 2.0 anyway, so not using them is
probably a good idea.

* fix GLES2.0 segfault (the backend still doesn't work, though)

* dump GL extensions at info log level, not debug

* get around a Mesa bug; more correct texture format table for GLES2

* Correct GLES3 texture format table according to the spec

Not a Mesa bug after all

* require crossc>=1.5.0, fallback to subproject

* Request at least 8bit per color channel in GL backends

* Forbid lto for static windows builds with shader_transpiler=true

* fix edge case segfault

* Add basic ANGLE bundling support to the build system

Windows only, and no NSIS support yet

* Fix various windows-related build system and installer brokenness

* Disable gles backends by default

* update documentation
2018-10-02 01:36:10 +03:00
Andrei Alexeyev
01795250bb
Add build option to disable object pools (for debugging) 2018-08-31 05:59:47 +03:00
Andrei Alexeyev
59cf8f6300
Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
Andrei Alexeyev
4c98dea1da
Render Markdown docs to HTML for installations 2018-01-19 08:50:42 +02:00
Andrei Alexeyev
32996fe69a
add build option to disable opengl debugging 2018-01-18 19:27:03 +02:00
Andrei Alexeyev
22505e5ff7 meson: fixed some install_relative issues 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
0dcbc6bcf4 meson: untested macOS bundle generation, bunch of other crap (WIP) 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
29acd5f58a meson: intel intrinsics, various improvements 2017-12-21 03:58:54 +01:00
Martin Herkt
685b1b947d Replace CMake build system with Meson
No I will not try and keep both systems working. CMake should GTFO.
2017-12-21 03:58:54 +01:00