Skip to content

Commit 097ba40

Browse files
oisyneddyb
authored andcommitted
Fixed some errors in documentation
1 parent 68ddddb commit 097ba40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/migration-to-register-tool.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ In a [recent nightly Rust update](https://github.com/rust-lang/rust/commit/76dd5
88

99
## What does this mean for you as a shader maintainer
1010

11-
You'll need to import the `spirv` proc macro attribute from `spirv-std` in order for the rust compiler:
11+
You'll need to import the `spirv` proc macro attribute from `spirv-std` in order for the `spirv` macro to be visible in global scope:
1212

1313
```rust
1414
use spirv_std::spirv;
1515
```
1616

17-
If your shader code already contains this line but is conditionally only included for non-spirv builds, like so:
17+
If your shader code already contains this line but is conditionally only included for non-SPIR-V builds, like so:
1818

1919
```rust
2020
#[cfg(not(target_arch = "spirv"))]
2121
use spirv_std::spirv;
2222
```
2323

24-
please remove the conditional attribute.
24+
please remove the conditional attribute (the line containing `#[cfg(..)]`).
2525

26-
For this macro attribute to work correctly, it is important that `spirv` is visible in the global score and you use it like you used it before: `#[spirv(..)]`. An attempt to scope the attribute (such as `#[spirv_std::spirv(..)]`) will confuse the macro and likely fail.
26+
For this macro attribute to work correctly, it is important that `spirv` is visible in the global score and you use it like you used it before: `#[spirv(..)]`. An attempt to scope the attribute (such as `#[spirv_std::spirv(..)]`) will confuse the macro and it will likely fail to compile.
2727

2828
You'll also need to remove the `feature(register_attr)` and `register_attr(spirv)` attributes from your shader crates. If you're building using `SpirvBuilder`, you don't need to do anything else; the new `register_tool` is applied automatically. If not, you'll need to include these attributes instead:
2929

0 commit comments

Comments
 (0)