Exclude incremental_present scale down from Android CTS
authorChris Forbes <chrisforbes@google.com>
Wed, 4 Oct 2017 23:28:26 +0000 (23:28 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Wed, 4 Oct 2017 23:28:26 +0000 (23:28 +0000)
am: 57b62d4c43

Change-Id: Ib3ac8415985fcdd4f4c39f3238807ef8e23d4521

20 files changed:
Android.mk
OWNERS
android/cts/master/gles31-master.txt
framework/common/tcuFuzzyImageCompare.cpp
framework/delibs/cmake/CFlags.cmake
framework/platform/android/tcuAndroidMain.cpp
modules/egl/teglColorClearCase.cpp
modules/egl/teglGLES2SharedRenderingPerfTests.cpp
modules/egl/teglImageTests.cpp
modules/egl/teglMultiThreadTests.cpp
modules/egl/teglRenderTests.cpp
modules/egl/teglThreadCleanUpTests.cpp
modules/egl/teglWideColorTests.cpp
modules/gles31/functional/es31fDrawElementsBaseVertexTests.cpp
modules/gles31/functional/es31fFboSRGBWriteControlTests.cpp
modules/gles31/functional/es31fNegativeComputeTests.cpp
modules/gles31/functional/es31fNegativeVertexArrayApiTests.cpp
modules/glshared/glsBuiltinPrecisionTests.cpp
modules/glshared/glsDrawTest.cpp
modules/glshared/glsDrawTest.hpp

index 7d60924..350c51c 100644 (file)
@@ -1052,6 +1052,11 @@ LOCAL_CPPFLAGS += -Wno-non-virtual-dtor -Wno-delete-non-virtual-dtor
 LOCAL_NDK_STL_VARIANT := gnustl_static
 LOCAL_RTTI_FLAG := -frtti -fexceptions
 LOCAL_MULTILIB := both
+LOCAL_TIDY_CHECKS := \
+    -google-build-explicit-make-pair, \
+    -google-global-names-in-headers, \
+    -google-runtime-member-string-references, \
+    -google-runtime-operator, \
 
 include $(BUILD_SHARED_LIBRARY)
 
diff --git a/OWNERS b/OWNERS
index 03695dd..579961c 100644 (file)
--- a/OWNERS
+++ b/OWNERS
@@ -1,4 +1,7 @@
-phaulos@google.com
 tinazh@google.com
-misojarvi@google.com
-kraita@google.com
+chrisforbes@google.com
+
+# We miss you
+# phaulos@google.com
+# kraita@google.com
+# misojarvi@google.com
index f5c06b0..34db622 100644 (file)
@@ -16645,7 +16645,6 @@ dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_array
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_arrays_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_incomplete_primitive
@@ -16656,13 +16655,11 @@ dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_eleme
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_instanced_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_instanced_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_instanced_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_instanced_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_elements_instanced_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_range_elements
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_range_elements_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_range_elements_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_range_elements_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_range_elements_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.vertex_array.draw_range_elements_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.state.enable
 dEQP-GLES31.functional.debug.negative_coverage.callbacks.state.disable
@@ -17146,7 +17143,6 @@ dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_arrays_inva
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_arrays_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_incomplete_primitive
@@ -17157,13 +17153,11 @@ dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_in
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_instanced_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_instanced_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_instanced_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_instanced_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_elements_instanced_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_range_elements
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_range_elements_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_range_elements_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_range_elements_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_range_elements_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.draw_range_elements_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.log.state.enable
 dEQP-GLES31.functional.debug.negative_coverage.log.state.disable
@@ -17646,7 +17640,6 @@ dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_array
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_arrays_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_incomplete_primitive
@@ -17657,13 +17650,11 @@ dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_eleme
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_instanced_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_instanced_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_instanced_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_instanced_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_elements_instanced_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements_invalid_program
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements_incomplete_primitive
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements_base_vertex
-dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements_base_vertex_invalid_map
 dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.draw_range_elements_base_vertex_primitive_mode_mismatch
 dEQP-GLES31.functional.debug.negative_coverage.get_error.state.enable
 dEQP-GLES31.functional.debug.negative_coverage.get_error.state.disable
index 596ab83..4e76476 100644 (file)
@@ -318,7 +318,7 @@ float fuzzyCompare (const FuzzyCompareParams& params, const ConstPixelBufferAcce
 
        for (int y = 1; y < height-1; y++)
        {
-               for (int x = 1; x < width-1; x += params.maxSampleSkip > 0 ? (int)rnd.getInt(0, params.maxSampleSkip) : 1)
+               for (int x = 1; x < width-1; x += 1 + (int)rnd.getInt(0, params.maxSampleSkip))
                {
                        const deUint32  minDist2RefToCmp        = distSquaredToNeighbor<4>(rnd, readUnorm8<4>(refAccess, x, y), cmpAccess, x, y);
                        const deUint32  minDist2CmpToRef        = distSquaredToNeighbor<4>(rnd, readUnorm8<4>(cmpAccess, x, y), refAccess, x, y);
index 8a4b9ad..bcb11ab 100644 (file)
@@ -53,6 +53,11 @@ if (DE_COMPILER_IS_GCC OR DE_COMPILER_IS_CLANG)
        # Turn on -Wstrict-overflow=5 and check all warnings before removing
        set(CMAKE_C_FLAGS                       "${CMAKE_C_FLAGS} -fwrapv")
        set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -fwrapv")
+
+       # Force compiler to not export any symbols.
+       # Any static libraries build are linked into the standalone executable binaries.
+       set(CMAKE_C_FLAGS                       "${CMAKE_C_FLAGS} -fvisibility=hidden")
+       set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
 elseif (DE_COMPILER_IS_MSC)
        # Compiler flags for msc
 
index fa14c1e..620b9f6 100644 (file)
@@ -34,7 +34,7 @@
 
 DE_BEGIN_EXTERN_C
 
-void createTestActivity (ANativeActivity* activity, void* savedState, size_t savedStateSize)
+JNIEXPORT void JNICALL createTestActivity (ANativeActivity* activity, void* savedState, size_t savedStateSize)
 {
        DE_UNREF(savedState && savedStateSize);
        try
index 8ae8b4c..92cbd8f 100644 (file)
@@ -310,6 +310,7 @@ public:
                        // Signal completion.
                        packetIter->signal->increment();
                }
+               m_egl.releaseThread();
        }
 
 private:
index bc13aad..7d334c9 100644 (file)
@@ -717,7 +717,7 @@ void TestContext::render (void)
 class TestThread : de::Thread
 {
 public:
-                                       TestThread              (const vector<TestContext*> contexts);
+                                       TestThread              (const vector<TestContext*> contexts, const Library& egl);
                                        ~TestThread             (void);
 
        void                    start                   (void);
@@ -727,6 +727,7 @@ public:
 
 private:
        vector<TestContext*>    m_contexts;
+       const Library&                  m_egl;
        bool                                    m_isOk;
        string                                  m_errorString;
 
@@ -746,8 +747,9 @@ private:
                                        TestThread      (const TestThread&);
 };
 
-TestThread::TestThread (const vector<TestContext*> contexts)
+TestThread::TestThread (const vector<TestContext*> contexts, const Library& egl)
        : m_contexts            (contexts)
+       , m_egl                         (egl)
        , m_isOk                        (false)
        , m_errorString         ("")
        , m_beginTimeUs         (0)
@@ -800,6 +802,8 @@ void TestThread::run (void)
                m_isOk                  = false;
                m_errorString   = "Got unknown exception";
        }
+
+       m_egl.releaseThread();
 }
 
 class SharedRenderingPerfCase : public TestCase
@@ -879,7 +883,7 @@ void SharedRenderingPerfCase::deinit (void)
 namespace
 {
 
-void createThreads (vector<TestThread*>& threads, int threadCount, int perThreadContextCount, vector<TestContext*>& contexts)
+void createThreads (vector<TestThread*>& threads, int threadCount, int perThreadContextCount, vector<TestContext*>& contexts, const Library& egl)
 {
        DE_ASSERT(threadCount * perThreadContextCount == (int)contexts.size());
        DE_ASSERT(threads.empty());
@@ -891,7 +895,7 @@ void createThreads (vector<TestThread*>& threads, int threadCount, int perThread
                for (int contextNdx = 0; contextNdx < perThreadContextCount; contextNdx++)
                        threadContexts.push_back(contexts[threadNdx * perThreadContextCount + contextNdx]);
 
-               threads.push_back(new TestThread(threadContexts));
+               threads.push_back(new TestThread(threadContexts, egl));
 
                threadContexts.clear();
        }
@@ -1036,7 +1040,7 @@ TestCase::IterateResult SharedRenderingPerfCase::iterate (void)
        if (m_results.empty())
                logTestConfig(m_testCtx.getLog(), m_config);
 
-       createThreads(threads, m_config.threadCount, m_config.perThreadContextCount, m_contexts);
+       createThreads(threads, m_config.threadCount, m_config.perThreadContextCount, m_contexts, m_eglTestCtx.getLibrary());
 
        beginTimeUs = deGetMicroseconds();
 
index aa1b666..fd01af3 100644 (file)
@@ -194,6 +194,15 @@ public:
 
        IterateResult iterate (void)
        {
+               const Library& egl = m_eglTestCtx.getLibrary();
+
+               if (eglu::getVersion(egl, m_display) < eglu::Version(1, 5) &&
+                       !eglu::hasExtension(egl, m_display, "EGL_KHR_image") &&
+                       !eglu::hasExtension(egl, m_display, "EGL_KHR_image_base"))
+               {
+                       TCU_THROW(NotSupportedError, "EGLimages not supported");
+               }
+
 #define CHECK_CREATE(MSG, DPY, CONTEXT, SOURCE, ERR) checkCreate(MSG, DPY, #DPY, CONTEXT, #CONTEXT, SOURCE, #SOURCE, ERR)
                CHECK_CREATE("Testing bad display (-1)...", (EGLDisplay)-1, EGL_NO_CONTEXT, EGL_NONE, EGL_BAD_DISPLAY);
                CHECK_CREATE("Testing bad context (-1)...", m_display, (EGLContext)-1, EGL_NONE, EGL_BAD_CONTEXT);
index 21952a9..9a98245 100644 (file)
@@ -110,9 +110,6 @@ public:
                THREADSTATUS_NOT_STARTED = 0,
                THREADSTATUS_RUNNING,
                THREADSTATUS_READY,
-
-               THREADSTATUS_NOT_SUPPORTED,
-               THREADSTATUS_ERROR
        };
 
                                        TestThread      (MultiThreadedTest& test, int id);
@@ -149,18 +146,20 @@ public:
 
        virtual bool                    runThread                       (TestThread& thread) = 0;
        virtual IterateResult   iterate                         (void);
-       bool                                    execTest                        (TestThread& thread);
+       void                                    execTest                        (TestThread& thread);
 
        const Library&                  getLibrary                      (void) const { return m_eglTestCtx.getLibrary(); }
 
 protected:
-       void                                    barrier                         (TestThread& thread);
+       void                                    barrier                         (void);
 
 private:
        int                                             m_threadCount;
        bool                                    m_initialized;
        deUint64                                m_startTimeUs;
        const deUint64                  m_timeoutUs;
+       bool                                    m_ok;
+       bool                                    m_supported;
        vector<TestThread*>             m_threads;
 
        volatile deInt32                m_barrierWaiters;
@@ -189,10 +188,7 @@ void TestThread::run (void)
 
        try
        {
-               if (m_test.execTest(*this))
-                       m_status = THREADSTATUS_READY;
-               else
-                       m_status = THREADSTATUS_ERROR;
+               m_test.execTest(*this);
        }
        catch (const TestThread::TestStop&)
        {
@@ -210,15 +206,17 @@ void TestThread::run (void)
        {
                getLog() << ThreadLog::BeginMessage << "Unknown exception" << ThreadLog::EndMessage;
        }
+
+       getLibrary().releaseThread();
+       m_status = THREADSTATUS_READY;
 }
 
-bool MultiThreadedTest::execTest (TestThread& thread)
+void MultiThreadedTest::execTest (TestThread& thread)
 {
-       bool isOk = false;
-
        try
        {
-               isOk = runThread(thread);
+               if (!runThread(thread))
+                       m_ok = false;
        }
        catch (const TestThread::TestStop&)
        {
@@ -227,9 +225,7 @@ bool MultiThreadedTest::execTest (TestThread& thread)
        }
        catch (const tcu::NotSupportedError&)
        {
-               // Set status of each thread
-               for (int threadNdx = 0; threadNdx < (int)m_threads.size(); threadNdx++)
-                       m_threads[threadNdx]->setStatus(TestThread::THREADSTATUS_NOT_SUPPORTED);
+               m_supported = false;
 
                // Release barriers
                for (int threadNdx = 0; threadNdx < (int)m_threads.size(); threadNdx++)
@@ -242,9 +238,7 @@ bool MultiThreadedTest::execTest (TestThread& thread)
        }
        catch(...)
        {
-               // Set status of each thread
-               for (int threadNdx = 0; threadNdx < (int)m_threads.size(); threadNdx++)
-                       m_threads[threadNdx]->setStatus(TestThread::THREADSTATUS_ERROR);
+               m_ok = false;
 
                // Release barriers
                for (int threadNdx = 0; threadNdx < (int)m_threads.size(); threadNdx++)
@@ -255,8 +249,6 @@ bool MultiThreadedTest::execTest (TestThread& thread)
 
                throw;
        }
-
-       return isOk;
 }
 
 MultiThreadedTest::MultiThreadedTest (EglTestContext& eglTestCtx, const char* name, const char* description, int threadCount, deUint64 timeoutUs)
@@ -265,7 +257,8 @@ MultiThreadedTest::MultiThreadedTest (EglTestContext& eglTestCtx, const char* na
        , m_initialized                 (false)
        , m_startTimeUs                 (0)
        , m_timeoutUs                   (timeoutUs)
-
+       , m_ok                                  (true)
+       , m_supported                   (true)
        , m_barrierWaiters              (0)
        , m_barrierSemaphore1   (0, 0)
        , m_barrierSemaphore2   (1, 0)
@@ -295,7 +288,7 @@ void MultiThreadedTest::deinit (void)
        }
 }
 
-void MultiThreadedTest::barrier (TestThread& thread)
+void MultiThreadedTest::barrier (void)
 {
        {
                const deInt32 waiters = deAtomicIncrement32(&m_barrierWaiters);
@@ -328,7 +321,7 @@ void MultiThreadedTest::barrier (TestThread& thread)
        }
 
        // Barrier was released due an error in other thread
-       if (thread.getStatus() != TestThread::THREADSTATUS_RUNNING)
+       if (!m_ok || !m_supported)
                throw TestThread::TestStop();
 }
 
@@ -338,6 +331,9 @@ TestCase::IterateResult MultiThreadedTest::iterate (void)
        {
                m_testCtx.getLog() << tcu::TestLog::Message << "Thread timeout limit: " << m_timeoutUs << "us" << tcu::TestLog::EndMessage;
 
+               m_ok = true;
+               m_supported = true;
+
                // Create threads
                m_threads.reserve(m_threadCount);
 
@@ -366,18 +362,6 @@ TestCase::IterateResult MultiThreadedTest::iterate (void)
                for (int threadNdx = 0; threadNdx < (int)m_threads.size(); threadNdx++)
                        m_threads[threadNdx]->join();
 
-               bool isOk                       = true;
-               bool notSupported       = false;
-
-               for (int threadNdx = 0; threadNdx < (int)m_threads.size(); threadNdx++)
-               {
-                       if (m_threads[threadNdx]->getStatus() == TestThread::THREADSTATUS_ERROR)
-                               isOk = false;
-
-                       if (m_threads[threadNdx]->getStatus() == TestThread::THREADSTATUS_NOT_SUPPORTED)
-                               notSupported = true;
-               }
-
                // Get logs
                {
                        vector<int> messageNdx;
@@ -417,9 +401,9 @@ TestCase::IterateResult MultiThreadedTest::iterate (void)
                m_threads.clear();
 
                // Set result
-               if (isOk)
+               if (m_ok)
                {
-                       if (notSupported)
+                       if (!m_supported)
                                m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "Not Supported");
                        else
                                m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
@@ -553,7 +537,7 @@ bool MultiThreadedConfigTest::runThread (TestThread& thread)
        de::Random                      rnd             (deInt32Hash(thread.getId() + 10435));
        vector<EGLConfig>       configs;
 
-       barrier(thread);
+       barrier();
 
        for (int getConfigsNdx = 0; getConfigsNdx < m_getConfigs; getConfigsNdx++)
        {
@@ -942,7 +926,7 @@ bool MultiThreadedObjectTest::runThread (TestThread& thread)
                        TCU_THROW(NotSupportedError, "No usable config found");
        }
 
-       barrier(thread);
+       barrier();
 
        // Create / Destroy Objects
        if ((m_types & TYPE_SINGLE_WINDOW) != 0 && (m_types & TYPE_PBUFFER) == 0 && (m_types & TYPE_PIXMAP) == 0 && (m_types & TYPE_CONTEXT) == 0)
@@ -957,30 +941,30 @@ bool MultiThreadedObjectTest::runThread (TestThread& thread)
        if (thread.getId() == 0)
                pushObjectsToShared(thread);
 
-       barrier(thread);
+       barrier();
 
        // Push second threads objects to shared
        if (thread.getId() == 1)
                pushObjectsToShared(thread);
 
-       barrier(thread);
+       barrier();
 
        // Make queries from shared surfaces
        querySetSharedObjects(thread, 100);
 
-       barrier(thread);
+       barrier();
 
        // Pull surfaces for first thread from shared surfaces
        if (thread.getId() == 0)
                pullObjectsFromShared(thread, (int)(m_sharedPbuffers.size()/2), (int)(m_sharedNativePixmaps.size()/2), (int)(m_sharedNativeWindows.size()/2), (int)(m_sharedContexts.size()/2));
 
-       barrier(thread);
+       barrier();
 
        // Pull surfaces for second thread from shared surfaces
        if (thread.getId() == 1)
                pullObjectsFromShared(thread, (int)m_sharedPbuffers.size(), (int)m_sharedNativePixmaps.size(), (int)m_sharedNativeWindows.size(), (int)m_sharedContexts.size());
 
-       barrier(thread);
+       barrier();
 
        // Create / Destroy Objects
        if ((m_types & TYPE_SINGLE_WINDOW) == 0)
index 8b5b5c2..46b1780 100644 (file)
@@ -356,6 +356,37 @@ tcu::TextureFormat getColorFormat (const tcu::PixelFormat& colorBits)
 #undef PACK_FMT
 }
 
+/*
+The getColorThreshold function is used to obtain a
+threshold usable for the fuzzyCompare function.
+
+For 8bit color depths a value of 0.02 should provide
+a good metric for rejecting images above this level.
+For other bit depths other thresholds should be selected.
+Ideally this function would take advantage of the
+getColorThreshold function provided by the PixelFormat class
+as this would also allow setting per channel thresholds.
+However using the PixelFormat provided function can result
+in too strict thresholds for 8bit bit depths (compared to
+the current default of 0.02) or too relaxed for lower bit
+depths if scaled proportionally to the 8bit default.
+*/
+
+float getColorThreshold (const tcu::PixelFormat& colorBits)
+{
+       if ((colorBits.redBits > 0 && colorBits.redBits < 8) ||
+               (colorBits.greenBits > 0 && colorBits.greenBits < 8) ||
+               (colorBits.blueBits > 0 && colorBits.blueBits < 8) ||
+               (colorBits.alphaBits > 0 && colorBits.alphaBits < 8))
+       {
+               return 0.05f;
+       }
+       else
+       {
+               return 0.02f;
+       }
+}
+
 tcu::TextureFormat getDepthFormat (const int depthBits)
 {
        switch (depthBits)
@@ -699,9 +730,9 @@ void SingleThreadRenderCase::executeForContexts (EGLDisplay display, EGLSurface
        const int                               numContexts     = (int)contexts.size();
        const int                               drawsPerCtx     = 2;
        const int                               numIters        = 2;
-       const float                             threshold       = 0.02f;
-
        const tcu::PixelFormat  pixelFmt        = getPixelFormat(egl, display, config.config);
+       const float                             threshold       = getColorThreshold(pixelFmt);
+
        const int                               depthBits       = eglu::getConfigAttribInt(egl, display, config.config, EGL_DEPTH_SIZE);
        const int                               stencilBits     = eglu::getConfigAttribInt(egl, display, config.config, EGL_STENCIL_SIZE);
        const int                               numSamples      = eglu::getConfigAttribInt(egl, display, config.config, EGL_SAMPLES);
@@ -868,6 +899,7 @@ public:
                        // Signal completion.
                        packetIter->signal->increment();
                }
+               m_egl.releaseThread();
        }
 
 private:
@@ -902,9 +934,9 @@ void MultiThreadRenderCase::executeForContexts (EGLDisplay display, EGLSurface s
        const int                               packetsPerThread        = 2;
        const int                               numThreads                      = numContexts;
        const int                               numPackets                      = numThreads * packetsPerThread;
-       const float                             threshold                       = 0.02f;
-
        const tcu::PixelFormat  pixelFmt                        = getPixelFormat(egl, display, config.config);
+       const float                             threshold                       = getColorThreshold(pixelFmt);
+
        const int                               depthBits                       = eglu::getConfigAttribInt(egl, display, config.config, EGL_DEPTH_SIZE);
        const int                               stencilBits                     = eglu::getConfigAttribInt(egl, display, config.config, EGL_STENCIL_SIZE);
        const int                               numSamples                      = eglu::getConfigAttribInt(egl, display, config.config, EGL_SAMPLES);
index ffe3913..a3f64cb 100644 (file)
@@ -120,6 +120,8 @@ public:
                {
                        m_error = error;
                }
+
+               m_egl.releaseThread();
        }
 
 private:
index 20d4fff..31afd28 100644 (file)
@@ -406,7 +406,7 @@ void WideColorTest::checkFP16Support (void)
        if (numConfigs <= 0)
        {
                log << tcu::TestLog::Message << "No configs returned." << tcu::TestLog::EndMessage;
-               TCU_THROW(NotSupportedError, "10:10:10:2 pixel format is not supported");
+               TCU_THROW(NotSupportedError, "16:16:16:16 pixel format is not supported");
        }
 
        log << tcu::TestLog::Message << numConfigs << " configs returned" << tcu::TestLog::EndMessage;
index 11764c1..7b68587 100644 (file)
@@ -218,6 +218,14 @@ VertexIDCase::~VertexIDCase (void)
 
 void VertexIDCase::init (void)
 {
+       if (m_method == deqp::gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_BASEVERTEX ||
+               m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED_BASEVERTEX ||
+               m_method == gls::DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED_BASEVERTEX)
+       {
+               const bool supportsES32 = contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2));
+               TCU_CHECK_AND_THROW(NotSupportedError, supportsES32 || m_context.getContextInfo().isExtensionSupported("GL_EXT_draw_elements_base_vertex"), "GL_EXT_draw_elements_base_vertex is not supported.");
+       }
+
        m_testCtx.getLog()      << TestLog::Message
                                                << "gl_VertexID should be the index of the vertex that is being passed to the shader. i.e. indices[i] + basevertex"
                                                << TestLog::EndMessage;
index b4ebcac..5cbdb0c 100644 (file)
@@ -1509,8 +1509,8 @@ FboSRGBQueryCase::~FboSRGBQueryCase (void)
 void FboSRGBQueryCase::init (void)
 {
        // extension requirements for test
-       if (!glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) && !m_context.getContextInfo().isExtensionSupported("GL_EXT_sRGB_write_control"))
-               TCU_THROW(NotSupportedError, "Test requires extension GL_EXT_sRGB_write_control or a context version equal or higher than 3.2");
+       if (!m_context.getContextInfo().isExtensionSupported("GL_EXT_sRGB_write_control"))
+               TCU_THROW(NotSupportedError, "Test requires extension GL_EXT_sRGB_write_control");
 }
 
 void FboSRGBQueryCase::deinit (void)
@@ -1797,8 +1797,8 @@ FboSRGBUnsupportedEnumCase::~FboSRGBUnsupportedEnumCase (void)
 void FboSRGBUnsupportedEnumCase::init (void)
 {
        // extension requirements for test
-       if (glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::es(3, 2)) || m_context.getContextInfo().isExtensionSupported("GL_EXT_sRGB_write_control"))
-               TCU_THROW(NotSupportedError, "Test requires extension GL_EXT_sRGB_write_control to be unsupported and a context version less than 3.2");
+       if (m_context.getContextInfo().isExtensionSupported("GL_EXT_sRGB_write_control"))
+               TCU_THROW(NotSupportedError, "Test requires extension GL_EXT_sRGB_write_control to be unsupported");
 }
 
 void FboSRGBUnsupportedEnumCase::deinit (void)
