Added makefile as part of cmake and added windows compatibility for python scripts
This commit is contained in:
parent
5567c532bf
commit
f54678af03
14 changed files with 1043 additions and 1207 deletions
|
|
@ -1,39 +0,0 @@
|
|||
#version 450
|
||||
|
||||
// This variable is set by the pipeline
|
||||
layout (constant_id = 0) const uint BUF_SIZE = 32;
|
||||
|
||||
layout(binding = 0) buffer Pos {
|
||||
uint values[ ];
|
||||
};
|
||||
|
||||
layout (local_size_x = 4, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
shared uint sharedTotal[1];
|
||||
|
||||
uint mod(uint x, uint N) {
|
||||
return (x % N + N) % N;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
uint index = gl_GlobalInvocationID.x;
|
||||
if (index >= BUF_SIZE)
|
||||
return;
|
||||
|
||||
sharedTotal[0] = 0;
|
||||
|
||||
barrier();
|
||||
memoryBarrierShared();
|
||||
|
||||
atomicAdd(sharedTotal[0], values[index]);
|
||||
|
||||
barrier();
|
||||
memoryBarrierShared();
|
||||
|
||||
uint adjacentSum = values[mod(index+1, BUF_SIZE)] + values[mod(index-1, BUF_SIZE)];
|
||||
|
||||
values[index] = sharedTotal[0] + adjacentSum;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue