flat patch in vec4 badp2; // ERROR\r
noperspective patch in vec4 badp3; // ERROR\r
patch sample in vec3 badp4; // ERROR\r
+\r
+#extension GL_ARB_separate_shader_objects : enable\r
+\r
+in gl_PerVertex
+{
+float gl_ClipDistance[1];
+} gl_in[]; // ERROR, no size
+\r
+in gl_PerVertex
+{
+float gl_ClipDistance[1];
+} gl_in[gl_MaxPatchVertices];
ERROR: 0:78: 'invocations' : can only apply to a standalone qualifier \r
ERROR: 0:79: 'max_vertices' : can only apply to a standalone qualifier \r
ERROR: 0:80: 'triangle_strip' : can only apply to a standalone qualifier \r
-ERROR: 0:83: 'lines' : does not only apply to output \r
+ERROR: 0:83: 'lines' : does not apply to output \r
ERROR: 0:85: 'triangles' : cannot change previously set input primitive \r
ERROR: 0:86: 'triangles_adjacency' : cannot change previously set input primitive \r
ERROR: 0:88: 'invocations' : not supported for this version or the enabled extensions \r
ERROR: 0:48: 'patch' : cannot use interpolation qualifiers with patch \r
ERROR: 0:49: 'patch' : cannot use interpolation qualifiers with patch \r
ERROR: 0:50: '' : can only have one auxiliary qualifier (centroid, patch, and sample) \r
-ERROR: 12 compilation errors. No code generated.\r
+ERROR: 0:54: 'gl_PerVertex' : block already declared with size, can't redeclare as unsized \r
+ERROR: 0:59: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use \r
+ERROR: 14 compilation errors. No code generated.\r
\r
\r
input primitive = quads\r
0:? 'badp2' (flat patch in 4-component vector of float)\r
0:? 'badp3' (noperspective patch in 4-component vector of float)\r
0:? 'badp4' (patch sample in 3-component vector of float)\r
+0:? 'gl_in' (in 32-element array of block{gl_ClipDistance})\r
\r
\r
Linked tessellation evaluation stage:\r
// source have to figure out how to create revision.h just to get a build\r
// going. However, if it is not updated, it can be a version behind.\r
\r
-#define GLSLANG_REVISION "24486"\r
-#define GLSLANG_DATE "2013/12/11 18:25:37"\r
+#define GLSLANG_REVISION "24518"\r
+#define GLSLANG_DATE "2013/12/13 11:38:43"\r
error(loc, "block redeclaration has extra members", blockName.c_str(), "");
if (type.isArray() != (arraySizes != 0))
error(loc, "cannot change arrayness of redeclared block", blockName.c_str(), "");
- else if (type.isArray() && type.getArraySize() > 0 && type.getArraySize() != arraySizes->getSize())
- error(loc, "cannot change array size of redeclared block", blockName.c_str(), "");
- else if (type.isArray() && type.getArraySize() == 0 && arraySizes->getSize() > 0)
- type.changeArraySize(arraySizes->getSize());
+ else if (type.isArray()) {
+ if (type.getArraySize() > 0 && arraySizes->getSize() == 0)
+ error(loc, "block already declared with size, can't redeclare as unsized", blockName.c_str(), "");
+ else if (type.getArraySize() > 0 && type.getArraySize() != arraySizes->getSize())
+ error(loc, "cannot change array size of redeclared block", blockName.c_str(), "");
+ else if (type.getArraySize() == 0 && arraySizes->getSize() > 0)
+ type.changeArraySize(arraySizes->getSize());
+ }
symbolTable.insert(*block);
}
} // end namespace glslang
+// TODO: geometry and tessellation: make sure all inputs/outputs that should have extra level of arrayness do have the extra level of arrayness
\ No newline at end of file
else\r
size = 1;\r
} else {\r
- if (language == EShLangGeometry && qualifier.isPipeInput()) {\r
- assert(type.isArray());\r
+ if (type.isArray() && \r
+ (language == EShLangGeometry && qualifier.isPipeInput() ||\r
+ (language == EShLangTessControl && qualifier.isPipeOutput() && ! qualifier.patch))) {\r
TType elementType(type, 0);\r
size = computeTypeLocationSize(elementType);\r
} else\r