diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-08 23:02:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-08 23:02:40 +0000 |
commit | 0d70800962f39589e23608b563e89866e952218b (patch) | |
tree | ef7555a49e1b34c3318ad1c72931d24c2e23fe29 /Master/texmf-dist/asymptote/shaders/sum3.glsl | |
parent | 871e3a91b332158dcf4feff37ffb24393a675a6b (diff) |
asymptote 2.79 support files, windows binaries
git-svn-id: svn://tug.org/texlive/trunk@62530 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/shaders/sum3.glsl')
-rwxr-xr-x | Master/texmf-dist/asymptote/shaders/sum3.glsl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/texmf-dist/asymptote/shaders/sum3.glsl b/Master/texmf-dist/asymptote/shaders/sum3.glsl new file mode 100755 index 00000000000..85f55ff2a6c --- /dev/null +++ b/Master/texmf-dist/asymptote/shaders/sum3.glsl @@ -0,0 +1,28 @@ +layout(local_size_x=LOCAL_SIZE_X) in; + +uniform uint offset2; + +layout(binding=2, std430) buffer localSumBuffer +{ + uint localSum[]; +}; + +layout(binding=3, std430) buffer globalSumBuffer { + uint globalSum[]; +}; + +void main(void) +{ + uint id=gl_GlobalInvocationID.x; + + uint row=offset2+LOCAL_SIZE_X*id; + uint stop=row+LOCAL_SIZE_X; + + uint Sum=localSum[row]; + for(uint i=row+1u; i < stop; ++i) { + Sum += localSum[i]; + localSum[i]=Sum; + } + + globalSum[id+1u]=Sum; +} |