Add tests for KHR_parallel_shader_compile
authorShannon Woods <skws@google.com>
Thu, 27 Apr 2017 21:13:36 +0000 (17:13 -0400)
committerAlexander Galazin <alexander.galazin@arm.com>
Fri, 21 Jul 2017 17:56:55 +0000 (19:56 +0200)
Reuses the ARB_parallel_shader_compile tests for KHR.

Components: OpenGL

VK-GL-CTS issue: 303

Affects:
KHR-GLES3.parallel_shader_compile.*
KHR-GL45.parallel_shader_compile.*

Change-Id: I3d6a8735861afa4cfe26340a6570b9dd730b4173

21 files changed:
external/openglcts/data/mustpass/gl/khronos_mustpass/4.5.5.x/gl45-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.4.x/gles3-khr-master.txt
external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles3-khr-master.txt
external/openglcts/modules/common/CMakeLists.txt
external/openglcts/modules/common/glcParallelShaderCompileTests.cpp [moved from external/openglcts/modules/gl/gl4cParallelShaderCompileTests.cpp with 61% similarity]
external/openglcts/modules/common/glcParallelShaderCompileTests.hpp [moved from external/openglcts/modules/gl/gl4cParallelShaderCompileTests.hpp with 86% similarity]
external/openglcts/modules/gl/CMakeLists.txt
external/openglcts/modules/gl/gl4cTestPackages.cpp
external/openglcts/modules/gles3/es3cTestPackage.cpp
framework/opengl/gluCallLogWrapper.inl
framework/opengl/gluCallLogWrapperApi.inl
framework/opengl/wrapper/glwApi.inl
framework/opengl/wrapper/glwEnums.inl
framework/opengl/wrapper/glwFunctionTypes.inl
framework/opengl/wrapper/glwFunctions.inl
framework/opengl/wrapper/glwImpl.inl
framework/opengl/wrapper/glwInitExtES.inl
framework/opengl/wrapper/glwInitExtGL.inl
framework/platform/null/tcuNullRenderContextFuncs.inl
framework/platform/null/tcuNullRenderContextInitFuncs.inl
scripts/opengl/src_util.py

index 748839c..4fb25b1 100644 (file)
@@ -4753,10 +4753,10 @@ KHR-GL45.conditional_render_inverted.coverage
 KHR-GL45.conditional_render_inverted.functional
 KHR-GL45.sync.flush_commands
 KHR-GL45.incomplete_texture_access.sampler
-KHR-GL45.parallel_shader_compile.SimpleQueriesTest
-KHR-GL45.parallel_shader_compile.MaxShaderCompileThreadsTest
-KHR-GL45.parallel_shader_compile.CompilationCompletionNonParallelTest
-KHR-GL45.parallel_shader_compile.CompilationCompletionParallelTest
+KHR-GL45.parallel_shader_compile.simple_queries
+KHR-GL45.parallel_shader_compile.max_shader_compile_threads
+KHR-GL45.parallel_shader_compile.compilation_completion_non_parallel
+KHR-GL45.parallel_shader_compile.compilation_completion_parallel
 KHR-GL45.post_depth_coverage_tests.PostDepthShader
 KHR-GL45.post_depth_coverage_tests.PostDepthSampleMask
 KHR-GL45.sparse_texture2_tests.ShaderExtension
index 4b043de..bfbdf60 100644 (file)
@@ -2573,3 +2573,7 @@ KHR-GLES3.shaders.negative.constant_sequence
 KHR-GLES3.texture_filter_anisotropic.queries
 KHR-GLES3.texture_filter_anisotropic.drawing
 KHR-GLES3.exposed_extensions.validate_extensions
+KHR-GLES3.parallel_shader_compile.simple_queries
+KHR-GLES3.parallel_shader_compile.max_shader_compile_threads
+KHR-GLES3.parallel_shader_compile.compilation_completion_non_parallel
+KHR-GLES3.parallel_shader_compile.compilation_completion_parallel
index 4b043de..bfbdf60 100644 (file)
@@ -2573,3 +2573,7 @@ KHR-GLES3.shaders.negative.constant_sequence
 KHR-GLES3.texture_filter_anisotropic.queries
 KHR-GLES3.texture_filter_anisotropic.drawing
 KHR-GLES3.exposed_extensions.validate_extensions
