Skip to content

Commit 46c9ea0

Browse files
authored
book: Add section for storage class interference (#714)
* book: add section for workgroup memory * book: add section regarding storage class interference
1 parent 7f5e2e7 commit 46c9ea0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/src/attributes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,7 @@ Example:
100100
#[spirv(compute(threads(32)))]
101101
fn main(#[spirv(workgroup)] var: &mut [Vec4; 4]) { }
102102
```
103+
104+
## Generic storage classes
105+
106+
The SPIR-V storage class of types is inferred for function signatures. The inference logic can be guided by attributes on the interface specification in the entry points. This also means it needs to be clear from the documentation if an API requires a certain storage class (e.g `workgroup`) for a variable. Storage class attributes are only permitted on entry points.

0 commit comments

Comments
 (0)