index eb2e0ec..813a56a 100644 (file)
@@ -646,7 +646,7 @@ void invalid_maximum_work_group_sizes (NegativeTestContext& ctx)
        ctx.glGetIntegerv(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, &maxWorkGroupInvocations);
        ctx.expectError(GL_NO_ERROR);
 
-       DE_ASSERT((maxWorkGroupSizeX * maxWorkGroupSizeY * maxWorkGroupSizeZ) > maxWorkGroupInvocations );
+       DE_ASSERT(((deInt64) maxWorkGroupSizeX * maxWorkGroupSizeY * maxWorkGroupSizeZ) > maxWorkGroupInvocations );
 
        const bool                              isES32                  = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
        const char* const               shaderVersion   = isES32
index 56340d9..1ed5f2d 100644 (file)
@@ -701,24 +701,6 @@ void draw_elements_base_vertex (NegativeTestContext& ctx)
        ctx.endSection();
 }
 
-void draw_elements_base_vertex_invalid_map (NegativeTestContext& ctx)
-{
-       GLuint  buf = 0;
-       GLfloat vertices[1];
-
-       ctx.beginSection("GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.");
-       ctx.glGenBuffers(1, &buf);
-       ctx.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buf);
-       ctx.glBufferData(GL_ELEMENT_ARRAY_BUFFER, 10, 0, GL_STATIC_DRAW);
-       ctx.glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, 5, GL_MAP_READ_BIT);
-       ctx.expectError(GL_NO_ERROR);
-       ctx.glDrawElementsBaseVertex(GL_POINTS, 1, GL_UNSIGNED_INT, vertices, 1);
-       ctx.expectError(GL_INVALID_OPERATION);
-       ctx.glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
-       ctx.glDeleteBuffers(1, &buf);
-       ctx.endSection();
-}
-
 void draw_elements_base_vertex_primitive_mode_mismatch (NegativeTestContext& ctx)
 {
        TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
@@ -1085,25 +1067,6 @@ void draw_elements_instanced_base_vertex (NegativeTestContext& ctx)
        ctx.glUseProgram(0);
 }
 
