mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-22 09:26:33 +11:00
Move the vello crate to the workspace root (#231)
* Move the vello crate to the root of the crate * Add warning that README is work in progress * Add newline in warning * Move the unlicense into the shader folder * Fixup wgsl-analyzer include paths
This commit is contained in:
parent
dfde0936e5
commit
ff59839737
55 changed files with 74 additions and 66 deletions
26
.vscode/settings.json
vendored
26
.vscode/settings.json
vendored
|
@ -1,17 +1,19 @@
|
|||
{
|
||||
"wgsl-analyzer.customImports": {
|
||||
"bbox": "${workspaceFolder}/vello/shader/shared/bbox.wgsl",
|
||||
"blend": "${workspaceFolder}/vello/shader/shared/blend.wgsl",
|
||||
"bump": "${workspaceFolder}/vello/shader/shared/bump.wgsl",
|
||||
"clip": "${workspaceFolder}/vello/shader/shared/clip.wgsl",
|
||||
"config": "${workspaceFolder}/vello/shader/shared/config.wgsl",
|
||||
"cubic": "${workspaceFolder}/vello/shader/shared/cubic.wgsl",
|
||||
"drawtag": "${workspaceFolder}/vello/shader/shared/drawtag.wgsl",
|
||||
"pathtag": "${workspaceFolder}/vello/shader/shared/pathtag.wgsl",
|
||||
"ptcl": "${workspaceFolder}/vello/shader/shared/ptcl.wgsl",
|
||||
"segment": "${workspaceFolder}/vello/shader/shared/segment.wgsl",
|
||||
"tile": "${workspaceFolder}/vello/shader/shared/tile.wgsl"
|
||||
"bbox": "${workspaceFolder}/shader/shared/bbox.wgsl",
|
||||
"blend": "${workspaceFolder}/shader/shared/blend.wgsl",
|
||||
"bump": "${workspaceFolder}/shader/shared/bump.wgsl",
|
||||
"clip": "${workspaceFolder}/shader/shared/clip.wgsl",
|
||||
"config": "${workspaceFolder}/shader/shared/config.wgsl",
|
||||
"cubic": "${workspaceFolder}/shader/shared/cubic.wgsl",
|
||||
"drawtag": "${workspaceFolder}/shader/shared/drawtag.wgsl",
|
||||
"pathtag": "${workspaceFolder}/shader/shared/pathtag.wgsl",
|
||||
"ptcl": "${workspaceFolder}/shader/shared/ptcl.wgsl",
|
||||
"segment": "${workspaceFolder}/shader/shared/segment.wgsl",
|
||||
"tile": "${workspaceFolder}/shader/shared/tile.wgsl"
|
||||
},
|
||||
"wgsl-analyzer.diagnostics.nagaVersion": "main",
|
||||
"wgsl-analyzer.preprocessor.shaderDefs": ["full"]
|
||||
"wgsl-analyzer.preprocessor.shaderDefs": [
|
||||
"full"
|
||||
]
|
||||
}
|
||||
|
|
46
Cargo.lock
generated
46
Cargo.lock
generated
|
@ -392,14 +392,6 @@ dependencies = [
|
|||
"encase_derive_impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bevy_example"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"vello",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bevy_gilrs"
|
||||
version = "0.9.1"
|
||||
|
@ -3961,21 +3953,6 @@ dependencies = [
|
|||
"x11-dl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winit-demo"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"console_log",
|
||||
"pollster",
|
||||
"roxmltree",
|
||||
"vello",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
"wgpu",
|
||||
"winit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wio"
|
||||
version = "0.2.2"
|
||||
|
@ -4049,6 +4026,29 @@ dependencies = [
|
|||
"wit-schema-version",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "with_bevy"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"vello",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "with_winit"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"console_log",
|
||||
"pollster",
|
||||
"roxmltree",
|
||||
"vello",
|
||||
"wasm-bindgen-futures",
|
||||
"web-sys",
|
||||
"wgpu",
|
||||
"winit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11-dl"
|
||||
version = "2.20.1"
|
||||
|
|
19
Cargo.toml
19
Cargo.toml
|
@ -1,7 +1,7 @@
|
|||
[workspace]
|
||||
resolver = "2"
|
||||
|
||||
members = ["vello", "vello/examples/winit", "vello/examples/bevy", "run-wasm"]
|
||||
members = ["examples/with_winit", "examples/with_bevy", "examples/run_wasm"]
|
||||
|
||||
[workspace.package]
|
||||
edition = "2021"
|
||||
|
@ -12,3 +12,20 @@ authors = ["piet-gpu developers"]
|
|||
# Required for metal support to work on wgpu
|
||||
# TODO: remove when wgpu is upgraded to 0.15
|
||||
naga = { git = "https://github.com/gfx-rs/naga", rev = "ddcd5d3121150b2b1beee6e54e9125ff31aaa9a2" }
|
||||
|
||||
[package]
|
||||
name = "vello"
|
||||
version = "0.1.0"
|
||||
authors = ["Raph Levien <raph@google.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
wgpu = "0.14"
|
||||
raw-window-handle = "0.5"
|
||||
futures-intrusive = "0.5.0"
|
||||
parking_lot = "0.12"
|
||||
bytemuck = { version = "1.12.1", features = ["derive"] }
|
||||
smallvec = "1.8.0"
|
||||
moscato = { git = "https://github.com/dfrg/pinot" }
|
||||
peniko = { git = "https://github.com/linebender/peniko" }
|
||||
|
|
18
README.md
18
README.md
|
@ -2,6 +2,9 @@
|
|||
|
||||
This repo contains the new prototype for a new compute-centric 2D GPU renderer (formerly known as piet-gpu).
|
||||
|
||||
> **Warning**
|
||||
> This README is a work in progress. Previous versions are included below for reference
|
||||
|
||||
It succeeds the previous prototype, [piet-metal].
|
||||
|
||||
The latest version is a middleware for [`wgpu`]. This is used as the rendering backend for
|
||||
|
@ -33,7 +36,7 @@ A prior incarnation used a custom cross-API hal. An archive of this version can
|
|||
|
||||
The piet-gpu project is dual-licensed under both [Apache 2.0](LICENSE-APACHE) and [MIT](LICENSE_MIT) licenses.
|
||||
|
||||
In addition, the shaders are provided under the terms of the [Unlicense](UNLICENSE). The intent is for this research to be used in as broad a context as possible.
|
||||
In addition, the shaders are provided under the terms of the [Unlicense](./shader/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.
|
||||
|
||||
|
@ -46,3 +49,16 @@ Contributions are welcome by pull request. The [Rust code of conduct] applies.
|
|||
[rust code of conduct]: https://www.rust-lang.org/policies/code-of-conduct
|
||||
[`custom-hal-archive-with-shaders`]: https://github.com/linebender/piet-gpu/tree/custom-hal-archive-with-shaders
|
||||
[`custom-hal-archive`]: https://github.com/linebender/piet-gpu/tree/custom-hal-archive
|
||||
|
||||
|
||||
# vello
|
||||
|
||||
This crate is currently a highly experimental proof-of-concept port of the piet-gpu renderer to the WGSL shader language, so it could be run on WebGPU. Depending on how well it works out, it may become the authoritative source for piet-gpu.
|
||||
|
||||
The shaders are actually handlebars templates over WGSL, as it's important to share common data structures; it's likely we'll use the template mechanism to supply various parameters which are not supported by the WGSL language, for example to specify grayscale or RGBA buffer output for fine rasterization.
|
||||
|
||||
This crate also uses a very different approach to the GPU abstraction than piet-gpu. That is essentially a HAL that supports an immediate mode approach to creating resources and submitting commands. Here, we generate a `Recording`, which is basically a simple value type, then an `Engine` plays that recording to the actual GPU. The idea is that this can abstract easily over multiple GPU back-ends, without either the render logic needing to be polymorphic or having dynamic dispatch at the GPU abstraction. The goal is to be more agile.
|
||||
|
||||
Scene encoding is shared with piet-gpu, and currently uses piet-scene in the same repo with no changes.
|
||||
|
||||
This module is still an experimental work in progress. Contributions can be made with the same policy as the root repo, but expect things to change quickly.
|
||||
|
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "bevy_example"
|
||||
name = "with_bevy"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "winit-demo"
|
||||
name = "with_winit"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
|
@ -1,16 +0,0 @@
|
|||
[package]
|
||||
name = "vello"
|
||||
version = "0.1.0"
|
||||
authors = ["Raph Levien <raph@google.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
wgpu = "0.14"
|
||||
raw-window-handle = "0.5"
|
||||
futures-intrusive = "0.5.0"
|
||||
parking_lot = "0.12"
|
||||
bytemuck = { version = "1.12.1", features = ["derive"] }
|
||||
smallvec = "1.8.0"
|
||||
moscato = { git = "https://github.com/dfrg/pinot" }
|
||||
peniko = { git = "https://github.com/linebender/peniko" }
|
|
@ -1,11 +0,0 @@
|
|||
# vello
|
||||
|
||||
This crate is currently a highly experimental proof-of-concept port of the piet-gpu renderer to the WGSL shader language, so it could be run on WebGPU. Depending on how well it works out, it may become the authoritative source for piet-gpu.
|
||||
|
||||
The shaders are actually handlebars templates over WGSL, as it's important to share common data structures; it's likely we'll use the template mechanism to supply various parameters which are not supported by the WGSL language, for example to specify grayscale or RGBA buffer output for fine rasterization.
|
||||
|
||||
This crate also uses a very different approach to the GPU abstraction than piet-gpu. That is essentially a HAL that supports an immediate mode approach to creating resources and submitting commands. Here, we generate a `Recording`, which is basically a simple value type, then an `Engine` plays that recording to the actual GPU. The idea is that this can abstract easily over multiple GPU back-ends, without either the render logic needing to be polymorphic or having dynamic dispatch at the GPU abstraction. The goal is to be more agile.
|
||||
|
||||
Scene encoding is shared with piet-gpu, and currently uses piet-scene in the same repo with no changes.
|
||||
|
||||
This module is still an experimental work in progress. Contributions can be made with the same policy as the root repo, but expect things to change quickly.
|
Loading…
Add table
Reference in a new issue