Skip to content

Commit e2dc3b3

Browse files
committed
Update some of the documentation to reflect the new structure.
1 parent cb9d99e commit e2dc3b3

File tree

5 files changed

+322
-27
lines changed

5 files changed

+322
-27
lines changed

.github/copyright.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# -g "!src/special_directory"
88

99
# Check all the standard Rust source files
10-
output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Vello Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT$\n\n" --files-without-match --multiline -g "*.rs" -g "!{shader,crates/shaders/src/cpu}" .)
10+
output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Vello Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT$\n\n" --files-without-match --multiline -g "*.rs" -g "!vello_shaders/{shader,src/cpu}" .)
1111

1212
if [ -n "$output" ]; then
1313
echo -e "The following files lack the correct copyright header:\n"
@@ -20,7 +20,7 @@ if [ -n "$output" ]; then
2020
fi
2121

2222
# Check all the shaders, both WGSL and CPU shaders in Rust, as they also have Unlicense
23-
output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Vello Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT OR Unlicense$\n\n" --files-without-match --multiline -g "{shader,crates/shaders/src/cpu}/**/*.{rs,wgsl}" .)
23+
output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Vello Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT OR Unlicense$\n\n" --files-without-match --multiline -g "vello_shaders/{shader,src/cpu}/**/*.{rs,wgsl}" .)
2424

2525
if [ -n "$output" ]; then
2626
echo -e "The following shader files lack the correct copyright header:\n"