-void draw_elements_instanced_base_vertex_invalid_map (NegativeTestContext& ctx)
-{
-       GLfloat                                         vertices[1];
-       GLuint                                          buf             = 0;
-
-       ctx.beginSection("GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.");
-       ctx.glGenBuffers(1, &buf);
-       ctx.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buf);
-       ctx.glBufferData(GL_ELEMENT_ARRAY_BUFFER, 10, 0, GL_STATIC_DRAW);
-       ctx.glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, 5, GL_MAP_READ_BIT);
-       ctx.expectError(GL_NO_ERROR);
-       ctx.glDrawElementsInstancedBaseVertex(GL_POINTS, 1, GL_UNSIGNED_INT, vertices, 1, 1);
-       ctx.expectError(GL_INVALID_OPERATION);
-       ctx.glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
-       ctx.glDeleteBuffers(1, &buf);
-       ctx.endSection();
-
-}
-
 void draw_elements_instanced_base_vertex_primitive_mode_mismatch (NegativeTestContext& ctx)
 {
        TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
@@ -1371,24 +1334,6 @@ void draw_range_elements_base_vertex (NegativeTestContext& ctx)
        ctx.glUseProgram(0);
 }
 
-void draw_range_elements_base_vertex_invalid_map (NegativeTestContext& ctx)
-{
-       GLuint  buf             = 0;
-       GLfloat vertices[1];
-
-       ctx.beginSection("GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.");
-       ctx.glGenBuffers(1, &buf);
-       ctx.glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buf);
-       ctx.glBufferData(GL_ELEMENT_ARRAY_BUFFER, 10, 0, GL_STATIC_DRAW);
-       ctx.glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, 5, GL_MAP_READ_BIT);
-       ctx.expectError(GL_NO_ERROR);
-       ctx.glDrawRangeElementsBaseVertex(GL_POINTS, 0, 1, 1, GL_UNSIGNED_INT, vertices, 1);
-       ctx.expectError(GL_INVALID_OPERATION);
-       ctx.glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
-       ctx.glDeleteBuffers(1, &buf);
-       ctx.endSection();
-}
-
 void draw_range_elements_base_vertex_primitive_mode_mismatch (NegativeTestContext& ctx)
 {
        TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)), "This test requires a 3.2 context or higher context version.");
