[glslang] Refine implicit array size interfaces. (#3074)
[platform/upstream/glslang.git] / Test / 440.vert
index ac946be..4ab6f2e 100644 (file)
@@ -63,6 +63,20 @@ layout(location = 1, component = 1) out;                 // ERROR, no global set
 layout(location = 50, component = 3) out int be;\r
 layout(location = 50, component = 0) out vec3 bf;\r
 \r
+layout(location = 51, component = 1) out double dfo;     // ERROR, odd component\r
+layout(location = 52, component = 2) out dvec2 dvo;      // ERROR, overflow\r
+layout(location = 53) out double dfo2;\r
+layout(location = 53, component = 2) out vec2 ffv2;      // okay, fits\r
+layout(location = 54) out dvec4 dvec4out;                // uses up location 55 too\r
+layout(location = 55) out float overf;                   // ERROR, collides with previous dvec4\r
+layout(location = 56, component = 1) out vec2 df2o;\r
+layout(location = 56, component = 3) out float sf2o;\r
+layout(location = 57, component = 2) out vec2 dv3o;\r
+layout(location = 57, component = 3) out float sf4o;     // ERROR, overlapping component\r
+layout(location=58) out flat dvec3 dv3o2;                // uses part of location 59\r
+layout(location=59, component=2) out flat double dfo3;   // okay, fits\r
+layout(location=59, component=0) out flat double dfo4;   // ERROR, overlaps the dvec3 in starting in 58\r
+\r
 out bblck1 {\r
     vec4 bbv;\r
 } bbinst1;\r
@@ -160,6 +174,12 @@ out layout(xfb_buffer=7, xfb_offset=0) bblck10 {  // link ERROR, implicit stride
     float f;\r
 } bbinst10;\r
 \r
+layout(xfb_buffer = 3) out;\r
+layout(xfb_offset = 32) out gl_PerVertex {\r
+    layout(xfb_buffer = 2) float gl_PointSize; // ERROR, change in xfb_buffer\r
+    vec4 gl_Position;\r
+};\r
+\r
 int drawParamsBad()\r
 {\r
     return gl_BaseVertexARB + gl_BaseInstanceARB + gl_DrawIDARB; // ERROR, extension not requested\r