Commit graph

711 commits

Author SHA1 Message Date
Arman Uguray fb4cfcdc9e
Merge pull request #275 from DJMcNab/bevy_stageless
Migrate the bevy example to stageless
2023-02-07 13:35:03 -08:00
Arman Uguray 2690c3602d
Merge pull request #271 from armansito/pr-conflation-examples
Introduce test scenes that demonstrate conflation artifacts
2023-02-06 15:24:38 -08:00
Daniel McNab ef44c17f92
Update dependencies, and add more metadata (#272) 2023-02-06 20:12:46 +00:00
Daniel McNab 7abbf2ece2 Migrate the bevy example to stageless 2023-02-06 15:45:36 +00:00
Arman Uguray 97e6e12799 Use accessible colors that maintain contrast in the conflation scene 2023-02-03 12:27:42 -08:00
Arman Uguray fff43bba0d ran cargo fmt; fixed spelling in comment 2023-02-03 09:34:12 -08:00
Arman Uguray dc2e6690c4 Introduce test scenes that demonstrates conflation artifacts
Added two scenes that demonstrate conflation artifacts as described in
https://github.com/linebender/vello/issues/49. The first scene
demonstrates adjacent triangles and rects that belong to the same path
and use opposite winding.

The second scene demonstrates strokes with overlapping square caps
(these strokes are currently expressed as rects painted with the NonZero
fill rule).
2023-02-03 09:32:41 -08:00
Daniel McNab 020a7f5c01
Split the examples into frontends with a shared scene repository (#262) 2023-02-03 10:22:39 +00:00
Daniel McNab 9721d4a6ac
Some WASM changes - including a run_wasm alias (#251) 2023-01-31 16:12:46 +00:00
Daniel McNab f84e244fd7
Update to wgpu 0.15 (#263) 2023-01-31 16:07:03 +00:00
Raph Levien 872fc5c6de
Merge pull request #269 from linebender/fix_fail
Partially revert uniform load of bump.failed
2023-01-30 16:21:35 -08:00
Raph Levien 27e6fdd267 Partially revert uniform load of bump.failed
Just load the atomic bump counter directly instead of piping it through a shared variable, when workgroupUniformLoad is not available. The value is in fact dynamically uniform, but that depends on the stage not setting its own failure flag, a fairly subtle invariant.

I think there was a write-after-read hazard for the reuse of sh_part_count[0]. However, doing the experiment of just changing that doesn't fix the problem on mac. It's possible there's a shader compilation problem (possibly the same one as provoking the storageBarrier workaround in tile_alloc), or also possibly a logic error I'm not understanding.

In any case, this change does appear to fix the hangs on mac.

Fixes #267
2023-01-29 09:01:13 -08:00
Raph Levien 6a184244e6
Merge pull request #264 from linebender/async
Experimental async wiring
2023-01-27 12:43:48 -08:00
Raph Levien db018da537 Make wasm port work again
This cheats somewhat, using the non-robust version of the pipeline for
wasm, and blocking on native.
2023-01-26 17:41:30 -08:00
Raph Levien 264fd3ec12 Merge branch 'main' into async 2023-01-26 17:27:53 -08:00
Raph Levien ca79d5c8d0
Merge pull request #267 from linebender/wasm_fix
Fixes to get example running in wasm
2023-01-26 14:17:56 -08:00
Raph Levien d6cbae2a3f Fixes to get example running in wasm
A number of things were wrong:

* The args were missing to `run`
* The robust memory changes introduced uniformity errors
* `clear_buffer` is a todo for wgpu on wasm
* Some more time calls crept in
* Initializing both env_logger and console_logger fails

In addition, we conditionally opt the shaders into
`workgroupUniformLoad`, as that's available on wasm but not yet native.

Some of the things (args, uniformity errors) are important fixes. Other
things (clear_buffer, wUL being optional) are workarounds for wgpu
limitations and have TODO items to be removed when wgpu catches up.
2023-01-26 12:19:12 -08:00
Raph Levien 3b766d9969 Fix broken non-buffer_labels build 2023-01-25 06:33:38 -08:00
Raph Levien 418256ffd1 Start async wiring
Make async versions of the main library entry points, and invoke those from the with_winit example.

Right now this just prints the contents of the bump buffer before just running the fine dispatch, but it could apply conditional logic.
2023-01-24 21:09:00 -08:00
Raph Levien 17907893af Create Render struct
Separate coarse and fine stages as separate methods of Render struct.
2023-01-24 17:42:53 -08:00
Raph Levien e47c5777cc Make bind_map persistent
We'll be persisting some buffers across recordings, so make the mapping from id to actual resource scoped to the engine rather than a single `run_recording` call.

Part of the change is being explicit about which buffers to free and when. That will enable more fine-grained reuse of buffers, including within a recording.
2023-01-24 17:42:29 -08:00
Daniel McNab bf523e8845
Do another pass on the README (#258) 2023-01-23 16:27:42 +00:00
jneem 942da778a3
Merge pull request #261 from jneem/main
Allow selecting GPU from env
2023-01-21 15:33:42 -06:00
Joe Neeman 338bd30870 Allow selecting GPU from env 2023-01-21 14:30:40 -06:00
David Himmelstrup 9ba85075d4
example: SVG viewer based on usvg (#260) 2023-01-21 18:20:56 +00:00
Chad Brokaw b83642bf0c
Merge pull request #257 from linebender/robust-redux
Robust memory redux (GPU side only)
2023-01-19 12:00:07 -05:00
Chad Brokaw 0c0c61dc82 Address review feedback
* Add counts to offsets when comparing against buffer size limits
* Remove multiplication by 4 in blend buffer allocation (we use units of u32)
* Move buffer sizes from BumpAllocators to Config
* Add comments about early exit
2023-01-18 21:36:32 -05:00
Spencer C. Imbleau, M.Sc. (he/him) f36e455a90
ignore all target directories (#248) 2023-01-18 16:34:16 +00:00
Chad Brokaw db7d93b85c remove unnecessary limit adjustment 2023-01-17 22:56:52 -05:00
Chad Brokaw f0587b6770 add comment about syncing BumpAllocators struct 2023-01-17 22:51:46 -05:00
Chad Brokaw c66e7a270c
add comments for buffer sizes
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
2023-01-17 22:48:53 -05:00
Chad Brokaw 1f7ba765e9
comment typo
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
2023-01-17 22:48:11 -05:00
Chad Brokaw 1e8d194b6a initial GPU side work for robust memory
This should handle everything on the GPU side except for blend stack loading/storing in fine.
2023-01-17 14:08:20 -05:00
Chad Brokaw 3933c159a8
Merge pull request #256 from linebender/peniko-updates
Update for peniko changes and pin git rev
2023-01-17 13:01:11 -05:00
Chad Brokaw 5f6f9f444d bump peniko rev 2023-01-17 13:00:19 -05:00
Chad Brokaw 672f21cca7 pin moscato dep as well 2023-01-17 12:48:26 -05:00
Chad Brokaw ed28a6796f add Cargo.lock to .gitignore 2023-01-17 12:33:11 -05:00
Chad Brokaw 516fd6c981 Update for peniko changes
This applies updates for the gradient API in peniko and pins the git dependency so prevent further breakage. Also removes Cargo.lock.
2023-01-17 12:31:57 -05:00
Daniel McNab 3902e65618
Fix missing barriers in the pathtag_scans (#255)
Co-authored-by: Raph Levien <raph.levien@gmail.com>

Co-authored-by: Raph Levien <raph.levien@gmail.com>
2023-01-16 20:20:20 +00:00
Daniel McNab 44058a8578
Improve the svg parser (#247)
* Improve the svg parser

* Handle `opacity`

* Double the segments buffer

* Rotate the multiplication

This matches firefox's output, although it is contrary to my use
of 3d transformation matrices

* Double ptcl size

Seems to be required to show entire scene at 4k
2023-01-16 18:22:35 +00:00
Daniel McNab ed60031185
Add hot reloading of shaders to the winit example (#252) 2023-01-16 17:24:48 +00:00
Daniel McNab db4fc4e449
Give buffers names when buffer_labels feature is enabled (#254) 2023-01-16 17:16:45 +00:00
Spencer C. Imbleau, M.Sc. (he/him) c428e650d0
Merge pull request #249 from simbleau/clippy
Clippy fixes
2023-01-14 11:14:20 -05:00
Spencer C. Imbleau 4fc94a1d4b clippy fixes 2023-01-14 11:07:07 -05:00
Daniel McNab eec111c633
Support click and drag for svgs, as well as scene fragment caching (#244)
* Support caching the image, and click and drag motion

* Remove debug print

* Clean up examples to have command line parsing

* Address review comments
2023-01-13 19:30:08 +00:00
Raph Levien 02d8b28439
Merge pull request #245 from linebender/reuse_buf
Prototype of buffer reuse
2023-01-13 11:18:03 -08:00
Raph Levien 96bf4f377e
Merge pull request #246 from linebender/fix_even_odd
Fix even-odd rule
2023-01-13 09:28:43 -08:00
Raph Levien ed437f7ffc Rustfmt 2023-01-12 21:11:54 -08:00
Raph Levien 5c469013c7 Fix even-odd rule
This works with winding numbers even larger than 2.
2023-01-12 21:08:51 -08:00
Raph Levien 4907186de4 Prototype of buffer reuse
This helps performance but not all performance issues have been resolved. Nontrivial CPU goes into write_buffer, and it's also possible that there isn't enough overlapping between CPU and GPU work.
2023-01-12 20:43:58 -08:00