Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update references to piet-gpu where it makes sense #240

Merged
merged 5 commits into from
Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = ["examples/with_winit", "examples/with_bevy", "examples/run_wasm"]
[workspace.package]
edition = "2021"
version = "0.1.0"
authors = ["piet-gpu developers"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are authors also set elsewhere, which should probably also be removed

That is at least further down this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I removed the authors key in the [package] section, which is I think what you mean.

authors = ["vello developers"]
canadaduane marked this conversation as resolved.
Show resolved Hide resolved

[patch.crates-io]
# Required for metal support to work on wgpu
Expand Down
4 changes: 2 additions & 2 deletions doc/shader_compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

We use git branches to support shader compilation in the cloud. The `dev` branch contains only shader source files (in GLSL format), while the `main` branch contains generated shaders. On every push to the `dev` branch, a GitHub action runs which compiles the shaders and pushes those to `main`.

Thus, you can run piet-gpu from the `main` branch without requiring any shader compilation tools. Also, the `dev` branch has a relatively clean history, and PRs can be made against it without having to worry about merge conflicts in the generated shader files.
canadaduane marked this conversation as resolved.
Show resolved Hide resolved
Thus, you can run vello from the `main` branch without requiring any shader compilation tools. Also, the `dev` branch has a relatively clean history, and PRs can be made against it without having to worry about merge conflicts in the generated shader files.
canadaduane marked this conversation as resolved.
Show resolved Hide resolved

If you do want to make changes to the shaders, you'll need some tools installed:

* [Ninja]
* [Vulkan SDK] (mostly for glslangValidate, spirv-cross)
* [DirectX Shader Compiler][DXC]

The GitHub action runs on Windows so the DXC signing can succeed (note that [hassle-rs] may provide an alternate solution). We currently only compile to MSL on Metal, not AIR, due to tooling friction. The Metal shader compiler is available on Windows, but a barrier to running in CI is that downloading it appears to require an Apple account. Longer term we will want to figure out a solution to this, because the piet-gpu vision involves ahead-of-time compilation of shaders as much as possible.
The GitHub action runs on Windows so the DXC signing can succeed (note that [hassle-rs] may provide an alternate solution). We currently only compile to MSL on Metal, not AIR, due to tooling friction. The Metal shader compiler is available on Windows, but a barrier to running in CI is that downloading it appears to require an Apple account. Longer term we will want to figure out a solution to this, because the vello vision involves ahead-of-time compilation of shaders as much as possible.

Right now the scripts for compiling shaders are done in hand-written ninja files. This is likely to change, as the number of permutations will increase, and we also may want access to metadata from the shader compilation process.

Expand Down
2 changes: 2 additions & 0 deletions doc/vision.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Raph Levien, 2020-12-10

Note: `vello` was previously called `piet-gpu`.

I’ve done several [blog posts](./blogs.md) about piet-gpu already, and more generally GPU compute, but this document is a little different in scope. Rather than showing off a prototype and presenting a research result, it will set forth a bold and ambitious plan for where this might go. I find this vision compelling, and it’s motivated me to spend a lot of energy mastering some difficult material. The grand vision is much more than one person can do, so I’ll do some of it myself and maybe inspire collaboration for the rest of it.

The full vision for piet-gpu is a 2D rendering engine that is considerably faster, higher quality, and more flexible than the current state of the art, and runs on a wide variety of hardware. I’ll go into some detail about why I think this goal is possible and what kind of work is needed to get there.
Expand Down
2 changes: 1 addition & 1 deletion examples/with_winit/src/simple_text.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 The piet-gpu authors.
// Copyright 2022 The vello authors.
canadaduane marked this conversation as resolved.
Show resolved Hide resolved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion examples/with_winit/src/test_scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ pub fn render_anim_frame(sb: &mut SceneBuilder, text: &mut SimpleText, i: usize)
&rect,
);
let text_size = 60.0 + 40.0 * (0.01 * i as f32).sin();
let s = "\u{1f600}hello piet-gpu text!";
let s = "\u{1f600}hello vello text!";
text.add(
sb,
None,
Expand Down
2 changes: 1 addition & 1 deletion shader/fine.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ fn main(
let rad = read_rad_grad(cmd_ix);
for (var i = 0u; i < PIXELS_PER_THREAD; i += 1u) {
let my_xy = vec2(xy.x + f32(i), xy.y);
// TODO: can hoist y, but for now stick to piet-gpu
// TODO: can hoist y, but for now stick to vello
canadaduane marked this conversation as resolved.
Show resolved Hide resolved
canadaduane marked this conversation as resolved.
Show resolved Hide resolved
let xy_xformed = rad.matrx.xz * my_xy.x + rad.matrx.yw * my_xy.y - rad.xlat;
let ba = dot(xy_xformed, rad.c1);
let ca = rad.ra * dot(xy_xformed, xy_xformed);
Expand Down
2 changes: 1 addition & 1 deletion shader/shared/config.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct Config {
bin_data_start: u32,

// offsets within scene buffer (in u32 units)
// Note: this is a difference from piet-gpu, which is in bytes
// Note: this is a difference from vello, which is in bytes
canadaduane marked this conversation as resolved.
Show resolved Hide resolved
pathtag_base: u32,
pathdata_base: u32,

Expand Down
2 changes: 1 addition & 1 deletion shader/tile_alloc.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn main(
let total_count = sh_tile_count[WG_SIZE - 1u];
for (var i = local_id.x; i < total_count; i += WG_SIZE) {
// Note: could format output buffer as u32 for even better load
// balancing, as does piet-gpu.
// balancing, as does vello.
canadaduane marked this conversation as resolved.
Show resolved Hide resolved
tiles[tile_offset + i] = Tile(0, 0u);
}
}
2 changes: 1 addition & 1 deletion src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub enum Command {
UploadImage(ImageProxy, Vec<u8>),
// Discussion question: third argument is vec of resources?
// Maybe use tricks to make more ergonomic?
// Alternative: provide bufs & images as separate sequences, like piet-gpu.
// Alternative: provide bufs & images as separate sequences, like vello.
canadaduane marked this conversation as resolved.
Show resolved Hide resolved
canadaduane marked this conversation as resolved.
Show resolved Hide resolved
Dispatch(ShaderId, (u32, u32, u32), Vec<ResourceProxy>),
Download(BufProxy),
Clear(BufProxy, u64, Option<NonZeroU64>),
Expand Down
2 changes: 1 addition & 1 deletion src/glyph.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 The piet-gpu authors.
// Copyright 2022 The vello authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/scene.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 The piet-gpu authors.
// Copyright 2022 The vello authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down