Commit Graph

977 Commits

Author SHA1 Message Date
renovate[bot] 438e6f36ff chore(deps): lock file maintenance rust dependencies 2023-06-12 08:50:07 +03:00
renovate[bot] a621472336 chore(deps): lock file maintenance rust dependencies 2023-06-09 20:17:25 +03:00
Aaron Hill d44c9cceb1 wgpu: Cache compiled naga-agal shader module
We use an `lru::LruCache` inside `ShaderModuleAgal`. This automatically
gives us the proper garbage-collection behavior (when the Flash
Program3D instance is garbage collected, we'll drop the
`ShaderModuleAgal` and the cache).

The cache is keyed on the data needed to compile the shader (vertex
attributes and sampler overrides). This lets us avoid shader
recompilations when a Stage3D program repeatedly uses the same
Program3D with different sampler overrides / vertex attribute formats.
2023-06-08 02:57:47 -05:00
renovate[bot] f1fe998869 chore(deps): lock file maintenance rust dependencies 2023-06-04 22:53:18 -05:00
Nathan Adams e12e2a2e54 core: Initial Debug UI 2023-06-03 09:11:06 +02:00
Nathan Adams eb70a4f361 core: Update gc_arena to 63dab12871321e0e5ada10ff1f1de8f4cf1764f9 2023-06-03 09:11:06 +02:00
relrelb abb0e33431 chore: Use Rust's `OnceCell`/`OnceLock`
They were stabilized in Rust 1.70.0, which was released yesterday.
This removes the `once_cell` dependency.
2023-06-02 22:21:38 +03:00
renovate[bot] 847dece735 chore(deps): lock file maintenance rust dependencies 2023-05-28 23:54:33 -05:00
Nathan Adams d8bfb003c5 desktop: Switch to egui 0.22.0 2023-05-24 23:50:48 +02:00
Nathan Adams 12e2758464 desktop: Localise texts 2023-05-24 23:50:48 +02:00
Nathan Adams 7d7edec08c desktop: Add much more info to About dialog 2023-05-24 23:50:48 +02:00
Nathan Adams 01e33d82c9 desktop: Use vergen to get version info 2023-05-24 23:50:48 +02:00
Nathan Adams b9322ba93a desktop: Render game separately to UI, blit both onto surface 2023-05-24 23:50:48 +02:00
Mike Welsh ef1125f456 desktop: Add egui crates 2023-05-24 23:50:48 +02:00
renovate[bot] 5d2477fe98 chore(deps): lock file maintenance rust dependencies 2023-05-22 19:12:08 +03:00
TÖRÖK Attila 65117499fd chore: Bump regress and toml dependencies 2023-05-21 14:42:01 +02:00
Nathan Adams 2b7d0f223a chore: Update Cargo.lock 2023-05-21 12:28:48 +02:00
renovate[bot] f969bdce71 fix(deps): update wasm-bindgen 2023-05-17 06:44:50 +03:00
renovate[bot] 5b26d1b2ee fix(deps): update wasm-bindgen 2023-05-15 10:00:49 +03:00
Nathan Adams 07dea7b164 web: Add localisation to web 2023-05-09 00:06:49 +02:00
Nathan Adams 9c2e77c88f desktop: Use system preferred language 2023-05-09 00:06:49 +02:00
Nathan Adams 229c301e18 core: Add i18n module using Fluent 2023-05-09 00:06:49 +02:00
Moulins 011cdd96ba core: don't keep strong references to interned strings in the interner.
This is done by implementing a simple WeakSet which clears its stale
entries during tracing.
2023-04-27 00:17:31 +02:00
Aaron Hill 3bb8c8fb4f wgpu: Update wgpu to 0.16.0 and naga to 0.12.0 2023-04-25 09:24:53 -05:00
Nathan Adams d9241c914e chore: Hold wgpu and naga back until naga_oil updates to naga 0.12 2023-04-24 01:22:07 +02:00
renovate[bot] 3b3c08a354 chore(deps): lock file maintenance rust dependencies 2023-04-24 01:22:07 +02:00
Mike Welsh a38f74d989 tests: Add `NavigatorTestBackend` 2023-04-08 13:37:25 -07:00
TÖRÖK Attila 2ad43994b8 video: Don't do colorspace conversion in the video backend 2023-04-04 00:15:07 -07:00
TÖRÖK Attila 5f94476b2a render: Add BitmapFormat::Yuv420p and BitmapFormat::Yuva420p 2023-04-04 00:15:07 -07:00
renovate[bot] cd3ad90d61 chore(deps): lock file maintenance rust dependencies 2023-04-02 22:00:49 -07:00
renovate[bot] 4eaf1b21e7 chore(deps): update rust crate embed-resource to v2
Co-authored-by: Mike Welsh <mwelsh@gmail.com>
2023-04-02 21:02:33 -07:00
Aaron Hill 3e97f0e223 core: Update to latest quick-xml
I've moved our special entity handling logic into
a `custom_unescape` function. This lets us move off
of our fork of `quick-xml` back onto the crates.io release
2023-03-30 22:25:24 -07:00
renovate[bot] 5052e942b5 chore(deps): lock file maintenance rust dependencies 2023-03-28 09:31:15 +03:00
relrelb 7cdac78321 chore: Remove `static_assertions` dependency
`static_assertions` seems unmaintained, and anyway `assert!()` is
usable in `const` contexts since Rust 1.57.0:
https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html#panic-in-const-contexts
So simply use the suggested method instead.

