Fix explicit TCS output array size not matching gl_MaxPatchVertices.
authorJarkko Pöyry <jpoyry@google.com>
Tue, 9 Jun 2015 20:32:17 +0000 (13:32 -0700)
committerJarkko Pöyry <jpoyry@google.com>
Wed, 10 Jun 2015 17:47:10 +0000 (10:47 -0700)
Fix GLES3 tessellation.user_defined_io.per_vertex_* cases declaring explicitly
sized output (block) array with invalid size. Size, if declared, must match
both gl_MaxPatchVertices and the size declared in the layout declaration. Fix
cases by always using implicit array sizes in per-vertex TCS output arrays.

See Khronos bug #12908 (issues 2 and 3) for details.

Bug: 21730725
Change-Id: I9c5e674893590e0f004708139b507fc5446424ae

modules/gles31/functional/es31fTessellationTests.cpp

index 7c08f7d..18fecb1 100644 (file)
@@ -5998,10 +5998,12 @@ void UserDefinedIOCase::init (void)
                        DE_ASSERT(numElements != -2);
 
                        if (isArray)
+                       {
+                               // \note: TCS output arrays are always implicitly-sized
                                tcsDeclarations += outMaybePatch + output.declareArray(m_ioType == IO_TYPE_PER_PATCH_ARRAY                      ? de::toString(int(NUM_PER_PATCH_ARRAY_ELEMS))
                                                                                                                                           : m_ioType == IO_TYPE_PER_PATCH_BLOCK_ARRAY  ? de::toString(int(NUM_PER_PATCH_BLOCKS))
-                                                                                                                                          : isExplicitVertexArraySize                                  ? de::toString(int(NUM_OUTPUT_VERTICES))
                                                                                                                                           : "");
+                       }
                        else
                                tcsDeclarations += outMaybePatch + output.declare();