14,081 karma · joined Mar 7, 2014 (12y ago) · 1,887 submissions
comment 2y ago · link · parent
I say "was" as the new version in Vello is much more sophisticated, and handles both flattening and stroke expansion, all on the GPU. A paper is in the works, and I'll post it to HN when it's ready.
[1]: https://docs.rs/kurbo/latest/kurbo/struct.BezPath.html#metho...
comment 2y ago · link · parent
This is conceptual and theoretical, but potentially has immediate application for computing a better offset of a cubic Bézier, used for stroke expansion.
If this sounds intriguing, a good starting point is the Zulip thread[1] I'm using to write down the ideas. I'd especially be interested in a collaborator who has the experience and motivation to coauthor a paper; I can supply the intuition and experimental approach, but the details of the math take me a long time to work out. (That said, I'm starting to wonder if engaging that slog myself might not actually be a good way to level up my math skills)
[1]: https://xi.zulipchat.com/#narrow/stream/260979-kurbo/topic/E...
comment 2y ago · link · parent
Something else to look at is the Vortex project from Georgia Tech[1]. Rather than recapitulating the fixed-function past of GPU design, I think it looks toward the future, as it's at heart a highly parallel computer, based on RISC-V with some extensions to handle GPU workloads better. The boards it runs on are a few thousand dollars, so it's not exactly a hobbyist friendly, but it certainly is more accessible than closed, proprietary development. There's a 2.0 release that just landed a few months ago.
comment 2y ago · link · parent
You'll likely enjoy our upcoming GPU-friendly stroke expansion paper - the core of it is exactly numerical methods with error bounds for the exact symbolic integrals of (certain curvature metrics) of curves. And the code is in Vello main (shader/flatten.wgsl) if you're curious and want to look at it now.
comment 2y ago · link · parent
My initial take is that performance will be pretty dependent on hardware, in particular support for pixel local storage[1]. From what I've seen so far, Apple Silicon is the sweet spot, as there is hardware support for binning and sorting to tiles, and then asking for fragment shader execution to be serialized within a tile works well. On other hardware, I expect the cost of serializing those invocations to be much higher.
One reason we haven't done deep benchmarking on the Vello side is that our performance story is far from done. We know one current issue is the use of device atomics for aggregating bounding boxes. We have a prototype implementation [2] that uses monoids for segmented reduction, and that looks like a nice improvement. Additionally, we plan to do f16 math (which should be a major win especially on mobile), as well as using subgroups for various prefix sum steps (subgroups are in the process of landing in WebGPU[3]).
Overall, I'm thrilled to see this released as open source, and that there's so much activity in fast GPU vector graphics rendering. I'd love to see a future in which CPU path rendering is seen as being behind the times, and this moves us closer to that future.
[1]: https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/da...
comment 2y ago · link · parent
[1]: https://devblogs.microsoft.com/oldnewthing/20050211-00/?p=36...
[2]: https://devblogs.microsoft.com/oldnewthing/20050315-00/?p=36...
comment 2y ago · link · parent
Also Bruce MacEvoy's in-progress book "Color Experience"[1] looks like it will be a fairly definitive treatment of the topic. It is also rooted in physical colorants (the author is an extremely serious watercolorist).
comment 2y ago · link · parent
comment 2y ago · link · parent
Chet is a great comedian, I think he'll do well in his new interest. I'll bend the norms here and tell a joke. It'll be funny to Android insiders, apologies otherwise.
At one point, he hosted a get-together in his house, which was one of many things that led to incredible team cohesion. It was somewhat chilly, and we were sitting around in our jackets shivering a bit. One person said, "we should have an Android app for turning on the heat to warm us up." My response: "we already do, it's called GMSCore."
comment 2y ago · link · parent
There's also an "unboxing video" from Dr Ian Cuttress and Jasmina Vasiljevic from a few months ago: https://www.youtube.com/watch?v=WJpJkvNw9Ts . It's a bit out of date because a lot of the stuff that was promised as "coming soon" has actually happened.
I personally think making this open source is huge and am cautiously optimistic that the hardware has potential for general purpose parallel computing, so I've ordered a card.
comment 2y ago · link · parent
comment 2y ago · link · parent
The good-ish news is that as the frame rate goes up, compositor latency goes down, as it's usually an integer multiple of frame refresh time.
I'm also interested in influencing the design of next gen systems to reduce compositor latency, but I'm apparently pretty much alone in that interest.
comment 2y ago · link · parent
[1]: https://www.exurbe.com/tools-for-thinking-about-censorship/
comment 2y ago · link · parent
Unfortunately, graphics is in many ways the easy part. Really excellent integration with system menus, preferences, keyboard, input method editing, all have more variation across platforms and a still-evolving story of solid Rust abstractions. Lately, we've decided to try joining forces with the winit project to see if we can get those problems solved well.
comment 2y ago · link · parent
The idea is not so much that you have a custom widget, but rather that you have a container view which is tightly coupled to a corresponding container widget. As you scroll, that widget requests its view to materialize (and de-materialize) views for the child widgets that become visible. It doesn't need custom widgets, the child widgets can be standard, and because it's Rust the cost of allocating and deallocating the child widgets (as opposed to recycling existing widgets as in Android RecyclerView) is modest.
(Point of clarification for those following more closely: I'm talking about views here, while the linked post is focused on widgets. The widget tree will provide a documented protocol for requesting child widgets, estimating layout sizes, syncing up scroll adjustments, and so on. This protocol will be a bit messy and complicated, because the underlying problems are hard. We'll develop it in tandem with the corresponding Xilem view, which will we hope will provide a really nice clean developer experience, especially in conjunction with an immutable list data structure which can produce sparse deltas. Then, as people want to do their own reactive layer, they can figure out how to do the plumbing from their own take on the incremental computation engine into this protocol.)
We prototyped this last year, enough to be confident in the direction, and it is absolutely a goal to wire it all up this year.
comment 2y ago · link · parent
comment 2y ago · link · parent
The best current info I could find for the latency advice is [2]. Quoting, "Moving data from NEON to ARM registers is Cortex-A8 is expensive." Looking at [3] partially reveals the reason why: the NEON pipeline is entirely after the integer pipeline, so moves from integer to NEON are cheap, but the reverse direction is potentially a large pipeline stall. This is an unusual design decision that as far as I know is not true for any other CPUs. Edit: I found [4], which is a more authoritative source.
[1]: https://github.com/google/music-synthesizer-for-android/blob...
[2]: https://community.arm.com/support-forums/f/armds-forum/757/n...
[3]: https://www.design-reuse.com/articles/11580/architecture-and...
[4]: https://developer.arm.com/documentation/den0018/a/Optimizing...
comment 2y ago · link · parent
Yes, on modern chips float math will generally be faster than fixed point. This is not so much because the integer units get clogged, as that there's a huge amount of chip area and optimization that goes into the float units (often SIMD, and a lot of FM synthesis can benefit from this, though feedback creates data dependencies). For example, multiply-and-add is usually one cycle in float, but would always be two separate instructions in integers.
My recollection is that older ARM chips have a special issue with latency of data dependencies originating from the float unit (NEON, which is optimized for SIMD vector operations) to the integer unit. I suspect this is no longer the case, or is less of an issue.
233.
Xilem 2024 Plans(linebender.org ↗)
10 points · by raphlinus · 2y ago · discuss
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
I think this is a case where the citation bears out the claim, and there's no need for Mitchell to feel embarrassment.
[1]: https://github.blog/2023-11-08-the-state-of-open-source-and-...