Commit Graph

257 Commits

Author SHA1 Message Date
Mike Welsh 26e0432ccc wgpu: Fix some invalid WGSL
naga is currently lenient about some things which are invalid by
the WGSL spec. The Tint WGSL compiler disagreed, so these shaders
failed to compile in Chrome.
2021-10-25 21:59:09 -07:00
Mike Welsh bbb788ced3 desktop: Improve error message for GL
wgpu only supports OpenGL on Linux, so provide a better message if
a user tries to use the GL backend on Windows/macOS.
2021-10-24 17:20:19 -07:00
Mike Welsh 2b57c0947a wgpu: Disallow DX11 backend
This backend has not yet been reimplemented in wgpu 0.10+, so
disallow it for now.
2021-10-24 17:20:19 -07:00
Mike Welsh e10d0fcbe7 wgpu: Switch shaders to WGSL 2021-10-24 17:20:19 -07:00
Mike Welsh 4141909bcb web: Support wgpu on web
Add wgpu feature to web build (disabled by default currently).
2021-10-24 17:20:19 -07:00
Mike Welsh 4c44e27a00 wgpu: Remove unnecessary dependencies 2021-10-24 17:20:19 -07:00
Mike Welsh df270c55af wgpu: Make WgpuRenderBackend::build_descriptors async
This will be necessary for using wgpu on web, where the whole
renderer creation will need to be async.
2021-10-24 17:20:19 -07:00
Mike Welsh 9067dd3668 wgpu: Allow GL as a graphics backend option 2021-10-24 17:20:19 -07:00
Mike Welsh decc38a45c wgpu: Use uniforms instead of push constants 2021-10-24 17:20:19 -07:00
Mike Welsh 0cbdad1ff2 wgpu: Bump to wgpu 0.11 2021-10-24 17:20:19 -07:00
Adrian Wielgosik 8cc00f32bb chore: Stop using traits available in prelude 2021-10-21 10:24:05 -07:00
Adrian Wielgosik bc82a4f705 build: Bump Rust edition to 2021 2021-10-21 10:24:05 -07:00
dependabot[bot] 40aeffb91d build(deps): bump clap from 3.0.0-beta.4 to 3.0.0-beta.5
Bumps [clap](https://github.com/clap-rs/clap) from 3.0.0-beta.4 to 3.0.0-beta.5.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/commits)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 14:50:19 -07:00
dependabot[bot] c46e468c11 build(deps): bump lyon from 0.17.5 to 0.17.10
Bumps [lyon](https://github.com/nical/lyon) from 0.17.5 to 0.17.10.
- [Release notes](https://github.com/nical/lyon/releases)
- [Changelog](https://github.com/nical/lyon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nical/lyon/commits)

---
updated-dependencies:
- dependency-name: lyon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-18 13:42:13 -07:00
dependabot[bot] ce70dbb52e build(deps): bump png from 0.17.1 to 0.17.2
Bumps [png](https://github.com/image-rs/image-png) from 0.17.1 to 0.17.2.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/commits)

---
updated-dependencies:
- dependency-name: png
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 15:30:20 -07:00
relrelb dd42b563ff web: Bump wasm-bindgen to 0.2.78
As usual, also bump its helper crates (`js-sys`, `wasm-bindgen-futures`)
to the latest versions, except for `web-sys` which is locked by wgpu
to 0.3.50.
2021-09-18 21:35:50 +02:00
Giles Cope 42c2b40052 unused deps 2021-09-18 15:28:24 +02:00
relrelb 08b6cf543a web: Guard logs behind a `log_enabled!()` macro
These logs perform somewhat expensive evaluation (crossing the Wasm-
JS boundary). So use the cheaper `log_enabled!()` macro to avoid
evaluation if the relevant log level is not enabled.
2021-09-16 02:56:18 -07:00
Mike Welsh d84f65874e chore: Appease clippy
Debug/Clone dervies no longer squelch dead code warnings, see:
See https://github.com/rust-lang/rust/pull/85200
2021-09-11 21:50:52 -07:00
Mike Welsh 9978eaa954 chore: Bump to wasm-bindgen 0.2.77 2021-09-10 16:32:14 -07:00
dependabot[bot] af004bcd26 chore: Bump futures from 0.3.16 to 0.3.17
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.16...0.3.17)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 09:05:12 +03:00
dependabot[bot] 7f2f8a492e chore: Bump png from 0.17.0 to 0.17.1
Bumps [png](https://github.com/image-rs/image-png) from 0.17.0 to 0.17.1.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/commits)

---
updated-dependencies:
- dependency-name: png
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-30 23:27:18 +02:00
relrelb 7be7182eb9 web: Bump wasm-bindgen to 0.2.76
As usual, also bump its helper crates (js-sys, wasm-bindgen-futures)
to the latest versions, except for web-sys which is locked by wgpu
to 0.3.50.
2021-08-21 14:59:26 +02:00
relrelb 45d2f3fcde chore: Fix clap update 2021-08-18 09:13:25 +03:00
dependabot[bot] cb2f1b6488 chore: Bump clap from 3.0.0-beta.2 to 3.0.0-beta.4
Bumps [clap](https://github.com/clap-rs/clap) from 3.0.0-beta.2 to 3.0.0-beta.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.0.0-beta.2...v3.0.0-beta.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-18 09:13:25 +03:00
relrelb da7cd453cf chore: Fix png update 2021-08-18 09:01:21 +03:00
dependabot[bot] 0e408052b1 chore: Bump png from 0.16.8 to 0.17.0
Bumps [png](https://github.com/image-rs/image-png) from 0.16.8 to 0.17.0.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/commits)

---
updated-dependencies:
- dependency-name: png
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-18 09:01:21 +03:00
relrelb 232bb26b7f web: Bump wasm-bindgen to 0.2.75
Also bump its helper crates (js-sys, wasm-bindgen-futures) to the
latest versions, except for web-sys which seems to be locked by wgpu
to 0.3.50.
2021-08-08 16:53:41 +03:00
relrelb 2ba103ac3f web: Bump wasm-bindgen to 0.2.74
Also bump its helper crates (js-sys, wasm-bindgen-futures) to the
latest versions, except for web-sys which seems to be locked by wgpu
to one version before the latest (0.3.50).
2021-07-23 22:17:51 -07:00
Aaron Hill 068e06e40f Add support for image comparison tests 2021-07-21 21:48:24 -07:00
relrelb d2eb46d3be chore: Reserve capacity for vectors
This avoids unnecessary re-allocations and thus should improve
performance in both memory and time terms.
2021-07-20 16:25:23 -07:00
relrelb 87e9dda250 chore: Use from_le_bytes in more places 2021-07-09 19:56:52 +03:00
Adrian Wielgosik d9b5b1a0af desktop: Add DX11 to default graphics backends 2021-07-04 13:37:22 +02:00
dependabot[bot] 2d26e7ca59 chore: Bump svg from 0.9.2 to 0.10.0
Bumps [svg](https://github.com/bodoni/svg) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/bodoni/svg/releases)
- [Commits](https://github.com/bodoni/svg/commits)

---
updated-dependencies:
- dependency-name: svg
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 23:18:02 +02:00
dependabot[bot] e40f7b3474 chore: Bump wgpu from 0.8.1 to 0.9.0
Bumps [wgpu](https://github.com/gfx-rs/wgpu) from 0.8.1 to 0.9.0.
- [Release notes](https://github.com/gfx-rs/wgpu/releases)
- [Changelog](https://github.com/gfx-rs/wgpu/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gfx-rs/wgpu/commits)

---
updated-dependencies:
- dependency-name: wgpu
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-20 03:13:12 -07:00
dependabot[bot] 12528e9f4f chore: Bump bytemuck from 1.5.1 to 1.7.0
Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.5.1 to 1.7.0.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.5.1...v1.7.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-14 00:47:13 -07:00
Mike Welsh 554aa7fd63 core: Add backend::render::BitmapSource trait
This interface handles returning a bitmap given an ID and is used
by the render backend to get the bitmap used for a bitmap fill.
This will allow for bitmap fills in the drawing API, as these will
manage their own list of bitmaps.
This also  removes the MovieLibrary dependency from render backends
and will allow for better decoupling in the future.
2021-06-13 20:03:53 -07:00
Mike Welsh d23ea90459 swf: Change Matrix to use Fixed16 for a, b, c, d
Matrices in an SWF file store their scale/skew components in
in 16.16 format (fbits).

Split `ruffle_core::Matrix` and `swf::Matrix`. `swf::Matrix` now
stores its data as `Fixed16` instead of immediately converting to
`f32`.
2021-06-08 14:57:15 -07:00
relrelb f82faf9603 chore: Appease clippy 2021-06-05 10:16:00 -07:00
dependabot[bot] 9b6b78fa1f chore: Bump svg from 0.9.1 to 0.9.2
Bumps [svg](https://github.com/bodoni/svg) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/bodoni/svg/releases)
- [Commits](https://github.com/bodoni/svg/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 09:59:59 -07:00
Mike Welsh 2b98c878f0 swf: Use Fixed in more places 2021-05-30 21:24:03 -07:00
Mike Welsh 1dd669a0e3 canvas: Fix alpha calculation in canvas renderer 2021-05-18 16:20:45 -07:00
dependabot[bot] 30f088d16f chore: Bump futures from 0.3.14 to 0.3.15
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.14...0.3.15)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 12:41:29 -07:00
dependabot[bot] 2be5f2bc7e chore: Bump enum-map from 1.1.0 to 1.1.1
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map) from 1.1.0 to 1.1.1.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags)
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 10:11:31 -07:00
dependabot[bot] dd5894ebd6 chore: Bump wgpu from 0.8.0 to 0.8.1
Bumps [wgpu](https://github.com/gfx-rs/wgpu-rs) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/gfx-rs/wgpu-rs/releases)
- [Changelog](https://github.com/gfx-rs/wgpu-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gfx-rs/wgpu-rs/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 10:16:10 -07:00
dependabot[bot] 8e91f8dc89 chore: Bump enum-map from 1.0.0 to 1.1.0
Bumps [enum-map](https://gitlab.com/KonradBorowski/enum-map) from 1.0.0 to 1.1.0.
- [Release notes](https://gitlab.com/KonradBorowski/enum-map/tags)
- [Changelog](https://gitlab.com/KonradBorowski/enum-map/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/KonradBorowski/enum-map/commits/master)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 10:15:58 -07:00
Mike Welsh c465e268bf chore: Bump to wgpu 0.8 2021-04-29 15:01:12 -07:00
Mike Welsh f0bea5d241 wgpu: Bump to latest master 2021-04-24 08:29:25 -07:00
Mike Welsh 0552d26551 core: Use Fixed8 and i16 for ColorTransform
Use the proper types for ColorTransform:
 * Fixed8 (8.8) format for multiplicative component
 * i16 format for additive component

This matches the behavior of Flash (for example, alpha only changes
in units of 1/256).
2021-04-19 15:47:52 -07:00
Mike Welsh bab2701208 web: Bump wasm-bindgen and js-sys versions 2021-04-16 23:37:23 -07:00