Go to file
Raph Levien 433327cb34 Don't reset query pool twice
When invoked in non robust memory mode (ie not using RenderDriver), both
the render_coarse and render_fine calls reset the query pool, which in
turn causes the fetch of the query pool to hang (in Vulkan).

This is not an issue in robust memory mode because there are two
different query pools, and both should indeed be reset.

This patch makes the second reset conditional on the query pool being
fresh.

Fixes an observed hang with the xilem prototype on Windows.
2022-11-21 21:43:03 -08:00
.github Add ref_name to commit message 2022-07-14 07:25:18 -07:00
.vscode Checkpoint of clip and gradient work 2022-11-10 19:48:36 -08:00
doc Doc improvements 2022-07-13 12:07:55 -07:00
pgpu-render update c-api deps 2022-10-19 15:54:43 -04:00
piet-gpu Don't reset query pool twice 2022-11-21 21:43:03 -08:00
piet-gpu-derive Warning cleanup 2021-10-23 09:21:19 -07:00
piet-gpu-hal update dependencies 2022-10-19 15:21:29 -04:00
piet-gpu-types Radial gradients 2022-03-30 20:32:13 -07:00
piet-scene prevent bad encoding with only move-tos 2022-11-07 23:26:51 -05:00
piet-wgsl Clarify licensing for WGSL shaders (#205) 2022-11-19 16:45:42 +00:00
tests Fix ash and raw_window_handle breakage 2022-10-17 18:12:41 -07:00
.gitattributes Address review feedback 2022-10-25 09:03:13 -07:00
.gitignore Remove generated shaders from dev branch 2022-07-13 12:22:11 -07:00
Cargo.lock Almost rendering tiger 2022-11-04 13:15:05 -07:00
Cargo.toml Address review feedback 2022-10-25 09:03:13 -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 Clarify licensing for WGSL shaders (#205) 2022-11-19 16:45:42 +00:00
UNLICENSE Clarify licensing for WGSL shaders (#205) 2022-11-19 16:45:42 +00: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.

The dx12 backend was adapted from piet-dx12 by Brian Merchant.

Contributions are welcome by pull request. The Rust code of conduct applies. Pull requests should be against the dev branch; see shader_compilation.md for explanation and details.