Put in infrastructure for tessellation, geometry, and compute stages, and partially flesh out with built-in functions.
Added the built-in functions EmitVertex(), EndPrimitive(), barrier(), memoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(), memoryBarrierImage(), memoryBarrierShared(), and groupMemoryBarrier().
Have not added any new built-in variables.
Also changed the linear performance relateToOperator() to a high-performance version.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22659 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-09 17:14:49 +00:00
|
|
|
#version 430 core
|
|
|
|
|
2014-08-11 02:32:30 +00:00
|
|
|
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;
|
|
|
|
|
2014-08-12 02:11:55 +00:00
|
|
|
buffer ShaderStorageBlock
|
|
|
|
{
|
|
|
|
int value;
|
|
|
|
float values[];
|
|
|
|
};
|
|
|
|
|
|
|
|
buffer InvalidShaderStorageBlock
|
|
|
|
{
|
|
|
|
float values[]; // ERROR
|
|
|
|
int value;
|
|
|
|
} invalid;
|
|
|
|
|
Put in infrastructure for tessellation, geometry, and compute stages, and partially flesh out with built-in functions.
Added the built-in functions EmitVertex(), EndPrimitive(), barrier(), memoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(), memoryBarrierImage(), memoryBarrierShared(), and groupMemoryBarrier().
Have not added any new built-in variables.
Also changed the linear performance relateToOperator() to a high-performance version.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22659 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-09 17:14:49 +00:00
|
|
|
void main()
|
|
|
|
{
|
2014-08-11 02:32:30 +00:00
|
|
|
barrier();
|
|
|
|
memoryBarrier();
|
|
|
|
memoryBarrierAtomicCounter();
|
|
|
|
memoryBarrierBuffer();
|
|
|
|
memoryBarrierShared();
|
|
|
|
memoryBarrierImage();
|
|
|
|
groupMemoryBarrier();
|
2014-08-12 02:11:55 +00:00
|
|
|
value = int(values[gl_LocalInvocationIndex]);
|
2015-01-07 06:14:06 +00:00
|
|
|
|
|
|
|
int a;
|
|
|
|
if (a > 10)
|
|
|
|
barrier();
|
Put in infrastructure for tessellation, geometry, and compute stages, and partially flesh out with built-in functions.
Added the built-in functions EmitVertex(), EndPrimitive(), barrier(), memoryBarrier(), memoryBarrierAtomicCounter(), memoryBarrierBuffer(), memoryBarrierImage(), memoryBarrierShared(), and groupMemoryBarrier().
Have not added any new built-in variables.
Also changed the linear performance relateToOperator() to a high-performance version.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22659 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-09 17:14:49 +00:00
|
|
|
}
|
2013-10-22 00:21:04 +00:00
|
|
|
|
2014-08-11 02:32:30 +00:00
|
|
|
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];
|
2014-08-12 02:11:55 +00:00
|
|
|
|
|
|
|
readonly buffer roblock
|
|
|
|
{
|
|
|
|
int value;
|
|
|
|
float values[];
|
|
|
|
} ro;
|
|
|
|
|
|
|
|
void foo()
|
|
|
|
{
|
2015-04-17 21:47:07 +00:00
|
|
|
ro.values[2] = 4.7; // ERROR, readonly
|
2014-08-12 02:11:55 +00:00
|
|
|
ro.values.length();
|
2015-01-07 06:14:06 +00:00
|
|
|
barrier();
|
2014-08-12 02:11:55 +00:00
|
|
|
}
|
2015-04-17 21:47:07 +00:00
|
|
|
|
|
|
|
uniform double roll;
|
|
|
|
uniform writeonly image2D destTex;
|
|
|
|
void fooaoeu() {
|
|
|
|
ivec2 storePos = ivec2(gl_GlobalInvocationID.xy);
|
|
|
|
double localCoef = length(vec2(ivec2(gl_LocalInvocationID.xy)-8)/8.0);
|
|
|
|
dvec4 aa = dvec4(0.4, 0.2, 0.3, 0.4);
|
|
|
|
double globalCoef = 1.0;
|
|
|
|
int i = globalCoef; // ERROR, can't convert from double to int
|
|
|
|
double di = i;
|
|
|
|
}
|