.vscode/settings.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"wgsl-analyzer.customImports": {
3-
"bbox": "${workspaceFolder}/shader/shared/bbox.wgsl",
4-
"blend": "${workspaceFolder}/shader/shared/blend.wgsl",
5-
"bump": "${workspaceFolder}/shader/shared/bump.wgsl",
6-
"clip": "${workspaceFolder}/shader/shared/clip.wgsl",
7-
"config": "${workspaceFolder}/shader/shared/config.wgsl",
8-
"cubic": "${workspaceFolder}/shader/shared/cubic.wgsl",
9-
"drawtag": "${workspaceFolder}/shader/shared/drawtag.wgsl",
10-
"pathtag": "${workspaceFolder}/shader/shared/pathtag.wgsl",
11-
"ptcl": "${workspaceFolder}/shader/shared/ptcl.wgsl",
12-
"segment": "${workspaceFolder}/shader/shared/segment.wgsl",
13-
"tile": "${workspaceFolder}/shader/shared/tile.wgsl",
14-
"transform": "${workspaceFolder}/shader/shared/transform.wgsl",
15-
"util": "${workspaceFolder}/shader/shared/util.wgsl"
3+
"bbox": "${workspaceFolder}/vello_shaders/shader/shared/bbox.wgsl",
4+
"blend": "${workspaceFolder}/vello_shaders/shader/shared/blend.wgsl",
5+
"bump": "${workspaceFolder}/vello_shaders/shader/shared/bump.wgsl",
6+
"clip": "${workspaceFolder}/vello_shaders/shader/shared/clip.wgsl",
7+
"config": "${workspaceFolder}/vello_shaders/shader/shared/config.wgsl",
8+
"cubic": "${workspaceFolder}/vello_shaders/shader/shared/cubic.wgsl",
9+
"drawtag": "${workspaceFolder}/vello_shaders/shader/shared/drawtag.wgsl",
10+
"pathtag": "${workspaceFolder}/vello_shaders/shader/shared/pathtag.wgsl",
11+
"ptcl": "${workspaceFolder}/vello_shaders/shader/shared/ptcl.wgsl",
12+
"segment": "${workspaceFolder}/vello_shaders/shader/shared/segment.wgsl",
13+
"tile": "${workspaceFolder}/vello_shaders/shader/shared/tile.wgsl",
14+
"transform": "${workspaceFolder}/vello_shaders/shader/shared/transform.wgsl",
15+
"util": "${workspaceFolder}/vello_shaders/shader/shared/util.wgsl"
1616
},
1717
"wgsl-analyzer.diagnostics.nagaVersion": "main",
1818
"wgsl-analyzer.preprocessor.shaderDefs": [

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ Licensed under either of
274274

275275
at your option.
276276

277-
In addition, all files in the [`shader`](https://github.com/linebender/vello/tree/main/shader) and [`src/cpu_shader`](https://github.com/linebender/vello/tree/main/src/cpu_shader)
277+
In addition, all files in the [`vello_shaders/shader`](https://github.com/linebender/vello/tree/main/vello_shaders/shader) and [`vello_shaders/src/cpu`](https://github.com/linebender/vello/tree/main/vello_shaders/src/cpu)
278278
directories and subdirectories thereof are alternatively licensed under
279-
the Unlicense ([shader/UNLICENSE](https://github.com/linebender/vello/tree/main/shader/UNLICENSE) or <http://unlicense.org/>).
279+
the Unlicense ([shader/UNLICENSE](https://github.com/linebender/vello/tree/main/vello_shaders/shader/UNLICENSE) or <http://unlicense.org/>).
280280
For clarity, these files are also licensed under either of the above licenses.
281281
The intent is for this research to be used in as broad a context as possible.
282282

doc/ARCHITECTURE.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ Our current priority is to fill in missing features and to fix rendering artifac
3131

3232
The repository is structured as such:
3333

34-
- `crates/`
35-
- `encoding/` - Types that represent the data that needs to be rendered.
36-
- `shaders/` - Infrastructure to preprocess and cross-compile shaders at compile time; see "Shader templating".
37-
- `cpu/` - Functions that perform the same work as their equivalently-named WGSL shaders for the CPU fallbacks. The name is a bit loose; they're "shaders" in the sense that they work on resource bindings with the exact same layout as actual GPU shaders.
38-
- `tests/` - Helper code for writing tests; current has a single smoke test and not much else.
3934
- `doc/` - Various documents detailing the vision for Vello as it was developed. This directory should probably be refactored away; adding to it not recommended.
40-
- `examples/` - Example projects using Vello. Each example is its own crate, with its own dependencies. The simplest example is the `shapes` one.
41-
- `shader/` - This is where the magic happens. WGSL shaders that define the compute operations (often variations of prefix sum) that Vello does to render a scene.
42-
- `shared/` - Shared types, functions and constants included in other shaders through non-standard `#import` preprocessor directives (see "Shader templating").
43-
- `src/` - Code for the main `vello` crate.
35+
- `examples/` - Example projects using Vello. Each example is its own crate, with its own dependencies. The simplest example is called `simple`.
36+
- `vello/` - Code for the main `vello` crate.
37+
- `vello_encoding/` - Types that represent the data that needs to be rendered.
38+
- `vello_shaders/` - Infrastructure to preprocess and cross-compile shaders at compile time; see "Shader templating".
39+
- `shader/` - This is where the magic happens. WGSL shaders that define the compute operations (often variations of prefix sum) that Vello does to render a scene.
40+
- `shared/` - Shared types, functions and constants included in other shaders through non-standard `#import` preprocessor directives (see "Shader templating").
41+
- `cpu/` - Functions that perform the same work as their equivalently-named WGSL shaders for the CPU fallbacks. The name is a bit loose; they're "shaders" in the sense that they work on resource bindings with the exact same layout as actual GPU shaders.
42+
- `vello_tests/` - Helper code for writing tests; current has a single smoke test and not much else.
4443

4544

4645
## Shader templating
@@ -81,7 +80,7 @@ In principle, other backends could consume a `Recording`, but for now the only i
8180

8281
### CPU rendering
8382

84-
The code in `cpu_shader/*.rs` and `cpu_dispatch.rs` provides *some* support for CPU-side rendering. It's in an awkward place right now:
83+
The code in `vello_shaders/src/cpu/*.rs` and `vello_shaders/src/cpu.rs` provides *some* support for CPU-side rendering. It's in an awkward place right now:
8584

8685
- It's called through WgpuEngine, so the dependency on wgpu is still there.
8786
- Fine rasterization (the part at the end that puts pixels on screen) doesn't work in CPU yet (see [#386]).

0 commit comments

Comments
 (0)