Commit graph

56 commits

Author SHA1 Message Date
Andrei Alexeyev
94213b4b2c
external: update koishi
Fixes #372
2023-09-09 18:55:23 +02:00
Andrei Alexeyev
070768863f
external: update gamecontrollerdb 2023-08-05 02:35:44 +02:00
Andrei Alexeyev
a6c9303350
build: add install tags 2023-05-18 21:02:29 +02:00
Andrei Alexeyev
cc1ddbd598
external: update basis_universal 2023-04-24 19:18:07 +02:00
Andrei Alexeyev
cc05fa5b64
build: update basis_universal 2023-04-10 06:47:55 +02:00
Andrei Alexeyev
cf2af23b06
external: update koishi 2023-02-26 15:47:12 +01:00
Andrei Alexeyev
e515b85fa3
external: update koishi 2023-01-28 00:57:00 +01:00
Andrei Alexeyev
4db626b562
build: update basis_universal to 1.16 2022-02-05 21:27:37 +02:00
Andrei Alexeyev
c7e281c864
external: update gamecontrollerdb 2022-01-17 23:01:10 +02:00
Andrei Alexeyev
9fb804bb36
external: update python-zipfile-zstd 2021-12-08 09:39:55 +02:00
Andrei Alexeyev
8d0a7682af
update koishi 2021-08-11 14:04:44 +03:00
Andrei Alexeyev
7924930613
coroutine: update koishi 2021-06-04 09:48:03 +03:00
Andrei Alexeyev
cc92a82d3e
build: restore Python 3.6 compat 2021-04-19 04:20:24 +03:00
Andrei Alexeyev
6a89117f39
update gamecontrollerdb [skip ci] 2021-04-19 01:25:18 +03:00
Andrei Alexeyev
622fd1e48b
build: stop vendoring cglm
* Remove cglm from submodules
* Add cglm to list of dependencies
* Prefer system version of cglm, with a wrap fallback (as with other
  dependencies)
