Go to file
Raph Levien a5991ecf97 Expand runtime query of GPU capabilities
Test whether the GPU supports subgroups (including size control) and
memory model.

This patch does all the ceremony needed for runtime query, including
testing the Vulkan version and only probing the extensions when
available. Thus, it should work fine on older devices (not yet tested).

The reporting of capabilities follows Vulkan concepts, but is not
particularly Vulkan-specific.
2021-05-08 11:41:47 -07:00
doc Minor tweaks to vision doc 2020-12-11 07:31:21 -08:00
piet-gpu Expand runtime query of GPU capabilities 2021-05-08 11:41:47 -07:00
piet-gpu-derive Query extensions at runtime 2021-04-02 19:58:48 -07:00
piet-gpu-hal Expand runtime query of GPU capabilities 2021-05-08 11:41:47 -07:00
piet-gpu-types replace per-element fill mode flags with a SetFillMode element 2021-03-29 21:10:25 +02:00
.gitignore Starting piet-gpu repo 2020-04-05 15:17:26 -07:00
Cargo.lock Android test application 2021-04-05 16:23:11 -07:00
Cargo.toml Update to piet 0.13 2020-05-12 08:26:48 -07:00
LICENSE-APACHE Licenses and README 2020-04-15 08:56:39 -07:00
LICENSE-MIT Licenses and README 2020-04-15 08:56:39 -07:00
README.md Add vision document 2020-12-10 09:15:50 -08:00

piet-gpu

This repo contains the new prototype for a new compute-centric 2D GPU renderer.

It succeeds the previous prototype, piet-metal.

Goals

The main goal is to answer research questions about the future of 2D rendering:

  • Is a compute-centered approach better than rasterization (Direct2D)? How much so?

  • To what extent do "advanced" GPU features (subgroups, descriptor arrays) help?

  • Can we improve quality and extend the imaging model in useful ways?

Another goal is to explore a standards-based, portable approach to GPU compute.

Blogs and other writing

Much of the research progress on piet-gpu is documented in blog entries. See doc/blogs.md for pointers to those.

There is a much larger and detailed vision that explains the longer-term goals of the project, and how we might get there.

Why not gfx-hal?

It makes a lot of sense to use gfx-hal, as it addresses the ability to write kernel and runtime code once and run it portably. But in exploring it I've found some points of friction, especially in using more "advanced" features. To serve the research goals, I'm enjoying using Vulkan directly, through ash, which I've found does a good job tracking Vulkan releases. One example is experimenting with VK_EXT_subgroup_size_control.

The hal layer in this repo is strongly inspired by gfx-hal, but with some differences. One is that we're shooting for a compile-time pipeline to generate GPU IR on DX12 and Metal, while gfx-hal ships SPIRV-Cross in the runtime. To access Shader Model 6, that would also require bundling DXC at runtime, which is not yet implemented (though it's certainly possible).

Why not wgpu?

The case for wgpu is also strong, but it's even less mature. I'd love to see it become a solid foundation, at which point I'd use it as the main integration with Druid.

In short, the goal is to facilitate the research now, collect the data, and then use that to choose a best path for shipping later.

License and contributions.

The piet-gpu project is dual-licensed under both Apache 2.0 and MIT licenses.

In addition, the shaders are provided under the terms of the Unlicense. The intent is for this research to be used in as broad a context as possible.

Contributions are welcome by pull request. The Rust code of conduct applies.