Merge "cmake: Use FindPNG instead of find_path/find_library"
authorTreehugger Robot <treehugger-gerrit@google.com>
Fri, 3 Nov 2017 19:53:38 +0000 (19:53 +0000)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Fri, 3 Nov 2017 19:53:38 +0000 (19:53 +0000)
framework/platform/surfaceless/tcuSurfacelessPlatform.hpp
modules/egl/teglGetFrameTimestampsTests.cpp
modules/gles2/functional/es2fTextureCompletenessTests.cpp
modules/gles31/functional/es31fNegativeAdvancedBlendEquationTests.cpp
scripts/build_android_mustpass.py

index 01d703f..81978a3 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _TCU_SURFACELESS_PLATFORM_HPP
-#define _TCU_SURFACELESS_PLATFORM_HPP
+#ifndef _TCUSURFACELESSPLATFORM_HPP
+#define _TCUSURFACELESSPLATFORM_HPP
 
 /*-------------------------------------------------------------------------
  * drawElements Quality Program Tester Core
@@ -31,4 +31,4 @@ namespace tcu
 
 tcu::Platform* createPlatform (void);
 
-#endif
+#endif // _TCUSURFACELESSPLATFORM_HPP
index 536589b..d65d8d3 100644 (file)
@@ -47,6 +47,7 @@
 #include "deClock.h"
 #include "deMath.h"
 #include "deUniquePtr.hpp"
+#include "deStringUtil.hpp"
 #include "deThread.hpp"
 
 #include <algorithm>
@@ -201,59 +202,77 @@ bool timestampPending (EGLnsecsANDROID timestamp)
        return timestamp == EGL_TIMESTAMP_PENDING_ANDROID;
 }
 
+template<typename T>
+void check_lt(tcu::ResultCollector& result, const T& a, const T& b, const std::string& msg) {
+       if (a < b)
+               return;
+       std::string m = msg + "!(" + de::toString(a) + " < " + de::toString(b) + ")";
+       result.fail(m);
+}
+
+template<typename T>
+void check_le(tcu::ResultCollector& result, const T& a, const T& b, const std::string& msg) {
+       if (a <= b)
+               return;
+       std::string m = msg + "!(" + de::toString(a) + " <= " + de::toString(b) + ")";
+       result.fail(m);
+}
+
 void verifySingleFrame (const FrameTimes& frameTimes, tcu::ResultCollector& result, bool verifyReadsDone)
 {
        // Verify CPU timeline is monotonic.
-       result.check(frameTimes.swapBufferBeginNs < frameTimes.latch, "Buffer latched before it was swapped.");
-       result.check(frameTimes.latch < frameTimes.firstCompositionStart, "Buffer composited before it was latched.");
-       result.check(frameTimes.firstCompositionStart <= frameTimes.lastCompositionStart, "First composition start after last composition start.");
-       result.check(frameTimes.lastCompositionStart < frameTimes.dequeueReady, "Buffer composited after it was ready to be dequeued.");
+       check_lt(result, frameTimes.swapBufferBeginNs, frameTimes.latch, "Buffer latched before it was swapped.");
+       check_lt(result, frameTimes.latch, frameTimes.firstCompositionStart, "Buffer composited before it was latched.");
+       check_le(result, frameTimes.firstCompositionStart, frameTimes.lastCompositionStart, "First composition start after last composition start.");
+       check_lt(result, frameTimes.lastCompositionStart, frameTimes.dequeueReady, "Buffer composited after it was ready to be dequeued.");
 
        // Verify GPU timeline is monotonic.
        if (timestampValid(frameTimes.firstCompositionGpuFinished))
-               result.check(frameTimes.renderingComplete < frameTimes.firstCompositionGpuFinished, "Buffer rendering completed after compositor GPU work finished.");
+               check_lt(result, frameTimes.renderingComplete, frameTimes.firstCompositionGpuFinished, "Buffer rendering completed after compositor GPU work finished.");
 
        if (timestampValid(frameTimes.displayPresent))
-               result.check(frameTimes.renderingComplete < frameTimes.displayPresent, "Buffer displayed before rendering completed.");
+               check_lt(result, frameTimes.renderingComplete, frameTimes.displayPresent, "Buffer displayed before rendering completed.");
 
        if (timestampValid(frameTimes.firstCompositionGpuFinished) && timestampValid(frameTimes.displayPresent))
-               result.check(frameTimes.firstCompositionGpuFinished < frameTimes.displayPresent, "Buffer displayed before compositor GPU work completed");
+               check_lt(result, frameTimes.firstCompositionGpuFinished, frameTimes.displayPresent, "Buffer displayed before compositor GPU work completed");
 
        // Drivers may maintain shadow copies of the buffer, so the readsDone time
        // of the real buffer may be earlier than apparent dependencies. We can only
        // be sure that the readsDone time must be after the renderingComplete time.
+    // It may also be equal to the renderingComplete time if no reads were
+    // peformed.
        if (verifyReadsDone)
-               result.check(frameTimes.renderingComplete < frameTimes.readsDone, "Buffer rendering completed after reads completed.");
+               check_le(result, frameTimes.renderingComplete, frameTimes.readsDone, "Buffer rendering completed after reads completed.");
 
        // Verify CPU/GPU dependencies
-       result.check(frameTimes.renderingComplete < frameTimes.latch, "Buffer latched before rendering completed.");
+       check_lt(result, frameTimes.renderingComplete, frameTimes.latch, "Buffer latched before rendering completed.");
        if (timestampValid(frameTimes.firstCompositionGpuFinished))
-               result.check(frameTimes.firstCompositionStart < frameTimes.firstCompositionGpuFinished, "Composition CPU work started after GPU work finished.");
+               check_lt(result, frameTimes.firstCompositionStart, frameTimes.firstCompositionGpuFinished, "Composition CPU work started after GPU work finished.");
 
        if (timestampValid(frameTimes.displayPresent))
-               result.check(frameTimes.firstCompositionStart < frameTimes.displayPresent, "Buffer displayed before it was composited.");
+               check_lt(result, frameTimes.firstCompositionStart, frameTimes.displayPresent, "Buffer displayed before it was composited.");
 }
 
 void verifyNeighboringFrames (const FrameTimes& frame1, const FrameTimes& frame2, tcu::ResultCollector& result, bool verifyReadsDone)
 {
        // CPU timeline.
-       result.check(frame1.swapBufferBeginNs < frame2.swapBufferBeginNs, "Swap begin times not monotonic.");
-       result.check(frame1.latch < frame2.latch, "Latch times not monotonic.");
-       result.check(frame1.lastCompositionStart < frame2.latch, "Old buffer composited after new buffer latched.");
-       result.check(frame1.lastCompositionStart < frame2.firstCompositionStart, "Composition times overlap.");
-       result.check(frame1.dequeueReady < frame2.dequeueReady, "Dequeue ready times not monotonic.");
+       check_lt(result, frame1.swapBufferBeginNs, frame2.swapBufferBeginNs, "Swap begin times not monotonic.");
+       check_lt(result, frame1.latch, frame2.latch, "Latch times not monotonic.");
+       check_lt(result, frame1.lastCompositionStart, frame2.latch, "Old buffer composited after new buffer latched.");
+       check_lt(result, frame1.lastCompositionStart, frame2.firstCompositionStart, "Composition times overlap.");
+       check_lt(result, frame1.dequeueReady, frame2.dequeueReady, "Dequeue ready times not monotonic.");
 
        // GPU timeline.
-       result.check(frame1.renderingComplete < frame2.renderingComplete, "Rendering complete times not monotonic.");
+       check_lt(result, frame1.renderingComplete, frame2.renderingComplete, "Rendering complete times not monotonic.");
 
        if (timestampValid(frame1.firstCompositionGpuFinished) && timestampValid(frame2.firstCompositionGpuFinished))
-               result.check(frame1.firstCompositionGpuFinished < frame2.firstCompositionGpuFinished, "Composition GPU work complete times not monotonic.");
+               check_lt(result, frame1.firstCompositionGpuFinished, frame2.firstCompositionGpuFinished, "Composition GPU work complete times not monotonic.");
 
        if (timestampValid(frame1.displayPresent) && timestampValid(frame2.displayPresent))
-               result.check(frame1.displayPresent < frame2.displayPresent, "Display present times not monotonic.");
+               check_lt(result, frame1.displayPresent, frame2.displayPresent, "Display present times not monotonic.");
 
        if (verifyReadsDone && timestampValid(frame1.readsDone) && timestampValid(frame2.readsDone))
-               result.check(frame1.readsDone < frame2.readsDone, "Reads done times not monotonic.");
+               check_lt(result, frame1.readsDone, frame2.readsDone, "Reads done times not monotonic.");
 }
 
 EGLContext createGLES2Context (const Library& egl, EGLDisplay display, EGLConfig config)
@@ -616,14 +635,14 @@ void GetFrameTimestampTest::executeForConfig (EGLDisplay display, EGLConfig conf
                        frame.compositeToPresentLatency =       compositorTimingValues[2];
 
                        // Verify compositor timing is sane.
-                       m_result.check(1000000 < frame.compositeInterval, "Reported refresh rate greater than 1kHz.");
-                       m_result.check(frame.compositeInterval < 1000000000, "Reported refresh rate less than 1Hz.");
-                       m_result.check(0 < frame.compositeToPresentLatency, "Composite to present latency must be greater than 0.");
-                       m_result.check(frame.compositeToPresentLatency < frame.compositeInterval * 3, "Composite to present latency is more than 3 vsyncs.");
+                       check_lt<EGLnsecsANDROID>(m_result, 1000000, frame.compositeInterval, "Reported refresh rate greater than 1kHz.");
+                       check_lt<EGLnsecsANDROID>(m_result, frame.compositeInterval, 1000000000, "Reported refresh rate less than 1Hz.");
+                       check_lt<EGLnsecsANDROID>(m_result, 0, frame.compositeToPresentLatency, "Composite to present latency must be greater than 0.");
+                       check_lt(m_result, frame.compositeToPresentLatency, frame.compositeInterval * 3, "Composite to present latency is more than 3 vsyncs.");
                        const EGLnsecsANDROID minDeadline = now;
-                       m_result.check(minDeadline < frame.compositeDeadline, "Next composite deadline is in the past.");
+                       check_lt(m_result, minDeadline, frame.compositeDeadline, "Next composite deadline is in the past.");
                        const EGLnsecsANDROID maxDeadline = now + frame.compositeInterval * 2;
-                       m_result.check(frame.compositeDeadline < maxDeadline, "Next composite deadline over two intervals away.");
+                       check_lt(m_result, frame.compositeDeadline, maxDeadline, "Next composite deadline over two intervals away.");
 
                        const float colorAngle = (static_cast<float>(i) / static_cast<float>(frameCount)) * 6.28318f;
                        gl.clearColor((1.0f + deFloatSin(colorAngle)) / 2.0f, 0.7f, (1.0f + deFloatCos(colorAngle)) / 2.0f, 1.0f);
index f83fec6..c81cd94 100644 (file)
@@ -128,7 +128,7 @@ public:
        IterateResult                   iterate                                 (void);
 
 protected:
-       virtual void                    createTexture                   (void) = 0;
+       virtual void                    createTexture                   (GLuint texture) = 0;
 
        tcu::TestContext&               m_testCtx;
        glu::RenderContext&             m_renderCtx;
@@ -160,12 +160,17 @@ Tex2DCompletenessCase::IterateResult Tex2DCompletenessCase::iterate (void)
 
        glViewport                              (offsetX, offsetY, viewportWidth, viewportHeight);
 
-       createTexture                   ();
+       GLuint texture;
+       glGenTextures(1, &texture);
+       createTexture(texture);
+
        renderer.renderQuad             (0, &texCoord[0], glu::TextureTestUtil::TEXTURETYPE_2D);
        glu::readPixels                 (m_renderCtx, offsetX, offsetY, renderedFrame.getAccess());
 
        bool isOk = compareToConstantColor(log, "Result", "Image comparison result", renderedFrame, tcu::COMPARE_LOG_RESULT, m_compareColor);
 
+       glDeleteTextures(1, &texture);
+
        m_testCtx.setTestResult(isOk ? QP_TEST_RESULT_PASS      : QP_TEST_RESULT_FAIL,
                                                        isOk ? "Pass"                           : "Image comparison failed");
        return STOP;
@@ -180,7 +185,7 @@ public:
        IterateResult                   iterate                                         (void);
 
 protected:
-       virtual void                    createTexture                           (void) = 0;
+       virtual void                    createTexture                           (GLuint texture) = 0;
 
        tcu::TestContext&               m_testCtx;
        glu::RenderContext&             m_renderCtx;
@@ -209,7 +214,9 @@ TexCubeCompletenessCase::IterateResult TexCubeCompletenessCase::iterate (void)
        int                                     offsetX                 = random.getInt(0, de::max(0,m_renderCtx.getRenderTarget().getWidth()   - 64));
        int                                     offsetY                 = random.getInt(0, de::max(0,m_renderCtx.getRenderTarget().getHeight()  - 64));
 
-       createTexture();
+       GLuint texture;
+       glGenTextures(1, &texture);
+       createTexture(texture);
 
        for (int face = 0; face < tcu::CUBEFACE_LAST; face++)
        {
@@ -226,6 +233,8 @@ TexCubeCompletenessCase::IterateResult TexCubeCompletenessCase::iterate (void)
                        allFacesOk = false;
        }
 
+       glDeleteTextures(1, &texture);
+
        m_testCtx.setTestResult(allFacesOk ? QP_TEST_RESULT_PASS        : QP_TEST_RESULT_FAIL,
                                                        allFacesOk ? "Pass"                                     : "Image comparison failed");
        return STOP;
@@ -239,7 +248,7 @@ public:
                                                                Incomplete2DSizeCase    (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, IVec2 invalidLevelSize, int invalidLevelNdx, const glu::ContextInfo& ctxInfo);
                                                                ~Incomplete2DSizeCase   (void) {}
 
-       virtual void                            createTexture                   (void);
+       virtual void                            createTexture                   (GLuint texture);
 
 private:
        int                                                     m_invalidLevelNdx;
@@ -257,7 +266,7 @@ Incomplete2DSizeCase::Incomplete2DSizeCase (tcu::TestContext& testCtx, glu::Rend
 {
 }
 
-void Incomplete2DSizeCase::createTexture (void)
+void Incomplete2DSizeCase::createTexture (GLuint texture)
 {
        static const char* const s_relaxingExtensions[] =
        {
@@ -269,8 +278,6 @@ void Incomplete2DSizeCase::createTexture (void)
        tcu::TextureLevel               levelData               (fmt);
        TestLog&                                log                             = m_testCtx.getLog();
 
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_2D, texture);
 
@@ -315,7 +322,7 @@ public:
                                                        Incomplete2DFormatCase  (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, deUint32 format, deUint32 invalidFormat, int invalidLevelNdx);
                                                        ~Incomplete2DFormatCase (void) {}
 
-       virtual void                    createTexture                   (void);
+       virtual void                    createTexture                   (GLuint texture);
 
 private:
        int                                             m_invalidLevelNdx;
@@ -333,13 +340,11 @@ Incomplete2DFormatCase::Incomplete2DFormatCase (tcu::TestContext& testCtx, glu::
 {
 }
 
-void Incomplete2DFormatCase::createTexture (void)
+void Incomplete2DFormatCase::createTexture (GLuint texture)
 {
        tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(m_format, GL_UNSIGNED_BYTE);
        tcu::TextureLevel       levelData       (fmt);
 
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_2D, texture);
 
@@ -372,7 +377,7 @@ public:
                                                Incomplete2DMissingLevelCase    (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, int missingLevelNdx);
                                                ~Incomplete2DMissingLevelCase   (void) {}
 
-       virtual void            createTexture                                   (void);
+       virtual void            createTexture                                   (GLuint texture);
 
 private:
        int                                     m_missingLevelNdx;
@@ -386,13 +391,11 @@ Incomplete2DMissingLevelCase::Incomplete2DMissingLevelCase (tcu::TestContext& te
 {
 }
 
-void Incomplete2DMissingLevelCase::createTexture (void)
+void Incomplete2DMissingLevelCase::createTexture (GLuint texture)
 {
        tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
        tcu::TextureLevel       levelData       (fmt);
 
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_2D, texture);
 
@@ -425,7 +428,7 @@ public:
                                                                Incomplete2DWrapModeCase        (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, deUint32 wrapT, deUint32 wrapS, const glu::ContextInfo& ctxInfo);
                                                                ~Incomplete2DWrapModeCase       (void) {}
 
-       virtual void                            createTexture                           (void);
+       virtual void                            createTexture                           (GLuint texture);
 
 private:
        deUint32                                        m_wrapT;
@@ -443,14 +446,12 @@ Incomplete2DWrapModeCase::Incomplete2DWrapModeCase (tcu::TestContext& testCtx, g
 {
 }
 
-void Incomplete2DWrapModeCase::createTexture (void)
+void Incomplete2DWrapModeCase::createTexture (GLuint texture)
 {
        TestLog&                        log                     = m_testCtx.getLog();
        tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
        tcu::TextureLevel       levelData       (fmt);
 
-       GLuint texture;
-       glGenTextures(1, &texture);
        glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
        glBindTexture(GL_TEXTURE_2D, texture);
 
@@ -480,7 +481,7 @@ public:
                                                Complete2DExtraLevelCase        (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size);
                                                ~Complete2DExtraLevelCase       (void) {}
 
-       virtual void            createTexture                           (void);
+       virtual void            createTexture                           (GLuint texture);
 
 private:
        IVec2                           m_size;
@@ -492,13 +493,11 @@ Complete2DExtraLevelCase::Complete2DExtraLevelCase (tcu::TestContext& testCtx, g
 {
 }
 
-void Complete2DExtraLevelCase::createTexture (void)
+void Complete2DExtraLevelCase::createTexture (GLuint texture)
 {
        tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
        tcu::TextureLevel       levelData       (fmt);
 
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_2D, texture);
 
@@ -533,7 +532,7 @@ public:
                                                Incomplete2DEmptyObjectCase             (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size);
                                                ~Incomplete2DEmptyObjectCase    (void) {}
 
-       virtual void            createTexture                                   (void);
+       virtual void            createTexture                                   (GLuint texture);
 
 private:
        IVec2                           m_size;
@@ -545,10 +544,8 @@ Incomplete2DEmptyObjectCase::Incomplete2DEmptyObjectCase (tcu::TestContext& test
 {
 }
 
-void Incomplete2DEmptyObjectCase::createTexture (void)
+void Incomplete2DEmptyObjectCase::createTexture (GLuint texture)
 {
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_2D, texture);
 
@@ -569,7 +566,7 @@ public:
                                                        IncompleteCubeSizeCase  (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, IVec2 invalidLevelSize, int invalidLevelNdx, tcu::CubeFace invalidCubeFace);
                                                        ~IncompleteCubeSizeCase (void) {}
 
-       virtual void                    createTexture                   (void);
+       virtual void                    createTexture                   (GLuint texture);
 
 private:
        int                                             m_invalidLevelNdx;
@@ -596,13 +593,11 @@ IncompleteCubeSizeCase::IncompleteCubeSizeCase (tcu::TestContext& testCtx, glu::
 {
 }
 
-void IncompleteCubeSizeCase::createTexture (void)
+void IncompleteCubeSizeCase::createTexture (GLuint texture)
 {
        tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
        tcu::TextureLevel       levelData       (fmt);
 
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_CUBE_MAP, texture);
 
@@ -641,7 +636,7 @@ public:
                                                        IncompleteCubeFormatCase        (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, deUint32 format, deUint32 invalidFormat, tcu::CubeFace invalidCubeFace);
                                                        ~IncompleteCubeFormatCase       (void) {}
 
-       virtual void                    createTexture                           (void);
+       virtual void                    createTexture                           (GLuint texture);
 
 private:
        deUint32                                m_format;
@@ -668,13 +663,11 @@ IncompleteCubeFormatCase::IncompleteCubeFormatCase (tcu::TestContext& testCtx, g
 {
 }
 
-void IncompleteCubeFormatCase::createTexture (void)
+void IncompleteCubeFormatCase::createTexture (GLuint texture)
 {
        tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
        tcu::TextureLevel       levelData       (fmt);
 
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_CUBE_MAP, texture);
 
@@ -713,7 +706,7 @@ public:
                                                        IncompleteCubeMissingLevelCase  (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, int invalidLevelNdx, tcu::CubeFace invalidCubeFace);
                                                        ~IncompleteCubeMissingLevelCase (void) {}
 
-       virtual void                    createTexture                                   (void);
+       virtual void                    createTexture                                   (GLuint texture);
 
 private:
        int                                             m_invalidLevelNdx;
@@ -737,13 +730,11 @@ IncompleteCubeMissingLevelCase::IncompleteCubeMissingLevelCase (tcu::TestContext
 {
 }
 
-void IncompleteCubeMissingLevelCase::createTexture (void)
+void IncompleteCubeMissingLevelCase::createTexture (GLuint texture)
 {
        tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
        tcu::TextureLevel       levelData       (fmt);
 
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_CUBE_MAP, texture);
 
@@ -782,7 +773,7 @@ public:
                                                                IncompleteCubeWrapModeCase      (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size, deUint32 wrapT, deUint32 wrapS, const glu::ContextInfo& ctxInfo);
                                                                ~IncompleteCubeWrapModeCase     (void) {}
 
-       virtual void                            createTexture                           (void);
+       virtual void                            createTexture                           (GLuint texture);
 
 private:
        deUint32                                        m_wrapT;
@@ -800,14 +791,12 @@ IncompleteCubeWrapModeCase::IncompleteCubeWrapModeCase (tcu::TestContext& testCt
 {
 }
 
-void IncompleteCubeWrapModeCase::createTexture (void)
+void IncompleteCubeWrapModeCase::createTexture (GLuint texture)
 {
        TestLog&                        log                     = m_testCtx.getLog();
        tcu::TextureFormat      fmt                     = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
        tcu::TextureLevel       levelData       (fmt);
 
-       GLuint texture;
-       glGenTextures(1, &texture);
        glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
        glBindTexture(GL_TEXTURE_2D, texture);
 
@@ -838,7 +827,7 @@ public:
                                                CompleteCubeExtraLevelCase      (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size);
                                                ~CompleteCubeExtraLevelCase     (void) {}
 
-       virtual void            createTexture                           (void);
+       virtual void            createTexture                           (GLuint texture);
 
 private:
        IVec2                           m_size;
@@ -850,13 +839,11 @@ CompleteCubeExtraLevelCase::CompleteCubeExtraLevelCase (tcu::TestContext& testCt
 {
 }
 
-void CompleteCubeExtraLevelCase::createTexture (void)
+void CompleteCubeExtraLevelCase::createTexture (GLuint texture)
 {
        tcu::TextureFormat              fmt                             = glu::mapGLTransferFormat(GL_RGBA, GL_UNSIGNED_BYTE);
        tcu::TextureLevel               levelData               (fmt);
 
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_2D, texture);
 
@@ -894,7 +881,7 @@ public:
                                                        IncompleteCubeEmptyObjectCase   (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* description, IVec2 size);
                                                        ~IncompleteCubeEmptyObjectCase  (void) {}
 
-       virtual void                    createTexture                           (void);
+       virtual void                    createTexture                           (GLuint texture);
 
 private:
        IVec2                                   m_size;
@@ -906,10 +893,8 @@ IncompleteCubeEmptyObjectCase::IncompleteCubeEmptyObjectCase (tcu::TestContext&
 {
 }
 
-void IncompleteCubeEmptyObjectCase::createTexture (void)
+void IncompleteCubeEmptyObjectCase::createTexture (GLuint texture)
 {
-       GLuint texture;
-       glGenTextures   (1, &texture);
        glPixelStorei   (GL_UNPACK_ALIGNMENT, 1);
        glBindTexture   (GL_TEXTURE_2D, texture);
 
index 2613282..abc1f5e 100644 (file)
@@ -224,7 +224,7 @@ void attachment_advanced_equation (NegativeTestContext& ctx)
        ctx.expectError(GL_NO_ERROR);
        ctx.glCheckFramebufferStatus(GL_FRAMEBUFFER);
 
-       ctx.beginSection("GL_INVALID_OPERATION is generated if blending is enabled, advanced equations are used, and the draw buffer for other color outputs is not NONE.");
+       ctx.beginSection("GL_INVALID_OPERATION is generated if blending is enabled, advanced equations are used, and the draw buffer for other color outputs is not NONE unless NVX_blend_equation_advanced_multi_draw_buffers is supported.");
        for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(s_equations); ++ndx)
        {
                glu::ShaderProgram      program(ctx.getRenderContext(), generateProgramSources(ctx, s_equations[ndx]));
@@ -237,7 +237,10 @@ void attachment_advanced_equation (NegativeTestContext& ctx)
                ctx.expectError(GL_NO_ERROR);
                ctx.glBlendEquation(getEquation(s_equations[ndx]));
                ctx.glDrawElements(GL_TRIANGLES, 0, GL_UNSIGNED_INT, 0);
-               ctx.expectError(GL_INVALID_OPERATION);
+               if (ctx.isExtensionSupported("GL_NVX_blend_equation_advanced_multi_draw_buffers"))
+                       ctx.expectError(GL_NO_ERROR);
+               else
+                       ctx.expectError(GL_INVALID_OPERATION);
        }
        ctx.endSection();
 
index dae0b99..f63c9f6 100644 (file)
@@ -441,7 +441,7 @@ MASTER_GLES31_COMMON_FILTERS        = [
                exclude("gles31-hw-issues.txt"),
                exclude("gles31-driver-issues.txt"),
                exclude("gles31-test-issues.txt"),
-               exclude("gles31-spec-issues.txt")
+               exclude("gles31-spec-issues.txt"),
        ]
 MASTER_GLES31_PKG                              = Package(module = GLES31_MODULE, configurations = [
                # Master
@@ -501,7 +501,7 @@ MASTER_VULKAN_FILTERS                       = [
                exclude("vk-not-applicable.txt"),
                exclude("vk-excluded-tests.txt"),
                exclude("vk-test-issues.txt"),
-               exclude("vk-waivers.txt")
+               exclude("vk-waivers.txt"),
        ]
 MASTER_VULKAN_PKG                              = Package(module = VULKAN_MODULE, configurations = [
                Configuration(name                      = "master",