@@ -1430,7 +1375,6 @@ std::vector<FunctionContainer> getNegativeVertexArrayApiTestFunctions ()
                {draw_arrays_incomplete_primitive,                                                              "draw_arrays_incomplete_primitive",                                                             "Invalid glDrawArrays() usage"                                          },
                {draw_elements,                                                                                                 "draw_elements",                                                                                                "Invalid glDrawElements() usage"                                        },
                {draw_elements_base_vertex,                                                                             "draw_elements_base_vertex",                                                                    "Invalid glDrawElementsBaseVertex() usage"                      },
-               {draw_elements_base_vertex_invalid_map,                                                 "draw_elements_base_vertex_invalid_map" ,                                               "Invalid glDrawElementsBaseVertex() usage"                      },
                {draw_elements_base_vertex_primitive_mode_mismatch,                             "draw_elements_base_vertex_primitive_mode_mismatch",                    "Invalid glDrawElementsBaseVertex() usage"                      },
                {draw_elements_invalid_program,                                                                 "draw_elements_invalid_program",                                                                "Invalid glDrawElements() usage"                                        },
                {draw_elements_incomplete_primitive,                                                    "draw_elements_incomplete_primitive",                                                   "Invalid glDrawElements() usage"                                        },
@@ -1441,13 +1385,11 @@ std::vector<FunctionContainer> getNegativeVertexArrayApiTestFunctions ()
                {draw_elements_instanced_invalid_program,                                               "draw_elements_instanced_invalid_program",                                              "Invalid glDrawElementsInstanced() usage"                       },
                {draw_elements_instanced_incomplete_primitive,                                  "draw_elements_instanced_incomplete_primitive",                                 "Invalid glDrawElementsInstanced() usage"                       },
                {draw_elements_instanced_base_vertex,                                                   "draw_elements_instanced_base_vertex",                                                  "Invalid glDrawElementsInstancedBaseVertex() usage"     },
