Web: Add compute stage.
This commit is contained in:
parent
61c22e255d
commit
51ed01c877
13 changed files with 1526 additions and 1380 deletions
28
Test/web.comp
Normal file
28
Test/web.comp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#version 310 es
|
||||
|
||||
layout(local_size_x_id = 18, local_size_z_id = 19) in;
|
||||
|
||||
layout(local_size_x = 2) in;
|
||||
layout(local_size_y = 5) in;
|
||||
layout(local_size_z = 7) in;
|
||||
const int total = gl_MaxComputeWorkGroupCount.x
|
||||
+ gl_MaxComputeWorkGroupCount.y
|
||||
+ gl_MaxComputeWorkGroupCount.z
|
||||
+ gl_MaxComputeUniformComponents
|
||||
+ gl_MaxComputeTextureImageUnits;
|
||||
|
||||
shared vec4 s[total];
|
||||
|
||||
int arrX[gl_WorkGroupSize.x];
|
||||
int arrY[gl_WorkGroupSize.y];
|
||||
int arrZ[gl_WorkGroupSize.z];
|
||||
|
||||
void main()
|
||||
{
|
||||
barrier();
|
||||
memoryBarrier();
|
||||
memoryBarrierShared();
|
||||
groupMemoryBarrier();
|
||||
s[3] = vec4(1.0);
|
||||
s[3] *= arrX[0] * arrY[0] * arrZ[0];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue