Finish implementing compute shaders, within #version 430, partly based on a submission.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27674 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -1,12 +1,38 @@
|
||||
#version 430 core
|
||||
|
||||
layout(local_size_x = 2) in;
|
||||
layout(local_size_x = 16) in; // ERROR, changing
|
||||
layout(local_size_z = 4096) in; // ERROR, too large
|
||||
layout(local_size_x = 2) in;
|
||||
|
||||
const int total = gl_MaxComputeWorkGroupCount.y
|
||||
+ gl_MaxComputeUniformComponents
|
||||
+ gl_MaxComputeTextureImageUnits
|
||||
+ gl_MaxComputeImageUniforms
|
||||
+ gl_MaxComputeAtomicCounters
|
||||
+ gl_MaxComputeAtomicCounterBuffers;
|
||||
|
||||
void main()
|
||||
{
|
||||
memoryBarrierAtomicCounter();
|
||||
memoryBarrierBuffer();
|
||||
memoryBarrierShared();
|
||||
memoryBarrierImage();
|
||||
groupMemoryBarrier();
|
||||
barrier();
|
||||
memoryBarrier();
|
||||
memoryBarrierAtomicCounter();
|
||||
memoryBarrierBuffer();
|
||||
memoryBarrierShared();
|
||||
memoryBarrierImage();
|
||||
groupMemoryBarrier();
|
||||
}
|
||||
|
||||
layout(location = 2) in vec3 v3;
|
||||
layout(location = 2) in vec3 v3; // ERROR
|
||||
in float f; // ERROR
|
||||
out float fo; // ERROR
|
||||
|
||||
shared vec4 s;
|
||||
layout(location = 2) shared vec4 sl; // ERROR
|
||||
shared float fs = 4.2; // ERROR
|
||||
|
||||
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) out; // ERROR
|
||||
|
||||
int arrX[gl_WorkGroupSize.x];
|
||||
int arrY[gl_WorkGroupSize.y];
|
||||
int arrZ[gl_WorkGroupSize.z];
|
||||
|
||||
Reference in New Issue
Block a user