-               {draw_elements_instanced_base_vertex_invalid_map,                               "draw_elements_instanced_base_vertex_invalid_map",                              "Invalid glDrawElementsInstancedBaseVertex() usage"     },
                {draw_elements_instanced_base_vertex_primitive_mode_mismatch,   "draw_elements_instanced_base_vertex_primitive_mode_mismatch",  "Invalid glDrawElementsInstancedBaseVertex() usage"     },
                {draw_range_elements,                                                                                   "draw_range_elements",                                                                                  "Invalid glDrawRangeElements() usage"                           },
                {draw_range_elements_invalid_program,                                                   "draw_range_elements_invalid_program",                                                  "Invalid glDrawRangeElements() usage"                           },
                {draw_range_elements_incomplete_primitive,                                              "draw_range_elements_incomplete_primitive",                                             "Invalid glDrawRangeElements() usage"                           },
                {draw_range_elements_base_vertex,                                                               "draw_range_elements_base_vertex",                                                              "Invalid glDrawRangeElementsBaseVertex() usage"         },
-               {draw_range_elements_base_vertex_invalid_map,                                   "draw_range_elements_base_vertex_invalid_map",                                  "Invalid glDrawRangeElementsBaseVertex() usage"         },
                {draw_range_elements_base_vertex_primitive_mode_mismatch,               "draw_range_elements_base_vertex_primitive_mode_mismatch",              "Invalid glDrawRangeElementsBaseVertex() usage"         },
        };
 