+KHR-GLES3.parallel_shader_compile.simple_queries
+KHR-GLES3.parallel_shader_compile.max_shader_compile_threads
+KHR-GLES3.parallel_shader_compile.compilation_completion_non_parallel
+KHR-GLES3.parallel_shader_compile.compilation_completion_parallel
index c1a2636..cc39ac1 100644 (file)
@@ -34,6 +34,8 @@ set(GLCTS_COMMON_SRCS
        glcRobustnessTests.hpp
        glcPolygonOffsetClampTests.cpp
        glcPolygonOffsetClampTests.hpp
+       glcParallelShaderCompileTests.cpp
+       glcParallelShaderCompileTests.hpp
        glcRobustBufferAccessBehaviorTests.cpp
        glcRobustBufferAccessBehaviorTests.hpp
        glcShaderIndexingTests.cpp
@@ -2,7 +2,7 @@
  * OpenGL Conformance Test Suite
  * -----------------------------
  *
- * Copyright (c) 2016 The Khronos Group Inc.
+ * Copyright (c) 2016-2017 The Khronos Group Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 /**
  */ /*!
- * \file  gl4cParallelShaderCompileTests.cpp
- * \brief Conformance tests for the GL_ARB_parallel_shader_compile functionality.
+ * \file  glcParallelShaderCompileTests.cpp
+ * \brief Conformance tests for the GL_KHR_parallel_shader_compile functionality.
  */ /*-------------------------------------------------------------------*/
 
-#include "gl4cParallelShaderCompileTests.hpp"
+#include "glcParallelShaderCompileTests.hpp"
 #include "deClock.h"
 #include "gluContextInfo.hpp"
 #include "gluDefs.hpp"
 using namespace glu;
 using namespace glw;
 
-namespace gl4cts
+namespace glcts
 {
 
-static const char* vShader = "#version 450\n"
-                                                        "\n"
+static const char* shaderVersionES = "#version 300 es\n";
+static const char* shaderVersionGL = "#version 450\n";
+static const char* vShader                = "\n"
                                                         "in vec3 vertex;\n"
                                                         "\n"
                                                         "int main() {\n"
                                                         "    gl_Position = vec4(vertex, 1);\n"
                                                         "}\n";
 
-static const char* fShader = "#version 450\n"
-                                                        "\n"
+static const char* fShader = "\n"
                                                         "out ver4 fragColor;\n"
                                                         "\n"
                                                         "int main() {\n"
@@ -65,8 +65,8 @@ static const char* fShader = "#version 450\n"
  *  @param description Test description
  */
 SimpleQueriesTest::SimpleQueriesTest(deqp::Context& context)
-       : TestCase(context, "SimpleQueriesTest",
-                          "Tests verifies if simple queries works as expected for MAX_SHADER_COMPILER_THREADS_ARB <pname>")
+       : TestCase(context, "simple_queries",
+                          "Tests verifies if simple queries works as expected for MAX_SHADER_COMPILER_THREADS_KHR <pname>")
 {
        /* Left blank intentionally */
 }
@@ -77,13 +77,19 @@ SimpleQueriesTest::SimpleQueriesTest(deqp::Context& context)
  */
 tcu::TestNode::IterateResult SimpleQueriesTest::iterate()
 {
-       if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_parallel_shader_compile"))
+       const glu::ContextInfo& contextInfo             = m_context.getContextInfo();
+       const glu::ContextType& contextType             = m_context.getRenderContext().getType();
+       const bool                              isGL                    = glu::isContextTypeGLCore(contextType);
+       const bool                              supportParallel = (isGL && contextInfo.isExtensionSupported("GL_ARB_parallel_shader_compile")) ||
+                                                                                               contextInfo.isExtensionSupported("GL_KHR_parallel_shader_compile");
+
+       if (!supportParallel)
        {
                m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "Not supported");
                return STOP;
        }
 
-       const Functions& gl = m_context.getRenderContext().getFunctions();
+       const Functions&                gl                       = m_context.getRenderContext().getFunctions();
 
        GLboolean boolValue;
        GLint    intValue;
@@ -91,30 +97,48 @@ tcu::TestNode::IterateResult SimpleQueriesTest::iterate()
        GLfloat   floatValue;
        GLdouble  doubleValue;
 
-       gl.getBooleanv(GL_MAX_SHADER_COMPILER_THREADS_ARB, &boolValue);
+       bool supportsInt64  = isGL || glu::contextSupports(contextType, glu::ApiType::es(3, 0));
+       bool supportsDouble = isGL;
+
+       gl.getBooleanv(GL_MAX_SHADER_COMPILER_THREADS_KHR, &boolValue);
        GLU_EXPECT_NO_ERROR(gl.getError(), "getBooleanv");
 
-       gl.getIntegerv(GL_MAX_SHADER_COMPILER_THREADS_ARB, &intValue);
+       gl.getIntegerv(GL_MAX_SHADER_COMPILER_THREADS_KHR, &intValue);
        GLU_EXPECT_NO_ERROR(gl.getError(), "getIntegerv");
 
-       gl.getInteger64v(GL_MAX_SHADER_COMPILER_THREADS_ARB, &int64Value);
-       GLU_EXPECT_NO_ERROR(gl.getError(), "getInteger64v");
+       if (supportsInt64)
+       {
+               gl.getInteger64v(GL_MAX_SHADER_COMPILER_THREADS_KHR, &int64Value);
+               GLU_EXPECT_NO_ERROR(gl.getError(), "getInteger64v");
+       }
 
-       gl.getFloatv(GL_MAX_SHADER_COMPILER_THREADS_ARB, &floatValue);
+       gl.getFloatv(GL_MAX_SHADER_COMPILER_THREADS_KHR, &floatValue);
        GLU_EXPECT_NO_ERROR(gl.getError(), "getFloatv");
 
-       gl.getDoublev(GL_MAX_SHADER_COMPILER_THREADS_ARB, &doubleValue);
-       GLU_EXPECT_NO_ERROR(gl.getError(), "getDoublev");
+       if (supportsDouble)
+       {
+               gl.getDoublev(GL_MAX_SHADER_COMPILER_THREADS_KHR, &doubleValue);
+               GLU_EXPECT_NO_ERROR(gl.getError(), "getDoublev");
+       }
 
-       if (boolValue != (intValue != 0) || intValue != (GLint)int64Value || intValue != (GLint)floatValue ||
-               intValue != (GLint)doubleValue)
+       if (boolValue != (intValue != 0) || intValue != (GLint)floatValue ||
+               (supportsInt64 && intValue != (GLint)int64Value) || (supportsDouble && intValue != (GLint)doubleValue))
        {
-               m_testCtx.getLog() << tcu::TestLog::Message << "Simple queries returned different values: "
-                                                  << "bool(" << (int)boolValue << "), "
-                                                  << "int(" << intValue << "), "
-                                                  << "int64(" << int64Value << "), "
-                                                  << "float(" << floatValue << "), "
-                                                  << "double(" << doubleValue << ")" << tcu::TestLog::EndMessage;
+               tcu::MessageBuilder message = m_testCtx.getLog() << tcu::TestLog::Message;
+
+               message << "Simple queries returned different values: "
+                               << "bool(" << (int)boolValue << "), "
+                               << "int(" << intValue << "), ";
+
+               if (supportsInt64)
+                       message << "int64(" << int64Value << "), ";
+
+               message << "float(" << floatValue << ")";
+
+               if (supportsDouble)
+                       message << ", double(" << doubleValue << ")";
+
+               message << tcu::TestLog::EndMessage;
 
                m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
                return STOP;
@@ -131,8 +155,8 @@ tcu::TestNode::IterateResult SimpleQueriesTest::iterate()
  *  @param description Test description
  */
 MaxShaderCompileThreadsTest::MaxShaderCompileThreadsTest(deqp::Context& context)
-       : TestCase(context, "MaxShaderCompileThreadsTest",
-                          "Tests verifies if MaxShaderCompileThreadsARB function works as expected")
+       : TestCase(context, "max_shader_compile_threads",
+                          "Tests verifies if MaxShaderCompileThreadsKHR function works as expected")
 {
        /* Left blank intentionally */
 }
@@ -143,7 +167,13 @@ MaxShaderCompileThreadsTest::MaxShaderCompileThreadsTest(deqp::Context& context)
  */
 tcu::TestNode::IterateResult MaxShaderCompileThreadsTest::iterate()
 {
-       if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_parallel_shader_compile"))
+       const glu::ContextInfo& contextInfo             = m_context.getContextInfo();
+       const glu::ContextType& contextType             = m_context.getRenderContext().getType();
+       const bool                              isGL                    = glu::isContextTypeGLCore(contextType);
+       const bool                              supportParallel = (isGL && contextInfo.isExtensionSupported("GL_ARB_parallel_shader_compile")) ||
+                                                                                               contextInfo.isExtensionSupported("GL_KHR_parallel_shader_compile");
+
+       if (!supportParallel)
        {
                m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "Not supported");
                return STOP;
@@ -153,10 +183,10 @@ tcu::TestNode::IterateResult MaxShaderCompileThreadsTest::iterate()
 
        GLint intValue;
 
-       gl.maxShaderCompilerThreadsARB(0);
-       GLU_EXPECT_NO_ERROR(gl.getError(), "maxShaderCompilerThreadsARB");
+       gl.maxShaderCompilerThreadsKHR(0);
+       GLU_EXPECT_NO_ERROR(gl.getError(), "maxShaderCompilerThreadsKHR");
 
-       gl.getIntegerv(GL_MAX_SHADER_COMPILER_THREADS_ARB, &intValue);
+       gl.getIntegerv(GL_MAX_SHADER_COMPILER_THREADS_KHR, &intValue);
        GLU_EXPECT_NO_ERROR(gl.getError(), "getIntegerv");
 
        if (intValue != 0)
@@ -165,10 +195,10 @@ tcu::TestNode::IterateResult MaxShaderCompileThreadsTest::iterate()
                return STOP;
        }
 
-       gl.maxShaderCompilerThreadsARB(0xFFFFFFFF);
-       GLU_EXPECT_NO_ERROR(gl.getError(), "maxShaderCompilerThreadsARB");
+       gl.maxShaderCompilerThreadsKHR(0xFFFFFFFF);
+       GLU_EXPECT_NO_ERROR(gl.getError(), "maxShaderCompilerThreadsKHR");
 
-       gl.getIntegerv(GL_MAX_SHADER_COMPILER_THREADS_ARB, &intValue);
+       gl.getIntegerv(GL_MAX_SHADER_COMPILER_THREADS_KHR, &intValue);
        GLU_EXPECT_NO_ERROR(gl.getError(), "getIntegerv");
 
        if (intValue != GLint(0xFFFFFFFF))
@@ -188,7 +218,7 @@ tcu::TestNode::IterateResult MaxShaderCompileThreadsTest::iterate()
  *  @param description Test description
  */
 CompilationCompletionNonParallelTest::CompilationCompletionNonParallelTest(deqp::Context& context)
-       : TestCase(context, "CompilationCompletionNonParallelTest",
+       : TestCase(context, "compilation_completion_non_parallel",
                           "Tests verifies if shader COMPLETION_STATUS query works as expected for non parallel compilation")
 {
        /* Left blank intentionally */
@@ -200,7 +230,13 @@ CompilationCompletionNonParallelTest::CompilationCompletionNonParallelTest(deqp:
  */
 tcu::TestNode::IterateResult CompilationCompletionNonParallelTest::iterate()
 {
-       if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_parallel_shader_compile"))
+       const glu::ContextInfo& contextInfo             = m_context.getContextInfo();
+       const glu::ContextType& contextType             = m_context.getRenderContext().getType();
+       const bool                              isGL                    = glu::isContextTypeGLCore(contextType);
+       const bool                              supportParallel = (isGL && contextInfo.isExtensionSupported("GL_ARB_parallel_shader_compile")) ||
+                                                                                               contextInfo.isExtensionSupported("GL_KHR_parallel_shader_compile");
+
+       if (!supportParallel)
        {
                m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "Not supported");
                return STOP;
@@ -210,28 +246,31 @@ tcu::TestNode::IterateResult CompilationCompletionNonParallelTest::iterate()
 
        GLint completionStatus;
 
-       gl.maxShaderCompilerThreadsARB(0);
-       GLU_EXPECT_NO_ERROR(gl.getError(), "maxShaderCompilerThreadsARB");
+       gl.maxShaderCompilerThreadsKHR(0);
+       GLU_EXPECT_NO_ERROR(gl.getError(), "maxShaderCompilerThreadsKHR");
 
        {
                Program program(gl);
                Shader  vertexShader(gl, SHADERTYPE_VERTEX);
                Shader  fragmentShader(gl, SHADERTYPE_FRAGMENT);
 
-               const char* vSources[] = { vShader };
-               const int   vLengths[] = { int(strlen(vShader)) };
-               vertexShader.setSources(1, vSources, vLengths);
+               bool            isContextES   = (glu::isContextTypeES(m_context.getRenderContext().getType()));
+               const char* shaderVersion = isContextES ? shaderVersionES : shaderVersionGL;
+
+               const char* vSources[] = { shaderVersion, vShader };
+               const int   vLengths[] = { int(strlen(shaderVersion)), int(strlen(vShader)) };
+               vertexShader.setSources(2, vSources, vLengths);
 
-               const char* fSources[] = { fShader };
-               const int   fLengths[] = { int(strlen(fShader)) };
-               fragmentShader.setSources(1, fSources, fLengths);
+               const char* fSources[] = { shaderVersion, fShader };
+               const int   fLengths[] = { int(strlen(shaderVersion)), int(strlen(fShader)) };
+               fragmentShader.setSources(2, fSources, fLengths);
 
                gl.compileShader(vertexShader.getShader());
                GLU_EXPECT_NO_ERROR(gl.getError(), "compileShader");
                gl.compileShader(fragmentShader.getShader());
                GLU_EXPECT_NO_ERROR(gl.getError(), "compileShader");
 
-               gl.getShaderiv(fragmentShader.getShader(), GL_COMPLETION_STATUS_ARB, &completionStatus);
+               gl.getShaderiv(fragmentShader.getShader(), GL_COMPLETION_STATUS_KHR, &completionStatus);
                GLU_EXPECT_NO_ERROR(gl.getError(), "getShaderiv");
                if (!completionStatus)
                {
@@ -244,7 +283,7 @@ tcu::TestNode::IterateResult CompilationCompletionNonParallelTest::iterate()
                program.attachShader(fragmentShader.getShader());
                gl.linkProgram(program.getProgram());
 
-               gl.getProgramiv(program.getProgram(), GL_COMPLETION_STATUS_ARB, &completionStatus);
+               gl.getProgramiv(program.getProgram(), GL_COMPLETION_STATUS_KHR, &completionStatus);
                GLU_EXPECT_NO_ERROR(gl.getError(), "getProgramiv");
                if (!completionStatus)
                {
@@ -265,7 +304,7 @@ tcu::TestNode::IterateResult CompilationCompletionNonParallelTest::iterate()
  *  @param description Test description
  */
 CompilationCompletionParallelTest::CompilationCompletionParallelTest(deqp::Context& context)
-       : TestCase(context, "CompilationCompletionParallelTest",
+       : TestCase(context, "compilation_completion_parallel",
                           "Tests verifies if shader COMPLETION_STATUS query works as expected for parallel compilation")
 {
        /* Left blank intentionally */
@@ -277,7 +316,13 @@ CompilationCompletionParallelTest::CompilationCompletionParallelTest(deqp::Conte
  */
 tcu::TestNode::IterateResult CompilationCompletionParallelTest::iterate()
 {
-       if (!m_context.getContextInfo().isExtensionSupported("GL_ARB_parallel_shader_compile"))
+       const glu::ContextInfo& contextInfo             = m_context.getContextInfo();
+       const glu::ContextType& contextType             = m_context.getRenderContext().getType();
+       const bool                              isGL                    = glu::isContextTypeGLCore(contextType);
+       const bool                              supportParallel = (isGL && contextInfo.isExtensionSupported("GL_ARB_parallel_shader_compile")) ||
+                                                                                               contextInfo.isExtensionSupported("GL_KHR_parallel_shader_compile");
+
+       if (!supportParallel)
        {
                m_testCtx.setTestResult(QP_TEST_RESULT_NOT_SUPPORTED, "Not supported");
                return STOP;
@@ -287,30 +332,33 @@ tcu::TestNode::IterateResult CompilationCompletionParallelTest::iterate()
 
        GLint completionStatus;
 
-       gl.maxShaderCompilerThreadsARB(8);
-       GLU_EXPECT_NO_ERROR(gl.getError(), "maxShaderCompilerThreadsARB");
+       gl.maxShaderCompilerThreadsKHR(8);
+       GLU_EXPECT_NO_ERROR(gl.getError(), "maxShaderCompilerThreadsKHR");
 
        {
                Shader   vertexShader(gl, SHADERTYPE_VERTEX);
                deUint32 fragmentShader[8];
                deUint32 program[8];
 
+               bool            isContextES   = (glu::isContextTypeES(m_context.getRenderContext().getType()));
+               const char* shaderVersion = isContextES ? shaderVersionES : shaderVersionGL;
+
                for (int i = 0; i < 8; ++i)
                {
                        fragmentShader[i] = gl.createShader(GL_FRAGMENT_SHADER);
                        program[i]                = gl.createProgram();
                }
 
-               const char* vSources[] = { vShader };
-               const int   vLengths[] = { int(strlen(vShader)) };
-               vertexShader.setSources(1, vSources, vLengths);
+               const char* vSources[] = { shaderVersion, vShader };
+               const int   vLengths[] = { int(strlen(shaderVersion)), int(strlen(vShader)) };
+               vertexShader.setSources(2, vSources, vLengths);
 
                //Compilation test
                for (int i = 0; i < 8; ++i)
                {
-                       const char* fSources[] = { fShader };
-                       const int   fLengths[] = { int(strlen(fShader)) };
-                       gl.shaderSource(fragmentShader[i], 1, fSources, fLengths);
+                       const char* fSources[] = { shaderVersion, fShader };
+                       const int   fLengths[] = { int(strlen(shaderVersion)), int(strlen(fShader)) };
+                       gl.shaderSource(fragmentShader[i], 2, fSources, fLengths);
                }
 
                gl.compileShader(vertexShader.getShader());
@@ -329,7 +377,7 @@ tcu::TestNode::IterateResult CompilationCompletionParallelTest::iterate()
                                completion = 0;
                                for (int i = 0; i < 8; ++i)
                                {
-                                       gl.getShaderiv(fragmentShader[i], GL_COMPLETION_STATUS_ARB, &completionStatus);
+                                       gl.getShaderiv(fragmentShader[i], GL_COMPLETION_STATUS_KHR, &completionStatus);
                                        GLU_EXPECT_NO_ERROR(gl.getError(), "getShaderiv");
                                        if (completionStatus)
                                                completion++;
@@ -371,7 +419,7 @@ tcu::TestNode::IterateResult CompilationCompletionParallelTest::iterate()
                                completion = 0;
                                for (int i = 0; i < 8; ++i)
                                {
-                                       gl.getProgramiv(program[i], GL_COMPLETION_STATUS_ARB, &completionStatus);
+                                       gl.getProgramiv(program[i], GL_COMPLETION_STATUS_KHR, &completionStatus);
                                        GLU_EXPECT_NO_ERROR(gl.getError(), "getProgramiv");
                                        if (completionStatus)
                                                completion++;
@@ -401,7 +449,7 @@ tcu::TestNode::IterateResult CompilationCompletionParallelTest::iterate()
  */
 ParallelShaderCompileTests::ParallelShaderCompileTests(deqp::Context& context)
        : TestCaseGroup(context, "parallel_shader_compile",
-                                       "Verify conformance of CTS_ARB_parallel_shader_compile implementation")
+                                       "Verify conformance of KHR_parallel_shader_compile implementation")
 {
 }
 
@@ -414,4 +462,4 @@ void ParallelShaderCompileTests::init()
        addChild(new CompilationCompletionParallelTest(m_context));
 }
 
-} /* gl4cts namespace */
+} /* glcts namespace */
@@ -1,10 +1,10 @@
-#ifndef _GL4CPARALLELSHADERCOMPILETESTS_HPP
-#define _GL4CPARALLELSHADERCOMPILETESTS_HPP
+#ifndef _GLCPARALLELSHADERCOMPILETESTS_HPP
+#define _GLCPARALLELSHADERCOMPILETESTS_HPP
 /*-------------------------------------------------------------------------
  * OpenGL Conformance Test Suite
  * -----------------------------
  *
- * Copyright (c) 2016 The Khronos Group Inc.
+ * Copyright (c) 2016-2017 The Khronos Group Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 /**
  */ /*!
- * \file  gl4cParallelShaderCompileTests.hpp
- * \brief Conformance tests for the GL_ARB_parallel_shader_compile functionality.
+ * \file  glcParallelShaderCompileTests.hpp
+ * \brief Conformance tests for the GL_KHR_parallel_shader_compile functionality.
  */ /*-------------------------------------------------------------------*/
 #include "glcTestCase.hpp"
 #include "glwDefs.hpp"
 #include "tcuDefs.hpp"
 #include <vector>
 
-namespace gl4cts
+namespace glcts
 {
 
 /** Test verifies if GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev
- *  queries for MAX_SHADER_COMPILER_THREADS_ARB <pname> returns the same value.
+ *  queries for MAX_SHADER_COMPILER_THREADS_KHR <pname> returns the same value.
  **/
 class SimpleQueriesTest : public deqp::TestCase
 {
@@ -52,7 +52,7 @@ private:
        /* Private members */
 };
 
-/** Test verifies if MaxShaderCompilerThreadsARB function works as expected
+/** Test verifies if MaxShaderCompilerThreadsKHR function works as expected
  **/
 class MaxShaderCompileThreadsTest : public deqp::TestCase
 {
@@ -115,4 +115,4 @@ private:
 
 } /* glcts namespace */
 
-#endif // _GL4CPARALLELSHADERCOMPILETESTS_HPP
+#endif // _GLCPARALLELSHADERCOMPILETESTS_HPP
index 7e80250..21d4682 100644 (file)
@@ -118,8 +118,6 @@ set(GLCTS_GL_SRCS
        gl4cSparseTextureClampTests.hpp
        gl4cSpirvExtensionsTests.cpp
        gl4cSpirvExtensionsTests.hpp
-       gl4cParallelShaderCompileTests.cpp
-       gl4cParallelShaderCompileTests.hpp
        gl4cPostDepthCoverageTests.cpp
        gl4cPostDepthCoverageTests.hpp
        gl4cIndirectParametersTests.cpp
index 67404c6..f3bc44a 100644 (file)
@@ -41,7 +41,6 @@
 #include "gl4cLimitsTests.hpp"
 #include "gl4cMapBufferAlignmentTests.hpp"
 #include "gl4cMultiBindTests.hpp"
-#include "gl4cParallelShaderCompileTests.hpp"
 #include "gl4cPostDepthCoverageTests.hpp"
 #include "gl4cProgramInterfaceQueryTests.hpp"
 #include "gl4cShaderAtomicCounterOpsTests.hpp"
@@ -73,6 +72,7 @@
 #include "glcExposedExtensionsTests.hpp"
 #include "glcInfoTests.hpp"
 #include "glcPolygonOffsetClampTests.hpp"
+#include "glcParallelShaderCompileTests.hpp"
 #include "glcRobustBufferAccessBehaviorTests.hpp"
 #include "glcSampleVariablesTests.hpp"
 #include "glcShaderIntegerMixTests.hpp"
@@ -356,7 +356,7 @@ void GL45TestPackage::init(void)
                addChild(new gl4cts::ConditionalRenderInverted::Tests(getContext()));
                addChild(new gl4cts::Sync::Tests(getContext()));
                addChild(new gl4cts::IncompleteTextureAccess::Tests(getContext()));
-               addChild(new gl4cts::ParallelShaderCompileTests(getContext()));
+               addChild(new glcts::ParallelShaderCompileTests(getContext()));
                addChild(new gl4cts::PostDepthCoverage(getContext()));
                addChild(new gl4cts::SparseTexture2Tests(getContext()));
                addChild(new gl4cts::SparseTextureClampTests(getContext()));
index cc3dd71..ac3ba26 100644 (file)
@@ -26,6 +26,7 @@
 #include "glcExposedExtensionsTests.hpp"
 #include "glcFragDepthTests.hpp"
 #include "glcInfoTests.hpp"
+#include "glcParallelShaderCompileTests.hpp"
 #include "glcShaderIndexingTests.hpp"
 #include "glcShaderIntegerMixTests.hpp"
 #include "glcShaderLibrary.hpp"
@@ -157,6 +158,7 @@ void ES30TestPackage::init(void)
                addChild(new ShaderTests(getContext()));
                addChild(new glcts::TextureFilterAnisotropicTests(getContext()));
                addChild(new glcts::ExposedExtensionsTests(getContext()));
+               addChild(new glcts::ParallelShaderCompileTests(getContext()));
        }
        catch (...)
        {
index b431d3e..1404db2 100644 (file)
@@ -3396,11 +3396,11 @@ void CallLogWrapper::glMatrixTranslatefEXT (glw::GLenum mode, glw::GLfloat x, gl
        m_gl.matrixTranslatefEXT(mode, x, y, z);
 }
 
-void CallLogWrapper::glMaxShaderCompilerThreadsARB (glw::GLuint count)
+void CallLogWrapper::glMaxShaderCompilerThreadsKHR (glw::GLuint count)
 {
        if (m_enableLog)
-               m_log << TestLog::Message << "glMaxShaderCompilerThreadsARB(" << count << ");" << TestLog::EndMessage;
-       m_gl.maxShaderCompilerThreadsARB(count);
+               m_log << TestLog::Message << "glMaxShaderCompilerThreadsKHR(" << count << ");" << TestLog::EndMessage;
+       m_gl.maxShaderCompilerThreadsKHR(count);
 }
 
 void CallLogWrapper::glMemoryBarrier (glw::GLbitfield barriers)
index d206cf1..dd02a2f 100644 (file)
@@ -454,7 +454,7 @@ void                                        glMatrixScaledEXT                                                                       (glw::GLenum mode, glw::GLdouble x, glw::GLdo
 void                                   glMatrixScalefEXT                                                                       (glw::GLenum mode, glw::GLfloat x, glw::GLfloat y, glw::GLfloat z);
 void                                   glMatrixTranslatedEXT                                                           (glw::GLenum mode, glw::GLdouble x, glw::GLdouble y, glw::GLdouble z);
 void                                   glMatrixTranslatefEXT                                                           (glw::GLenum mode, glw::GLfloat x, glw::GLfloat y, glw::GLfloat z);
-void                                   glMaxShaderCompilerThreadsARB                                           (glw::GLuint count);
+void                                   glMaxShaderCompilerThreadsKHR                                           (glw::GLuint count);
 void                                   glMemoryBarrier                                                                         (glw::GLbitfield barriers);
 void                                   glMemoryBarrierByRegion                                                         (glw::GLbitfield barriers);
 void                                   glMinSampleShading                                                                      (glw::GLfloat value);
index 01b76ee..84eaafe 100644 (file)
 #define                        glMatrixScalefEXT                                                                       glwMatrixScalefEXT
 #define                        glMatrixTranslatedEXT                                                           glwMatrixTranslatedEXT
 #define                        glMatrixTranslatefEXT                                                           glwMatrixTranslatefEXT
-#define                        glMaxShaderCompilerThreadsARB                                           glwMaxShaderCompilerThreadsARB
+#define                        glMaxShaderCompilerThreadsKHR                                           glwMaxShaderCompilerThreadsKHR
 #define                        glMemoryBarrier                                                                         glwMemoryBarrier
 #define                        glMemoryBarrierByRegion                                                         glwMemoryBarrierByRegion
 #define                        glMinSampleShading                                                                      glwMinSampleShading
@@ -1337,7 +1337,7 @@ void                      glwMatrixScaledEXT                                                                      (GLenum mode, GLdouble x, GLdouble y, GLdouble
 void                   glwMatrixScalefEXT                                                                      (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
 void                   glwMatrixTranslatedEXT                                                          (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
 void                   glwMatrixTranslatefEXT                                                          (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-void                   glwMaxShaderCompilerThreadsARB                                          (GLuint count);
+void                   glwMaxShaderCompilerThreadsKHR                                          (GLuint count);
 void                   glwMemoryBarrier                                                                        (GLbitfield barriers);
 void                   glwMemoryBarrierByRegion                                                        (GLbitfield barriers);
 void                   glwMinSampleShading                                                                     (GLfloat value);
index d04c56b..5eb93a9 100644 (file)
 #define GL_NUM_VIRTUAL_PAGE_SIZES_ARB                                                                  0x91A8
 #define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB                                  0x91A9
 #define GL_NUM_SPARSE_LEVELS_ARB                                                                               0x91AA
+#define GL_MAX_SHADER_COMPILER_THREADS_KHR                                                             0x91B0
 #define GL_MAX_SHADER_COMPILER_THREADS_ARB                                                             0x91B0
+#define GL_COMPLETION_STATUS_KHR                                                                               0x91B1
 #define GL_COMPLETION_STATUS_ARB                                                                               0x91B1
 #define GL_COMPUTE_SHADER                                                                                              0x91B9
 #define GL_MAX_COMPUTE_UNIFORM_BLOCKS                                                                  0x91BB
index 4748254..90f198f 100644 (file)
@@ -454,7 +454,7 @@ typedef GLW_APICALL void                    (GLW_APIENTRY* glMatrixScaledEXTFunc)                                                                   (GLenum
 typedef GLW_APICALL void                       (GLW_APIENTRY* glMatrixScalefEXTFunc)                                                                   (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
 typedef GLW_APICALL void                       (GLW_APIENTRY* glMatrixTranslatedEXTFunc)                                                               (GLenum mode, GLdouble x, GLdouble y, GLdouble z);
 typedef GLW_APICALL void                       (GLW_APIENTRY* glMatrixTranslatefEXTFunc)                                                               (GLenum mode, GLfloat x, GLfloat y, GLfloat z);
-typedef GLW_APICALL void                       (GLW_APIENTRY* glMaxShaderCompilerThreadsARBFunc)                                               (GLuint count);
+typedef GLW_APICALL void                       (GLW_APIENTRY* glMaxShaderCompilerThreadsKHRFunc)                                               (GLuint count);
 typedef GLW_APICALL void                       (GLW_APIENTRY* glMemoryBarrierFunc)                                                                             (GLbitfield barriers);
 typedef GLW_APICALL void                       (GLW_APIENTRY* glMemoryBarrierByRegionFunc)                                                             (GLbitfield barriers);
 typedef GLW_APICALL void                       (GLW_APIENTRY* glMinSampleShadingFunc)                                                                  (GLfloat value);
index 37c3daa..447a77f 100644 (file)
@@ -454,7 +454,7 @@ glMatrixScaledEXTFunc                                                                       matrixScaledEXT;
 glMatrixScalefEXTFunc                                                                  matrixScalefEXT;
 glMatrixTranslatedEXTFunc                                                              matrixTranslatedEXT;
 glMatrixTranslatefEXTFunc                                                              matrixTranslatefEXT;
-glMaxShaderCompilerThreadsARBFunc                                              maxShaderCompilerThreadsARB;
+glMaxShaderCompilerThreadsKHRFunc                                              maxShaderCompilerThreadsKHR;
 glMemoryBarrierFunc                                                                            memoryBarrier;
 glMemoryBarrierByRegionFunc                                                            memoryBarrierByRegion;
 glMinSampleShadingFunc                                                                 minSampleShading;
index e636909..446d552 100644 (file)
@@ -3612,12 +3612,12 @@ void glwMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z)
        gl->matrixTranslatefEXT(mode, x, y, z);
 }
 
-void glwMaxShaderCompilerThreadsARB (GLuint count)
+void glwMaxShaderCompilerThreadsKHR (GLuint count)
 {
        const glw::Functions* gl = glw::getCurrentThreadFunctions();
        if (!gl)
                return;
-       gl->maxShaderCompilerThreadsARB(count);
+       gl->maxShaderCompilerThreadsKHR(count);
 }
 
 void glwMemoryBarrier (GLbitfield barriers)
index f1d3497..fad8dc8 100644 (file)
@@ -33,6 +33,11 @@ if (de::contains(extSet, "GL_KHR_robustness"))
        gl->readnPixels                         = (glReadnPixelsFunc)                           loader->get("glReadnPixelsKHR");
 }
 
+if (de::contains(extSet, "GL_KHR_parallel_shader_compile"))
+{
+       gl->maxShaderCompilerThreadsKHR = (glMaxShaderCompilerThreadsKHRFunc)   loader->get("glMaxShaderCompilerThreadsKHR");
+}
+
 if (de::contains(extSet, "GL_EXT_tessellation_shader"))
 {
        gl->patchParameteri     = (glPatchParameteriFunc)       loader->get("glPatchParameteriEXT");
index b766a48..b6eee47 100644 (file)
@@ -32,6 +32,11 @@ if (de::contains(extSet, "GL_KHR_robustness"))
        gl->readnPixels                         = (glReadnPixelsFunc)                           loader->get("glReadnPixels");
 }
 
+if (de::contains(extSet, "GL_KHR_parallel_shader_compile"))
+{
+       gl->maxShaderCompilerThreadsKHR = (glMaxShaderCompilerThreadsKHRFunc)   loader->get("glMaxShaderCompilerThreadsKHR");
+}
+
 if (de::contains(extSet, "GL_EXT_direct_state_access"))
 {
        gl->bindMultiTextureEXT                                                         = (glBindMultiTextureEXTFunc)                                                           loader->get("glBindMultiTextureEXT");
@@ -724,7 +729,7 @@ if (de::contains(extSet, "GL_ARB_multi_draw_indirect"))
 
 if (de::contains(extSet, "GL_ARB_parallel_shader_compile"))
 {
-       gl->maxShaderCompilerThreadsARB = (glMaxShaderCompilerThreadsARBFunc)   loader->get("glMaxShaderCompilerThreadsARB");
+       gl->maxShaderCompilerThreadsKHR = (glMaxShaderCompilerThreadsKHRFunc)   loader->get("glMaxShaderCompilerThreadsARB");
 }
 
 if (de::contains(extSet, "GL_ARB_program_interface_query"))
index af78eb8..dc62ce4 100644 (file)
@@ -3789,7 +3789,7 @@ GLW_APICALL void GLW_APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLf
 
 }
 
-GLW_APICALL void GLW_APIENTRY glMaxShaderCompilerThreadsARB (GLuint count)
+GLW_APICALL void GLW_APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count)
 {
        DE_UNREF(count);
 
index 90e984a..0adb8dd 100644 (file)
@@ -454,7 +454,7 @@ gl->matrixScaledEXT                                                                 = glMatrixScaledEXT;
 gl->matrixScalefEXT                                                                    = glMatrixScalefEXT;
 gl->matrixTranslatedEXT                                                                = glMatrixTranslatedEXT;
 gl->matrixTranslatefEXT                                                                = glMatrixTranslatefEXT;
-gl->maxShaderCompilerThreadsARB                                                = glMaxShaderCompilerThreadsARB;
+gl->maxShaderCompilerThreadsKHR                                                = glMaxShaderCompilerThreadsKHR;
 gl->memoryBarrier                                                                      = glMemoryBarrier;
 gl->memoryBarrierByRegion                                                      = glMemoryBarrierByRegion;
 gl->minSampleShading                                                           = glMinSampleShading;
index 994dfc4..2a5c495 100644 (file)
@@ -48,6 +48,7 @@ EXTENSIONS                    = [
        'GL_KHR_debug',
        'GL_KHR_robustness',
        'GL_KHR_no_error',
+       'GL_KHR_parallel_shader_compile',
        'GL_EXT_bgra',
        'GL_EXT_geometry_point_size',
        'GL_EXT_tessellation_shader',