Vulkan: Add wide-color tests
[platform/upstream/VK-GL-CTS.git] / framework / opengl / gluRenderContext.cpp
index 264ec31..6bb3e4a 100644 (file)
@@ -24,7 +24,6 @@
 #include "gluRenderContext.hpp"
 #include "gluDefs.hpp"
 #include "gluRenderConfig.hpp"
-#include "gluES3PlusWrapperContext.hpp"
 #include "gluFboRenderContext.hpp"
 #include "gluPlatform.hpp"
 #include "gluStrUtil.hpp"
@@ -131,7 +130,7 @@ static ContextFlags parseContextFlags (const std::string& flagsStr)
        return flags;
 }
 
-RenderContext* createRenderContext (tcu::Platform& platform, const tcu::CommandLine& cmdLine, const RenderConfig& config)
+RenderContext* createRenderContext (tcu::Platform& platform, const tcu::CommandLine& cmdLine, const RenderConfig& config, const RenderContext* sharedContext)
 {
        const ContextFactoryRegistry&   registry                = platform.getGLPlatform().getContextFactoryRegistry();
        const char*                                             factoryName             = cmdLine.getGLContextType();
@@ -162,9 +161,13 @@ RenderContext* createRenderContext (tcu::Platform& platform, const tcu::CommandL
                factory = registry.getDefaultFactory();
 
        if (cmdLine.getSurfaceType() == tcu::SURFACETYPE_FBO)
+       {
+               if (sharedContext)
+                       TCU_FAIL("Shared context not implemented for  FBO surface type");
                return new FboRenderContext(*factory, config, cmdLine);
+       }
        else
-               return factory->createContext(config, cmdLine);
+               return factory->createContext(config, cmdLine, sharedContext);
 }
 
 RenderContext* createDefaultRenderContext (tcu::Platform& platform, const tcu::CommandLine& cmdLine, ApiType apiType)
@@ -258,6 +261,7 @@ void initCoreFunctions (glw::Functions* dst, const glw::FunctionLoader* loader,
                { ApiType::core(4,3),   glw::initGL43Core       },
                { ApiType::core(4,4),   glw::initGL44Core       },
                { ApiType::core(4,5),   glw::initGL45Core       },
+               { ApiType::core(4,6),   glw::initGL46Core       },
        };
 
        for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(s_initFuncs); ndx++)
@@ -317,6 +321,7 @@ const char* getApiTypeDescription (ApiType type)
        else if (type == glu::ApiType::core(4, 3))      return "OpenGL 4.3 core";
        else if (type == glu::ApiType::core(4, 4))      return "OpenGL 4.4 core";
        else if (type == glu::ApiType::core(4, 5))      return "OpenGL 4.5 core";
+       else if (type == glu::ApiType::core(4, 6))      return "OpenGL 4.6 core";
        else                                                                            return DE_NULL;
 }