index da69f89..afe990b 100644 (file)
@@ -2924,12 +2924,32 @@ public:
 protected:
        ExprP<float>    doExpand        (ExpandContext&, const ArgExprs& args) const
        {
-               ExprP<float> val = args.a[0] * args.b[0];
+               ExprP<float> op[Size];
+               // Precompute all products.
+               for (int ndx = 0; ndx < Size; ++ndx)
+                       op[ndx] = args.a[ndx] * args.b[ndx];
 
-               for (int ndx = 1; ndx < Size; ++ndx)
-                       val = val + args.a[ndx] * args.b[ndx];
+               int idx[Size];
+               //Prepare an array of indices.
+               for (int ndx = 0; ndx < Size; ++ndx)
+                       idx[ndx] = ndx;
 
-               return val;
+               ExprP<float> res = op[0];
+               // Compute the first dot alternative: SUM(a[i]*b[i]), i = 0 .. Size-1
+               for (int ndx = 1; ndx < Size; ++ndx)
+                       res = res + op[ndx];
+
+               // Generate all permutations of indices and
+               // using a permutation compute a dot alternative.
+               // Generates all possible variants fo summation of products in the dot product expansion expression.
+               do {
+                       ExprP<float> alt = constant(0.0f);
+                       for (int ndx = 0; ndx < Size; ++ndx)
+                               alt = alt + op[idx[ndx]];
+                       res = alternatives(res, alt);
+               } while (std::next_permutation(idx, idx + Size));
+
+               return res;
        }
 };
 
