Skip to content

Commit 0fd118e

Browse files
authored
Clarify pipeline mode allocation behavior
1 parent cd0b417 commit 0fd118e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,10 @@ const result2 = kernel2(result1);
796796
Handling minimal amounts of GPU memory is handled internally, but a good practice is to clean up memory you no longer need.
797797
Cleanup kernel outputs by using `texture.delete()` to keep GPU memory as small as possible.
798798

799-
NOTE: Internally textures will only release from memory if there are no references to them,
799+
NOTE: Internally textures will only release from memory if there are no references to them.
800+
When using pipeline mode on a kernel K the output for each call will be a newly allocated texture T.
801+
If, after getting texture T as an output, T.delete() is called, the next call to K will reuse T as its output texture.
802+
800803

801804
## Offscreen Canvas
802805
GPU.js supports offscreen canvas where available. Here is an example of how to use it with two files, `gpu-worker.js`, and `index.js`:

0 commit comments

Comments
 (0)