Commit Graph

632 Commits

Author SHA1 Message Date
renovate[bot] caaf6d5c87 fix(deps): update rust dependencies 2023-01-31 09:39:42 -06:00
Nathan Adams 5dd3060a28 wgpu: Ensure we clear before blending an object onto nothing 2023-01-29 20:45:01 +01:00
Nathan Adams 7b1c101c81 wgpu: Fix repeat & reflect gradients 2023-01-29 17:17:44 +01:00
Aaron Hill 184734267d tests: Deny unknown fields when deserializing test.toml files
This will catch typos and misplaced options when modifying tests.
2023-01-28 16:27:43 -06:00
Nathan Adams 9b43836d1d tests: Allow executing of with_renderer tests always, but image comparison is still gated 2023-01-28 12:15:59 -07:00
Nathan Adams 7d234956eb tests: Move tests away from giant macro to individual test.toml files that describe the test 2023-01-27 13:53:43 +01:00
renovate[bot] 8b6eef1715 fix(deps): update rust dependencies 2023-01-24 20:10:40 -06:00
Nathan Adams 1bfa69ade2 wgpu: Guard against infinite loops in gradient shader - fixes #9260 2023-01-23 23:25:30 +01:00
Aaron Hill ffc393e3e8 render: Work around naga_oil duplicate definition bug 2023-01-23 11:31:04 +01:00
Aaron Hill fc3c2a2297 Update wgpu
This requires us to bump naga as well, and switch to a fork
of naga_oil that compiles against the latest naga.
2023-01-23 11:31:04 +01:00
Aaron Hill a71d14d31c Fix wasm build 2023-01-23 11:31:04 +01:00
Aaron Hill 0fe8ef6c2d Get naga_oil shaders working 2023-01-23 11:31:04 +01:00
Aaron Hill 6fe7af58d5 Move back to upstream wgpu repository
We're relying on unreleased changes, so we depend on the latest commit
from their repository.
2023-01-23 11:31:04 +01:00
Aaron Hill e2954821ea
core: Take two - delay reading image back from render backend using `SyncHandle` (#9184)
* Take two: Delay reading image back from render backend using `SyncHandle`

This allows us to avoid blocking immediately after a `BitmapData.draw` call.
Instead, we only attempt to use the `SyncHandle` when performing an operation
that requires the CPU-side pixels (e.g. BitmapData.getPixel or BitmapData.setPixel).

In the best case, the SWF will never explicitly access the pixels of
the target BitmapData, removing the need to ever copy back the render backend
image to our BitmapData. If the SWF doesn't require access to the pixels immediately,
we can delay copying the pixels until they're actually needed, hopefully allowing
the render backend to finish processing the BitmapData.draw operation in
the backenground before we need the result.

Now that the CPU and GPU pixels can be intentionally out of sync with
each other, we need to ensure that we don't accidentally expose 'stale'
CPU-side pixels to ActionScript (which needs to remain unaware of
our internal laziness). We now use a wrapper type `BitmapDataWrapper`
to enforce that the `SyncHandle` is consumed before accessing the
underlying `BitmapData.

* core: Skip GPU->CPU sync for source and target BitmapData during draw

* Introduce DirtyState enum
2023-01-21 21:08:04 +00:00
Nathan Adams b5c6d5debe wgpu: Don't panic if rendering a None bitmap - fixes #9188 2023-01-17 19:34:51 +01:00
Nathan Adams 580cce29db wgpu: Update to wgpu fork with buffer bug fix 2023-01-17 05:59:55 +01:00
Nathan Adams 3c4710cfb5 wgpu: Only show current limits in debug info 2023-01-16 23:18:42 +01:00
TÖRÖK Attila ec462115ef core: nit: Use `strip_prefix` instead of `starts_with` and subslicing.
As suggested by relrelb in a review note for #8820.
2023-01-16 17:33:41 +01:00
Nathan Adams 6138714fa7 wgpu: Fix buffer bug detection 2023-01-16 17:22:04 +01:00
Mike Welsh 9cd6849772 core: Append EOI marker to JPEG data when missing
Fixes #4209.
2023-01-16 03:03:28 +01:00
Mike Welsh cceb18910b core: Fix handling of invalid EOI+SOI marker in JPEG data (fix #8775)
Previously we were removing the first occurrence of the invalid
0xFFD9FFD8 byte sequence in JPEG data, but this would break the
JPEG if it happened to contain this byte sequence elsewhere (for
example, EXIF data). Instead, properly parse the JPEG markers
searching for the invalid marker sequence.

Fixes #8775.
2023-01-16 03:03:28 +01:00
Nathan Adams 3279a920b4 wgpu: Use a temporary wgpu fork that increases push constants limit on webgl & speeds up start time 2023-01-15 18:19:11 +01:00
Nathan Adams 1b42ad0ab4 wgpu: Keep globals cache across the buffer pool 2023-01-14 19:35:16 +01:00
Nathan Adams 2e7201334d wgpu: Detect if buffers are unusable on web and fail to create wgpu renderer if so 2023-01-12 18:37:28 +01:00
Nathan Adams 8db8e4669a wgpu: Implement Multiply blend mode as a trivial blend 2023-01-12 10:54:03 -05:00
Nathan Adams 09608c2abc wgpu: Implement Screen blend mode as a trivial blend 2023-01-12 10:54:03 -05:00
Nathan Adams 9cd850d30e render: Make render_offscreen return a sync handle which can be used to get the texture at a later time 2023-01-11 16:53:33 -05:00
renovate[bot] 630558a936 fix(deps): update rust dependencies 2023-01-10 16:37:40 +01:00
Nathan Adams f5a587ce61 render: Better error message when points is empty 2023-01-10 11:10:46 +01:00
Nathan Adams e7dd3cc0f8 render: Add better expect messages for as_bitmap_data impls 2023-01-10 11:10:46 +01:00
Nathan Adams 3ead9aede9 webgl: Disallow unwrap() and unwrap_err() in webgl crate 2023-01-10 11:10:46 +01:00
Nathan Adams 0f5765d5cc webgl: Removed all unwraps and replaced with actual errors or expects 2023-01-10 11:10:46 +01:00
Nathan Adams 052ac06d85 canvas: Disallow unwrap() and unwrap_err() in canvas crate 2023-01-10 11:10:46 +01:00
Nathan Adams 312c23c4eb canvas: Removed unwraps and replaced with either warns, ignores or expects 2023-01-10 11:10:46 +01:00
Nathan Adams 5ae569983b render: Disallow unwrap() and unwrap_err() in render crate 2023-01-10 11:10:46 +01:00
Nathan Adams 85f0c9dde9 render: Replaced unwrap with expect in shape_utils 2023-01-10 11:10:46 +01:00
Nathan Adams 8f684d6943 render: Removed unwrap/panic when working with empty shapes 2023-01-10 11:10:46 +01:00
Nathan Adams 62f9b11417 wgpu: Fixed color shader working in correct color space 2023-01-10 09:39:28 +01:00
Nathan Adams ae75a3c166 wgpu: Use push constants for both Transforms and ColorAdjustments, when available 2023-01-10 09:39:28 +01:00
Nathan Adams fb78a39125 wgpu: Switch to experimental crate naga_oil for combining shaders 2023-01-10 09:39:28 +01:00
Nathan Adams 4e5749a7e4 wgpu: When push constants are available, use those for Transforms 2023-01-10 09:39:28 +01:00
Nathan Adams fa9db9145d wgpu: Removed double references 2023-01-10 09:39:28 +01:00
Nathan Adams ad3060e70c wgpu: Specialcase draw_rect with white as that's just identity color transform 2023-01-10 09:39:28 +01:00
Nathan Adams 53d6fa4d8b render: Make render commands take in an actual value, not ref for immediate cloning 2023-01-10 09:39:28 +01:00
Nathan Adams b07a01da57 wgpu: Cache texture views along side their owned textures in texture pool 2023-01-09 20:40:45 +01:00
Nathan Adams 4d85b6a75b wgpu: Hook up wgpu renderer, and wgpu's profiling, to tracy 2023-01-08 20:02:26 +01:00
Moulins d332a174c3 Bump `gc-arena` to current master revision
This required small changes to some Debug impls that were missed in #8964
2023-01-06 18:22:43 -05:00
Nathan Adams b7bc835def wgpu: Use Stencil8 2023-01-06 06:29:43 +01:00
Nathan Adams 69e98d23ad wgpu: Update to wgpu 630c12fe47a7bc0dc9ec6217f3903ec6fd6e3fac 2023-01-06 06:29:43 +01:00
Nathan Adams d6b8d6e488 webgl: Added debug info to webgl renderer 2023-01-05 05:51:32 +01:00