index 155bd35..d4f10c2 100644 (file)
@@ -43,6 +43,7 @@
 #include "tcuFloat.hpp"
 #include "tcuTextureUtil.hpp"
 
+#include "gluContextInfo.hpp"
 #include "gluPixelTransfer.hpp"
 #include "gluCallLogWrapper.hpp"
 
@@ -3034,6 +3035,7 @@ static bool containsLineCases (const std::vector<DrawTestSpec>& m_specs)
 DrawTest::DrawTest (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const DrawTestSpec& spec, const char* name, const char* desc)
        : TestCase                      (testCtx, name, desc)
        , m_renderCtx           (renderCtx)
+       , m_contextInfo         (DE_NULL)
        , m_refBuffers          (DE_NULL)
        , m_refContext          (DE_NULL)
        , m_glesContext         (DE_NULL)
@@ -3051,6 +3053,7 @@ DrawTest::DrawTest (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, co
 DrawTest::DrawTest (tcu::TestContext& testCtx, glu::RenderContext& renderCtx, const char* name, const char* desc)
        : TestCase                      (testCtx, name, desc)
        , m_renderCtx           (renderCtx)
+       , m_contextInfo         (DE_NULL)
        , m_refBuffers          (DE_NULL)
        , m_refContext          (DE_NULL)
        , m_glesContext         (DE_NULL)
@@ -3130,6 +3133,7 @@ void DrawTest::init (void)
        m_maxDiffRed    = deCeilFloatToInt32(256.0f * (6.0f / (float)(1 << m_renderCtx.getRenderTarget().getPixelFormat().redBits)));
        m_maxDiffGreen  = deCeilFloatToInt32(256.0f * (6.0f / (float)(1 << m_renderCtx.getRenderTarget().getPixelFormat().greenBits)));
        m_maxDiffBlue   = deCeilFloatToInt32(256.0f * (6.0f / (float)(1 << m_renderCtx.getRenderTarget().getPixelFormat().blueBits)));
+       m_contextInfo   = glu::ContextInfo::create(m_renderCtx);
 }
 
 void DrawTest::deinit (void)