2021-04-19 00:50:20 +03:00
Andrei Alexeyev
91639d1c43
scripts/pack: add zstd support 2021-03-28 14:43:02 +03:00
Andrei Alexeyev
a983c4deaa
update basis_universal again 2021-03-19 05:57:01 +02:00
Andrei Alexeyev
0e69cd6bb1
Update basis_universal to 1.13 2021-03-14 19:02:33 +02:00
Andrei Alexeyev
627afee6b9
Update koishi 2020-10-19 13:58:34 +03:00
Andrei Alexeyev
51a8340efd
update koishi 2020-08-16 14:12:34 +03:00
Andrei Alexeyev
a5fd6fe5d9
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 14:51:12 +03:00
Andrei Alexeyev
4e98dcc030
lasers: dedicated fragment shader, simplify vertex shader 2020-08-01 19:02:05 +03:00
Andrei Alexeyev
ab894e0658
update cglm 2020-05-31 17:37:43 +03:00
Andrei Alexeyev
de0813151d
Update gamecontrollerdb 2020-03-19 05:51:39 +02:00
Andrei Alexeyev
89579646b5
update koishi 2020-03-17 10:58:32 +02:00
Andrei Alexeyev
d6b2177786
update koishi 2020-03-07 00:08:29 +02:00
Andrei Alexeyev
8c7b7ae705
update koishi 2020-03-04 22:26:50 +02:00
Andrei Alexeyev
4bfe8fccbb
Make coroutine stack usage tracking compatible with ASan 2020-03-04 22:26:49 +02:00
Andrei Alexeyev
f0c1dd8dde
update koishi 2020-03-04 22:26:49 +02:00
Andrei Alexeyev
260b29d4ee
Track peak coroutine stack usage (approximate)
Also reduced CO_TASK_SIZE back to 64kb
2020-03-04 22:26:49 +02:00
Andrei Alexeyev
3d1c0eee4e
WIP proj draw rule revamp; YoumuB revamp; misc changes; giant mess
cursed commit
2020-03-04 22:26:45 +02:00
Andrei Alexeyev
75744681ed
update koishi 2020-03-04 22:26:45 +02:00
Andrei Alexeyev
3268a7ae04
Switch koishi back to master branch
It was switched to emscripten-fibers accidentally
2020-03-04 22:26:43 +02:00
Andrei Alexeyev
de5b821010
Experimental coroutine waiting optimization (WIP)
Avoids unnecessary back and forth context switches when waiting for a
delay or an event. Should be helpful for Emscripten, but needs
benchmarking.
2020-03-04 22:26:43 +02:00
Andrei Alexeyev
b010bf05c7
update koishi 2020-03-04 22:26:42 +02:00
Andrei Alexeyev
23b695482c
Update koishi; add necessary link flags for emscripten 2020-03-04 22:26:40 +02:00
Andrei Alexeyev
4e4224dc59
task system tweaks and early Stage 1 port attempt 2020-03-04 21:50:51 +02:00
Andrei Alexeyev
9fe54e0335
experimental event system for coroutine-based stages 2020-03-04 21:50:50 +02:00
Andrei Alexeyev
bdef62d7f4
Initial coroutine/task system implementation 2020-03-04 21:50:22 +02:00
Andrei Alexeyev
b3259a72ba
update cglm 2019-10-01 10:08:41 +03:00
Andrei Alexeyev
e3e2e910f7
update gamecontrollerdb 2019-09-22 22:54:11 +03:00
Andrei Alexeyev
4b4036e6a6
update gamecontrollerdb 2019-09-07 05:51:05 +03:00
Andrei Alexeyev
d2df6fa3f2
update cglm 2019-05-19 15:07:27 +03:00
Andrei Alexeyev
a8620b9ebe
update gamecontrollerdb 2019-04-19 14:30:16 +03:00
Andrei Alexeyev
180f9e3856
Emscripten compatibility (#161)
* Major refactoring of the main loop(s) and control flow (WIP)

run_at_fps() is gone 🦀

Instead of nested blocking event loops, there is now an eventloop API
that manages an explicit stack of scenes. This makes Taisei a lot more
portable to async environments where spinning a loop forever without
yielding control simply is not an option, and that is the entire point
of this change.

A prime example of such an environment is the Web (via emscripten).
Taisei was able to run there through a terrible hack: inserting
emscripten_sleep calls into the loop, which would yield to the browser.
This has several major drawbacks: first of all, every function that
could possibly call emscripten_sleep must be compiled into a special
kind of bytecode, which then has to be interpreted at runtime, *much*
slower than JITed WebAssembly. And that includes *everything* down the
call stack, too! For more information, see
https://emscripten.org/docs/porting/emterpreter.html

Even though that method worked well enough for experimenting, despite
suboptimal performance, there is another obvious drawback:
emscripten_sleep is implemented via setTimeout(), which can be very
imprecise and is generally not reliable for fluid animation. Browsers
actually have an API specifically for that use case:
window.requestAnimationFrame(), but Taisei's original blocking control
flow style is simply not compatible with it. Emscripten exposes this API
with its emscripten_set_main_loop(), which the eventloop backend now
uses on that platform.

Unfortunately, C is still C, with no fancy closures or coroutines.
With blocking calls into menu/scene loops gone, the control flow is
reimplemented via so-called (pun intended) "call chains". That is
basically an euphemism for callback hell. With manual memory management
and zero type-safety. Not that the menu system wasn't shitty enough
already. I'll just keep telling myself that this is all temporary and
will be replaced with scripts in v1.4.

* improve build system for emscripten + various fixes

* squish menu bugs

* improve emscripten event loop; disable EMULATE_FUNCTION_POINTER_CASTS

Note that stock freetype does not work without
EMULATE_FUNCTION_POINTER_CASTS; use a patched version from the
"emscripten" branch here:

    https://github.com/taisei-project/freetype2/tree/emscripten

* Enable -Wcast-function-type

Calling functions through incompatible pointers is nasal demons and
doesn't work in WASM.

* webgl: workaround a crash on some browsers

* emscripten improvements:

    * Persist state (config, progress, replays, ...) in local IndexDB
    * Simpler HTML shell (temporary)
    * Enable more optimizations

* fix build if validate_glsl=false

* emscripten: improve asset packaging, with local cache

Note that even though there are rules to build audio bundles, audio
does *not* work yet. It looks like SDL2_mixer can not work without
threads, which is a problem. Yet another reason to write an OpenAL
backend - emscripten supports that natively.

* emscripten: customize the html shell

* emscripten: force "show log" checkbox unchecked initially

* emscripten: remove quit shortcut from main menu (since there's no quit)

* emscripten: log area fixes

* emscripten/webgl: workaround for fullscreen viewport issue

* emscripten: implement frameskip

* emscripter: improve framerate limiter

* align List to at least 8 bytes (shut up warnings)

* fix non-emscripten builds

* improve fullscreen handling, mainly for emscripten

* Workaround to make audio work in chromium

emscripten-core/emscripten#6511

* emscripten: better vsync handling; enable vsync & disable fxaa by default
2019-03-09 21:32:32 +02:00
Andrei Alexeyev
89e9a7b8d7
Update cglm ref 2019-02-25 00:18:36 +02:00
Andrei Alexeyev
f52fa4e2e6
add submodule helper scripts, update readme 2019-02-22 23:46:54 +02:00
Andrei Alexeyev
aaf09dadd6
Move gamecontrollerdb to submodule and update it 2019-02-22 23:46:54 +02:00
Andrei Alexeyev
5f24e63523
Move CGLM to submodule and update it 2019-02-22 23:46:54 +02:00
Andrei Alexeyev
f2e8607efe
fixup cglm subproject 2019-01-23 16:32:00 +02:00