Also the `rustversion` dependency is no longer needed because
https://github.com/rust-lang/rust/pull/94075 already landed in stable.
2023-03-25 15:14:36 +03:00
renovate[bot] d7c842a139 chore(deps): lock file maintenance rust dependencies 2023-03-21 14:27:27 +01:00
renovate[bot] 7c280fc171 fix(deps): update rust dependencies
`syn` breaking changes:
 * `Method` renamed to `Fn`
 * `extra-traits` feature necessary for `Debug` impls
2023-03-20 06:35:08 +01:00
renovate[bot] f6f646a756 chore(deps): lock file maintenance rust dependencies 2023-03-19 19:45:30 -07:00
TÖRÖK Attila a1176afcce chore: Bump h263-rs 2023-03-16 22:04:45 +01:00
TÖRÖK Attila 79dfeaf715 core/avm2: Use an actual FFT library in computeSpectrum 2023-03-16 04:42:42 +01:00
TÖRÖK Attila 96d1f19e6c
chore: Port to bitflags 2.0.0
* Bump bitflags to 2.0.0
* Sprinkle Clone, Copy, Eq, PartialEq, and Debug derives where needed
* Call `bits` on bitflags, as it is now a method
* Switch from `from_bits_truncate` to `from_bits_retain` on bitflags where needed
* Bump h263-rs for the bitflags 2.0.0 dependency

As part of porting to bitflags 2.0.0, see:
https://kodraus.github.io/rust/2022/10/07/bitflags2.html#upgrading-to-2x
2023-03-15 20:06:10 -07:00
EmperorBale b880cfec7e core: Update regress to version 0.5 2023-03-14 07:14:17 +01:00
TÖRÖK Attila 0f7c362069 wgpu: Update to wgpu 0.15.1, naga 0.11.0, and naga_oil 0.5.0 2023-03-12 16:30:13 -05:00
TÖRÖK Attila b661e16927 tests: Add `with_video` option to build video decoders into the visual test runner 2023-03-11 21:32:18 +01:00
TÖRÖK Attila 65dc3dd6a5 chore: Run cargo update 2023-03-11 13:15:23 +01:00
TÖRÖK Attila 8f9d639e96 chore: Bump h263-rs to current master 2023-03-11 13:15:23 +01:00
Aaron Hill d72a8e7125 core: Run frames for 'orphan' AVM2 MovieClips
When a MovieClip is an 'orphan' (it has no parent),
it still has frames run (including frame scripts). Some SWFS
like SteamBirds and 'This is the Only Level TOO' rely on this behavior,
so we need to implement it.

The overall idea is straightforward - we keep a global list of
orphan movies, which we add to whenever we unset the parent for a movie.
This list stores weak references for consistency with Flash.
When we run a frame, we process entries in the root movie list,
in addition to the normal recursive processing from the `Stage`.

However, exactly matching Flash's output turned out to be quite tricky.
The particular sequence of calls I make in `run_all_phases_avm2` makes Ruffle
pass two complicated test cases, but there could still be lurking bugs.

This is enough to get SteamBirds to the first level (which doesn't
render due to a different error).
2023-03-06 20:53:35 -06:00
renovate[bot] 130144a76d fix(deps): update rust dependencies 2023-03-05 20:43:46 -06:00
Nathan Adams b38dbadad6 web: Fixed missing logs when using `log` 2023-03-05 10:29:17 +01:00
Aaron Hill 2748b95c86 avm2: Improve Stage3D support for textures, register types, and opcodes
This is a very large diff, but most of it comes from test files and
output.

This PR ads partial support for the following Stage3D shader features:
* Normal (square), rectangle, and cube textures
* Varying and temporary registers
* Lots of opcodes

The combination of these allows us to get a raytracing program
fully working in Ruffle. I've included it as image test.
Currently, this test is very slow (about 90 seconds on my machine),
as the code I'm using (https://github.com/saharan/OGSL) includes
its own shader language and compiler. THe raytracing demo
first compiles its own shader language to AGAL, and then starts
rendering the scene.

Limitations:
* Many opcodes are still unimplemented
* Most non-default texture options (e.g. mipmaps) are not implemented
2023-03-03 15:58:46 -06:00
Aaron Hill 656ab8439c chore: Bump clap to 4.1.8 and re-enable nightly clippy on CI
Clap macros no longer produce `#[deny]`, so clippy passes
again on nightly.
2023-03-01 17:01:40 -06:00