@@ -3139,21 +3143,32 @@ void DrawTest::deinit (void)
        delete m_refBuffers;
        delete m_refContext;
        delete m_glesContext;
+       delete m_contextInfo;
 
        m_glArrayPack   = DE_NULL;
        m_rrArrayPack   = DE_NULL;
        m_refBuffers    = DE_NULL;
        m_refContext    = DE_NULL;
        m_glesContext   = DE_NULL;
+       m_contextInfo   = DE_NULL;
 }
 
 DrawTest::IterateResult DrawTest::iterate (void)
 {
        const int                                       specNdx                 = (m_iteration / 2);
+       const DrawTestSpec&                     spec                    = m_specs[specNdx];
+
+       if (spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_BASEVERTEX ||
+               spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_INSTANCED_BASEVERTEX ||
+               spec.drawMethod == DrawTestSpec::DRAWMETHOD_DRAWELEMENTS_RANGED_BASEVERTEX)
+       {
+               const bool supportsES32 = contextSupports(m_renderCtx.getType(), glu::ApiType::es(3, 2));
+               TCU_CHECK_AND_THROW(NotSupportedError, supportsES32 || m_contextInfo->isExtensionSupported("GL_EXT_draw_elements_base_vertex"), "GL_EXT_draw_elements_base_vertex is not supported.");
+       }
+
        const bool                                      drawStep                = (m_iteration % 2) == 0;
        const bool                                      compareStep             = (m_iteration % 2) == 1;
        const IterateResult                     iterateResult   = ((size_t)m_iteration + 1 == m_specs.size()*2) ? (STOP) : (CONTINUE);
-       const DrawTestSpec&                     spec                    = m_specs[specNdx];
        const bool                                      updateProgram   = (m_iteration == 0) || (drawStep && !checkSpecsShaderCompatible(m_specs[specNdx], m_specs[specNdx-1])); // try to use the same shader in all iterations
        IterationLogSectionEmitter      sectionEmitter  (m_testCtx.getLog(), specNdx, m_specs.size(), m_iteration_descriptions[specNdx], drawStep && m_specs.size()!=1);
 
index 5347269..8c04ef5 100644 (file)
 #include "tcuResultCollector.hpp"
 #include "gluRenderContext.hpp"
 
+namespace glu
+{
+class ContextInfo;
+}
+
 namespace sglr
 {
 
@@ -259,6 +264,7 @@ private:
 
        glu::RenderContext&                             m_renderCtx;
 
+       glu::ContextInfo*                               m_contextInfo;
        sglr::ReferenceContextBuffers*  m_refBuffers;
        sglr::ReferenceContext*                 m_refContext;
        sglr::Context*                                  m_glesContext;