Support GL 4.5 in the Separate shader tests
authorAlexander Galazin <alexander.galazin@arm.com>
Thu, 21 Jan 2021 09:37:51 +0000 (10:37 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 5 Feb 2021 07:50:52 +0000 (07:50 +0000)
Affects:
dEQP-GLES31.functional.separate_shader.*
dEQP-GL45.functional.separate_shader.*

Components: AOSP

Change-Id: I8e46a4730162ffd4c7b385dd44435fa2a8bab2e5

modules/gles31/functional/es31fFunctionalTests.cpp
modules/gles31/functional/es31fFunctionalTests.hpp
modules/gles31/functional/es31fSeparateShaderTests.cpp
modules/gles31/functional/es31fSeparateShaderTests.hpp
modules/gles31/tes31TestPackage.cpp
modules/gles31/tgl45TestPackage.cpp

index d2d6aa4..234edb6 100644 (file)
@@ -397,16 +397,16 @@ public:
        }
 };
 
-FunctionalTests::FunctionalTests (Context& context)
+GLES31FunctionalTests::GLES31FunctionalTests (Context& context)
        : TestCaseGroup(context, "functional", "Functionality Tests")
 {
 }
 
-FunctionalTests::~FunctionalTests (void)
+GLES31FunctionalTests::~GLES31FunctionalTests (void)
 {
 }
 
-void FunctionalTests::init (void)
+void GLES31FunctionalTests::init (void)
 {
        addChild(new ShaderTests                                                        (m_context));
        addChild(new ComputeTests                                                       (m_context));
@@ -426,7 +426,52 @@ void FunctionalTests::init (void)
        addChild(new VertexAttributeBindingTests                        (m_context));
        addChild(new ProgramUniformTests                                        (m_context));
        addChild(new AdvancedBlendTests                                         (m_context));
-       addChild(createSeparateShaderTests                                      (m_context));
+       addChild(createGLESSeparateShaderTests                          (m_context));
+       addChild(new UniformLocationTests                                       (m_context));
+       addChild(new TessellationGeometryInteractionTests       (m_context));
+       addChild(new DebugTests                                                         (m_context));
+       addChild(new FboTests                                                           (m_context));
+       addChild(new ProgramInterfaceQueryTests                         (m_context));
+       addChild(new LayoutBindingTests                                         (m_context));
+       addChild(new PrimitiveBoundingBoxTests                          (m_context));
+       addChild(new AndroidExtensionPackES31ATests                     (m_context));
+       addChild(createCopyImageTests                                           (m_context));
+       addChild(createDrawBuffersIndexedTests                          (m_context));
+       addChild(new DefaultVertexArrayObjectTests                      (m_context));
+       addChild(new SRGBTextureDecodeTests                                     (m_context));
+       addChild(new DrawElementsBaseVertexTests                        (m_context));
+}
+
+GL45FunctionalTests::GL45FunctionalTests (Context& context)
+       : TestCaseGroup(context, "functional", "Functionality Tests")
+{
+}
+
+GL45FunctionalTests::~GL45FunctionalTests (void)
+{
+}
+
+void GL45FunctionalTests::init (void)
+{
+       addChild(new ShaderTests                                                        (m_context));
+       addChild(new ComputeTests                                                       (m_context));
+       addChild(new DrawTests                                                          (m_context));
+       addChild(new TessellationTests                                          (m_context));
+       addChild(new SSBOTests                                                          (m_context));
+       addChild(new UniformBlockTests                                          (m_context));
+       addChild(new ShaderImageLoadStoreTests                          (m_context));
+       addChild(new AtomicCounterTests                                         (m_context));
+       addChild(new StencilTexturingTests                                      (m_context));
+       addChild(new TextureTests                                                       (m_context));
+       addChild(new StateQueryTests                                            (m_context));
+       addChild(new MultisampleTests                                           (m_context));
+       addChild(new SynchronizationTests                                       (m_context));
+       addChild(new GeometryShaderTests                                        (m_context));
+       addChild(new SampleShadingTests                                         (m_context));
+       addChild(new VertexAttributeBindingTests                        (m_context));
+       addChild(new ProgramUniformTests                                        (m_context));
+       addChild(new AdvancedBlendTests                                         (m_context));
+       addChild(createCommonSeparateShaderTests                        (m_context));
        addChild(new UniformLocationTests                                       (m_context));
        addChild(new TessellationGeometryInteractionTests       (m_context));
        addChild(new DebugTests                                                         (m_context));
index aa6562b..49860e4 100644 (file)
@@ -33,17 +33,30 @@ namespace gles31
 namespace Functional
 {
 
-class FunctionalTests : public TestCaseGroup
+class GLES31FunctionalTests : public TestCaseGroup
 {
 public:
-                                               FunctionalTests         (Context& context);
-                                               ~FunctionalTests        (void);
+                                                       GLES31FunctionalTests   (Context& context);
+                                                       ~GLES31FunctionalTests  (void);
 
-       void                            init                            (void);
+       void                                    init                                    (void);
 
 private:
-                                               FunctionalTests         (const FunctionalTests& other);
-       FunctionalTests&        operator=                       (const FunctionalTests& other);
+                                                       GLES31FunctionalTests   (const GLES31FunctionalTests& other);
+       GLES31FunctionalTests&  operator=                               (const GLES31FunctionalTests& other);
+};
+
+class GL45FunctionalTests : public TestCaseGroup
+{
+public:
+                                                       GL45FunctionalTests             (Context& context);
+                                                       ~GL45FunctionalTests    (void);
+
+       void                                    init                                    (void);
+
+private:
+                                                       GL45FunctionalTests             (const GL45FunctionalTests& other);
+       GL45FunctionalTests&    operator=                               (const GL45FunctionalTests& other);
 };
 
 } // Functional
index dea33ce..87379f7 100644 (file)
@@ -1316,12 +1316,23 @@ void SeparateShaderTest::drawSurface (Surface& dst, deUint32 seed)
        Random                                  rnd                     (seed > 0 ? seed : m_rnd.getUint32());
        Rectangle                               viewport        = randomViewport(renderCtx, rnd,
                                                                                                                 VIEWPORT_SIZE, VIEWPORT_SIZE);
+       deUint32                                vao                     = 0;
+
+       if (!glu::isContextTypeES(renderCtx.getType()))
+       {
+               glGenVertexArrays(1, &vao);
+               glBindVertexArray(vao);
+       }
+
        glClearColor(0.125f, 0.25f, 0.5f, 1.f);
        setViewport(renderCtx, viewport);
        glClear(GL_COLOR_BUFFER_BIT);
        GLU_CHECK_CALL(glDrawArrays(GL_TRIANGLES, 0, 3));
        readRectangle(renderCtx, viewport, dst);
        log().writeMessage("// Drew a triangle");
+
+       if (vao)
+               glDeleteVertexArrays(1, &vao);
 }
 
 void SeparateShaderTest::testPipelineRendering (MovePtr<Pipeline>& pipeOut)
