From 0fd118e7d11d0470d85fd0610cf23f07df5be41c Mon Sep 17 00:00:00 2001 From: LunarLanding <4441338+LunarLanding@users.noreply.github.com> Date: Wed, 8 Jan 2020 19:49:14 +0000 Subject: [PATCH] Clarify pipeline mode allocation behavior --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 558915a3..2a0451bc 100644 --- a/README.md +++ b/README.md @@ -796,7 +796,10 @@ const result2 = kernel2(result1); Handling minimal amounts of GPU memory is handled internally, but a good practice is to clean up memory you no longer need. Cleanup kernel outputs by using `texture.delete()` to keep GPU memory as small as possible. -NOTE: Internally textures will only release from memory if there are no references to them, +NOTE: Internally textures will only release from memory if there are no references to them. +When using pipeline mode on a kernel K the output for each call will be a newly allocated texture T. +If, after getting texture T as an output, T.delete() is called, the next call to K will reuse T as its output texture. + ## Offscreen Canvas 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`: