Skip to content

Commit ab75103

Browse files
feat: Add texture.clone() support and tests
feat: Upgrade gpu-mock.js fix: Typescript `Texture` definition fix: Typescript JSON definition fix: Some internal documentation fix: Some removal of unused or duplicate code
1 parent 33a2395 commit ab75103

22 files changed

+1283
-1409
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ NOTE: documentation is slightly out of date for the upcoming release of v2. We
8585
* [Types](#types)
8686
* [Loops](#loops)
8787
* [Pipelining](#pipelining)
88+
* [Cloning Textures](#cloning-textures)
8889
* [Offscreen Canvas](#offscreen-canvas)
8990
* [Cleanup](#cleanup)
9091
* [Flattened typed array support](#flattened-typed-array-support)
@@ -712,6 +713,9 @@ const matMult = gpu.createKernel(function(a, b) {
712713
[Pipeline](https://en.wikipedia.org/wiki/Pipeline_(computing)) is a feature where values are sent directly from kernel to kernel via a texture.
713714
This results in extremely fast computing. This is achieved with the kernel setting `pipeline: boolean` or by calling `kernel.setPipeline(true)`
714715

716+
### Cloning Textures **New in V2!**
717+
When using pipeline mode the outputs from kernels can be cloned using `texture.clone()`.
718+
715719
```js
716720
const kernel1 = gpu.createKernel(function(v) {
717721
return v[this.thread.x];

0 commit comments

Comments
 (0)