@@ -1622,7 +1633,7 @@ void describeInterpolation (const string& stage, VaryingInterpolation qual,
 
 } // anonymous
 
-TestCaseGroup* createSeparateShaderTests (Context& ctx)
+TestCaseGroup* createCommonSeparateShaderTests (Context& ctx)
 {
        TestParams              defaultParams;
        int                             numIterations   = 4;
@@ -1831,10 +1842,18 @@ TestCaseGroup* createSeparateShaderTests (Context& ctx)
                                                                 1, params, &SeparateShaderTest::testPipelineQueryActive));
        }
 
+       return group;
+}
+
+TestCaseGroup* createGLESSeparateShaderTests (Context& ctx)
+{
+       TestCaseGroup*  group = createCommonSeparateShaderTests(ctx);
+
        TestCaseGroup* interfaceMismatchGroup =
                new TestCaseGroup(ctx, "validation", "Negative program pipeline interface matching");
        group->addChild(interfaceMismatchGroup);
 
+
        {
                TestCaseGroup*                                          es31Group               = new TestCaseGroup(ctx, "es31", "GLSL ES 3.1 pipeline interface matching");
                gls::ShaderLibrary                                      shaderLibrary   (ctx.getTestContext(), ctx.getRenderContext(), ctx.getContextInfo());
@@ -1858,8 +1877,8 @@ TestCaseGroup* createSeparateShaderTests (Context& ctx)
        }
 
        return group;
-}
 
+}
 } // Functional
 } // gles31
 } // deqp
index 4dde4cc..89ff470 100644 (file)
@@ -32,7 +32,8 @@ namespace gles31
 namespace Functional
 {
 
-TestCaseGroup*         createSeparateShaderTests       (Context& context);
+TestCaseGroup*         createGLESSeparateShaderTests   (Context& context);
+TestCaseGroup*         createCommonSeparateShaderTests (Context& context);
 
 } // Functional
 } // gles31
index 00635ea..d8c30fc 100644 (file)
@@ -83,9 +83,9 @@ void TestPackage::init (void)
                }
 
                // Add main test groups
-               addChild(new InfoTests                                          (*m_context));
-               addChild(new Functional::FunctionalTests        (*m_context));
-               addChild(new Stress::StressTests                        (*m_context));
+               addChild(new InfoTests                                                  (*m_context));
+               addChild(new Functional::GLES31FunctionalTests  (*m_context));
+               addChild(new Stress::StressTests                                (*m_context));
        }
        catch (...)
        {
index 0fe3f83..72c0838 100644 (file)
@@ -74,8 +74,8 @@ void TestPackageGL45::init (void)
                }
 
                // Add main test groups
-               addChild(new InfoTests                                          (*m_context));
-               addChild(new Functional::FunctionalTests        (*m_context));
+               addChild(new InfoTests                                                  (*m_context));
+               addChild(new Functional::GL45FunctionalTests    (*m_context));
        }
        catch (...)
        {