move robust_buffer_access_behavior tests to NoContext group

VK-GL-CTS Issue: 2575

Cribbed some ideas from the glcRobustnessTests.cpp tests which are already in the
NoContext group.
Didn't really want to touch the ES version of the tests on this old GL-specific branch
but it was necessary to make them compile. This also necessitated removing the skips
for these tests (since they no longer exist as named). I don't expect anyone cares about
the ES tests here, but they do work now.

Components: Framework, OpenGL, OpenGL ES

Affects:
KHR-GL4{3456}.robust_buffer_access_behavior.* (removed)
KHR-GLES32.robust.robust_buffer_access_behavior.* (removed)
KHR-NoContext.gl43.robust_buffer_access_behavior.* (added)
KHR-NoContext.es32.robust_buffer_access_behavior.* (added)


Change-Id: If5198e05863547e79074ca15f48ae16b969040f4
diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt
index 047bea1..c6309f2 100644
--- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt
+++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl43-master.txt
@@ -3766,11 +3766,6 @@
 KHR-GL43.compute_shader.api-program
 KHR-GL43.compute_shader.glsl-compile-time-errors
 KHR-GL43.compute_shader.glsl-link-time-errors
-KHR-GL43.robust_buffer_access_behavior.vertex_buffer_objects
-KHR-GL43.robust_buffer_access_behavior.texel_fetch
-KHR-GL43.robust_buffer_access_behavior.image_load_store
-KHR-GL43.robust_buffer_access_behavior.storage_buffer
-KHR-GL43.robust_buffer_access_behavior.uniform_buffer
 KHR-GL43.shader_storage_buffer_object.basic-basic
 KHR-GL43.shader_storage_buffer_object.basic-basic-cs
 KHR-GL43.shader_storage_buffer_object.basic-max
diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt
index c094c0e..2148c23 100644
--- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt
+++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl44-master.txt
@@ -3766,11 +3766,6 @@
 KHR-GL44.compute_shader.api-program
 KHR-GL44.compute_shader.glsl-compile-time-errors
 KHR-GL44.compute_shader.glsl-link-time-errors
-KHR-GL44.robust_buffer_access_behavior.vertex_buffer_objects
-KHR-GL44.robust_buffer_access_behavior.texel_fetch
-KHR-GL44.robust_buffer_access_behavior.image_load_store
-KHR-GL44.robust_buffer_access_behavior.storage_buffer
-KHR-GL44.robust_buffer_access_behavior.uniform_buffer
 KHR-GL44.shader_storage_buffer_object.basic-basic
 KHR-GL44.shader_storage_buffer_object.basic-basic-cs
 KHR-GL44.shader_storage_buffer_object.basic-max
diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt
index ed4b8d9..d163bb5 100644
--- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt
+++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl45-master.txt
@@ -3767,11 +3767,6 @@
 KHR-GL45.compute_shader.api-program
 KHR-GL45.compute_shader.glsl-compile-time-errors
 KHR-GL45.compute_shader.glsl-link-time-errors
-KHR-GL45.robust_buffer_access_behavior.vertex_buffer_objects
-KHR-GL45.robust_buffer_access_behavior.texel_fetch
-KHR-GL45.robust_buffer_access_behavior.image_load_store
-KHR-GL45.robust_buffer_access_behavior.storage_buffer
-KHR-GL45.robust_buffer_access_behavior.uniform_buffer
 KHR-GL45.shader_storage_buffer_object.basic-basic
 KHR-GL45.shader_storage_buffer_object.basic-basic-cs
 KHR-GL45.shader_storage_buffer_object.basic-max
diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt
index 40ef7f6..2ecf469 100644
--- a/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt
+++ b/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.0.x/gl46-master.txt
@@ -3767,11 +3767,6 @@
 KHR-GL46.compute_shader.api-program
 KHR-GL46.compute_shader.glsl-compile-time-errors
 KHR-GL46.compute_shader.glsl-link-time-errors
-KHR-GL46.robust_buffer_access_behavior.vertex_buffer_objects
-KHR-GL46.robust_buffer_access_behavior.texel_fetch
-KHR-GL46.robust_buffer_access_behavior.image_load_store
-KHR-GL46.robust_buffer_access_behavior.storage_buffer
-KHR-GL46.robust_buffer_access_behavior.uniform_buffer
 KHR-GL46.shader_storage_buffer_object.basic-basic
 KHR-GL46.shader_storage_buffer_object.basic-basic-cs
 KHR-GL46.shader_storage_buffer_object.basic-max
diff --git a/external/openglcts/data/mustpass/gl/khronos_mustpass_noctx/4.6.0.x/gl43-khr-master.txt b/external/openglcts/data/mustpass/gl/khronos_mustpass_noctx/4.6.0.x/gl43-khr-master.txt
index 16ec445..7369a9e 100644
--- a/external/openglcts/data/mustpass/gl/khronos_mustpass_noctx/4.6.0.x/gl43-khr-master.txt
+++ b/external/openglcts/data/mustpass/gl/khronos_mustpass_noctx/4.6.0.x/gl43-khr-master.txt
@@ -5,3 +5,8 @@
 KHR-NoContext.gl43.khr_debug.api_errors_debug
 KHR-NoContext.gl43.khr_debug.labels_debug
 KHR-NoContext.gl43.khr_debug.synchronous_calls
+KHR-NoContext.gl43.robust_buffer_access_behavior.vertex_buffer_objects
+KHR-NoContext.gl43.robust_buffer_access_behavior.texel_fetch
+KHR-NoContext.gl43.robust_buffer_access_behavior.image_load_store
+KHR-NoContext.gl43.robust_buffer_access_behavior.storage_buffer
+KHR-NoContext.gl43.robust_buffer_access_behavior.uniform_buffer
diff --git a/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.3.x/src/gles32-khr-master.txt b/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.3.x/src/gles32-khr-master.txt
index b5c8cee..96e023f 100644
--- a/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.3.x/src/gles32-khr-master.txt
+++ b/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.3.x/src/gles32-khr-master.txt
@@ -303,8 +303,3 @@
 KHR-GLES32.core.draw_buffers_indexed.color_masks
 KHR-GLES32.core.draw_buffers_indexed.blending
 KHR-GLES32.core.draw_buffers_indexed.negative
-KHR-GLES32.robust.robust_buffer_access_behavior.vertex_buffer_objects
-KHR-GLES32.robust.robust_buffer_access_behavior.texel_fetch
-KHR-GLES32.robust.robust_buffer_access_behavior.image_load_store
-KHR-GLES32.robust.robust_buffer_access_behavior.storage_buffer
-KHR-GLES32.robust.robust_buffer_access_behavior.uniform_buffer
diff --git a/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.3.x/src/gles32-khr-test-issues.txt b/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.3.x/src/gles32-khr-test-issues.txt
index d782714..e69de29 100644
--- a/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.3.x/src/gles32-khr-test-issues.txt
+++ b/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.3.x/src/gles32-khr-test-issues.txt
@@ -1,2 +0,0 @@
-#VK-GL-CTS 354
-KHR-GLES32.robust.*
diff --git a/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.4.x/src/gles32-khr-test-issues.txt b/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.4.x/src/gles32-khr-test-issues.txt
index 94f2215..e69de29 100644
--- a/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.4.x/src/gles32-khr-test-issues.txt
+++ b/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.4.x/src/gles32-khr-test-issues.txt
@@ -1,2 +0,0 @@
-#VK-GL-CTS 354i
-KHR-GLES32.robust.*
diff --git a/external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles32-khr-master.txt b/external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles32-khr-master.txt
index faaabc9..fa283f6 100644
--- a/external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles32-khr-master.txt
+++ b/external/openglcts/data/mustpass/gles/khronos_mustpass/master/gles32-khr-master.txt
@@ -1009,8 +1009,3 @@
 KHR-GLES32.core.constant_expressions.array_normalize_vec4_tess_eval
 KHR-GLES32.core.separable_programs_tf.tessellation_active
 KHR-GLES32.core.separable_programs_tf.geometry_active
-KHR-GLES32.robust.robust_buffer_access_behavior.vertex_buffer_objects
-KHR-GLES32.robust.robust_buffer_access_behavior.texel_fetch
-KHR-GLES32.robust.robust_buffer_access_behavior.image_load_store
-KHR-GLES32.robust.robust_buffer_access_behavior.storage_buffer
-KHR-GLES32.robust.robust_buffer_access_behavior.uniform_buffer
diff --git a/external/openglcts/data/mustpass/gles/khronos_mustpass_noctx/3.2.4.x/gles32-khr-master.txt b/external/openglcts/data/mustpass/gles/khronos_mustpass_noctx/3.2.4.x/gles32-khr-master.txt
index 985fc13..86035fb 100644
--- a/external/openglcts/data/mustpass/gles/khronos_mustpass_noctx/3.2.4.x/gles32-khr-master.txt
+++ b/external/openglcts/data/mustpass/gles/khronos_mustpass_noctx/3.2.4.x/gles32-khr-master.txt
@@ -6,3 +6,8 @@
 KHR-NoContext.es32.context_flags.debug_flag_set_case
 KHR-NoContext.es32.context_flags.robust_flag_set_case
 KHR-NoContext.es32.context_flags.all_flags_set_case
+KHR-NoContext.es32.robust_buffer_access_behavior.vertex_buffer_objects
+KHR-NoContext.es32.robust_buffer_access_behavior.texel_fetch
+KHR-NoContext.es32.robust_buffer_access_behavior.image_load_store
+KHR-NoContext.es32.robust_buffer_access_behavior.storage_buffer
+KHR-NoContext.es32.robust_buffer_access_behavior.uniform_buffer
diff --git a/external/openglcts/data/mustpass/gles/khronos_mustpass_noctx/master/gles32-khr-master.txt b/external/openglcts/data/mustpass/gles/khronos_mustpass_noctx/master/gles32-khr-master.txt
index 985fc13..86035fb 100644
--- a/external/openglcts/data/mustpass/gles/khronos_mustpass_noctx/master/gles32-khr-master.txt
+++ b/external/openglcts/data/mustpass/gles/khronos_mustpass_noctx/master/gles32-khr-master.txt
@@ -6,3 +6,8 @@
 KHR-NoContext.es32.context_flags.debug_flag_set_case
 KHR-NoContext.es32.context_flags.robust_flag_set_case
 KHR-NoContext.es32.context_flags.all_flags_set_case
+KHR-NoContext.es32.robust_buffer_access_behavior.vertex_buffer_objects
+KHR-NoContext.es32.robust_buffer_access_behavior.texel_fetch
+KHR-NoContext.es32.robust_buffer_access_behavior.image_load_store
+KHR-NoContext.es32.robust_buffer_access_behavior.storage_buffer
+KHR-NoContext.es32.robust_buffer_access_behavior.uniform_buffer
diff --git a/external/openglcts/modules/common/glcNoDefaultContextPackage.cpp b/external/openglcts/modules/common/glcNoDefaultContextPackage.cpp
index 77c67b1..c5518bc 100644
--- a/external/openglcts/modules/common/glcNoDefaultContextPackage.cpp
+++ b/external/openglcts/modules/common/glcNoDefaultContextPackage.cpp
@@ -26,6 +26,8 @@
 #include "glcKHRDebugTests.hpp"
 #include "glcMultipleContextsTests.hpp"
 #include "glcNoErrorTests.hpp"
+#include "es32cRobustBufferAccessBehaviorTests.hpp"
+#include "glcRobustBufferAccessBehaviorTests.hpp"
 #include "glcRobustnessTests.hpp"
 #include "gluRenderContext.hpp"
 
@@ -96,6 +98,7 @@
 
 	tcu::TestCaseGroup* gl43Group = new tcu::TestCaseGroup(getTestContext(), "gl43", "");
 	gl43Group->addChild(new glcts::KHRDebugTests(getTestContext(), glu::ApiType::core(4, 3)));
+	gl43Group->addChild(new deqp::RobustBufferAccessBehaviorTests(getTestContext(), glu::ApiType::core(4, 3)));
 	addChild(gl43Group);
 
 	tcu::TestCaseGroup* gl45Group = new tcu::TestCaseGroup(getTestContext(), "gl45", "");
@@ -110,6 +113,7 @@
 	tcu::TestCaseGroup* es32Group = new tcu::TestCaseGroup(getTestContext(), "es32", "");
 	es32Group->addChild(new glcts::RobustnessTests(getTestContext(), glu::ApiType::es(3, 2)));
 	es32Group->addChild(new glcts::ContextFlagsTests(getTestContext(), glu::ApiType::es(3, 2)));
+	es32Group->addChild(new es32cts::RobustBufferAccessBehaviorTests(getTestContext(), glu::ApiType::es(3, 2)));
 	addChild(es32Group);
 }
 
diff --git a/external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.cpp b/external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.cpp
index ed6695a..b1b0f42 100644
--- a/external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.cpp
+++ b/external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.cpp
@@ -64,9 +64,9 @@
 
 /** Constructor.
  *
- * @param context CTS context.
+ * @param renderContext CTS context.
  **/
-Buffer::Buffer(deqp::Context& context) : m_id(m_invalid_id), m_context(context), m_target(GL_ARRAY_BUFFER)
+Buffer::Buffer(glu::RenderContext& renderContext) : m_id(m_invalid_id), m_renderContext(renderContext), m_target(GL_ARRAY_BUFFER)
 {
 }
 
@@ -92,7 +92,7 @@
 
 	m_target = target;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext.getFunctions();
 
 	Generate(gl, m_id);
 	Bind(gl, m_id, m_target);
@@ -106,7 +106,7 @@
 {
 	if (m_invalid_id != m_id)
 	{
-		const Functions& gl = m_context.getRenderContext().getFunctions();
+		const Functions& gl = m_renderContext.getFunctions();
 
 		gl.deleteBuffers(1, &m_id);
 		m_id = m_invalid_id;
@@ -118,7 +118,7 @@
  **/
 void Buffer::Bind() const
 {
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext.getFunctions();
 
 	Bind(gl, m_id, m_target);
 }
@@ -129,7 +129,7 @@
  **/
 void Buffer::BindBase(glw::GLuint index) const
 {
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext.getFunctions();
 
 	BindBase(gl, m_id, m_target, index);
 }
@@ -214,9 +214,9 @@
 
 /** Constructor.
  *
- * @param context CTS context.
+ * @param renderContext CTS context.
  **/
-Framebuffer::Framebuffer(deqp::Context& context) : m_id(m_invalid_id), m_context(context)
+Framebuffer::Framebuffer(glu::RenderContext& renderContext) : m_id(m_invalid_id), m_renderContext(renderContext)
 {
 	/* Nothing to done here */
 }
@@ -236,7 +236,7 @@
 {
 	if (m_invalid_id != m_id)
 	{
-		const Functions& gl = m_context.getRenderContext().getFunctions();
+		const Functions& gl = m_renderContext.getFunctions();
 
 		gl.deleteFramebuffers(1, &m_id);
 		m_id = m_invalid_id;
@@ -298,17 +298,17 @@
 
 /** Constructor.
  *
- * @param context CTS context.
+ * @param renderContext CTS context.
  **/
-Program::Program(deqp::Context& context)
+Program::Program(glu::RenderContext& renderContext)
 	: m_id(m_invalid_id)
-	, m_compute(context)
-	, m_fragment(context)
-	, m_geometry(context)
-	, m_tess_ctrl(context)
-	, m_tess_eval(context)
-	, m_vertex(context)
-	, m_context(context)
+	, m_compute(renderContext)
+	, m_fragment(renderContext)
+	, m_geometry(renderContext)
+	, m_tess_ctrl(renderContext)
+	, m_tess_eval(renderContext)
+	, m_vertex(renderContext)
+	, m_renderContext(renderContext)
 {
 	/* Nothing to be done here */
 }
@@ -338,7 +338,7 @@
 	Release();
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext.getFunctions();
 
 	/* Initialize shaders */
 	m_compute.Init(GL_COMPUTE_SHADER, compute_shader);
@@ -366,7 +366,7 @@
  **/
 void Program::Release()
 {
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext.getFunctions();
 
 	if (m_invalid_id != m_id)
 	{
@@ -389,7 +389,7 @@
  **/
 void Program::Use() const
 {
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext.getFunctions();
 
 	Use(gl, m_id);
 }
@@ -482,9 +482,9 @@
 
 /** Constructor.
  *
- * @param context CTS context.
+ * @param renderContext CTS context.
  **/
-Shader::Shader(deqp::Context& context) : m_id(m_invalid_id), m_context(context)
+Shader::Shader(glu::RenderContext& renderContext) : m_id(m_invalid_id), m_renderContext(renderContext)
 {
 	/* Nothing to be done here */
 }
@@ -514,7 +514,7 @@
 	Release();
 
 	/* Create, set source and compile */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext.getFunctions();
 
 	Create(gl, stage, m_id);
 	Source(gl, m_id, source);
@@ -529,7 +529,7 @@
 {
 	if (m_invalid_id != m_id)
 	{
-		const Functions& gl = m_context.getRenderContext().getFunctions();
+		const Functions& gl = m_renderContext.getFunctions();
 
 		gl.deleteShader(m_id);
 		m_id = m_invalid_id;
@@ -612,9 +612,9 @@
 
 /** Constructor.
  *
- * @param context CTS context.
+ * @param renderContext CTS context.
  **/
-Texture::Texture(deqp::Context& context) : m_id(m_invalid_id), m_context(context)
+Texture::Texture(glu::RenderContext& renderContext) : m_id(m_invalid_id), m_renderContext(renderContext)
 {
 	/* Nothing to done here */
 }
@@ -634,7 +634,7 @@
 {
 	if (m_invalid_id != m_id)
 	{
-		const Functions& gl = m_context.getRenderContext().getFunctions();
+		const Functions& gl = m_renderContext.getFunctions();
 
 		gl.deleteTextures(1, &m_id);
 		m_id = m_invalid_id;
@@ -937,9 +937,9 @@
 
 /** Constructor.
  *
- * @param context CTS context.
+ * @param renderContext CTS context.
  **/
-VertexArray::VertexArray(deqp::Context& context) : m_id(m_invalid_id), m_context(context)
+VertexArray::VertexArray(glu::RenderContext& renderContext) : m_id(m_invalid_id), m_renderContext(renderContext)
 {
 }
 
@@ -958,7 +958,7 @@
 {
 	if (m_invalid_id != m_id)
 	{
-		const Functions& gl = m_context.getRenderContext().getFunctions();
+		const Functions& gl = m_renderContext.getFunctions();
 
 		Bind(gl, 0);
 
@@ -1018,68 +1018,64 @@
 }
 
 
-class RobustnessEnabledContext
-{
-public:
-	RobustnessEnabledContext(deqp::Context& context, const tcu::CommandLine& commandLine, tcu::Platform& platform);
-
-	~RobustnessEnabledContext(void);
-
-protected:
-	deqp::Context&		m_context;
-
-	glu::RenderContext* m_renderContext;
-	glu::RenderContext* m_previousRenderContext;
-};
-
-RobustnessEnabledContext::RobustnessEnabledContext(deqp::Context& context, const tcu::CommandLine& commandLine, tcu::Platform& platform)
-	: m_context			(context)
+RobustnessEnabledContext::RobustnessEnabledContext(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: m_testCtx			(testCtx)
+	, m_apiType			(apiType)
 	, m_renderContext	(DE_NULL)
 {
 
-	if (!context.getContextInfo().isExtensionSupported("GL_ARB_robustness") || !context.getContextInfo().isExtensionSupported("GL_ARB_robust_buffer_access_behavior"))
+	/* Create test context to verify if GL_ARB_robustness and GL_ARB_robust_buffer_access_behavior extensions are available */
 	{
-		throw tcu::NotSupportedError("GL_ARB_robustness and GL_ARB_robust_buffer_access_behavior must be supported to run this test case");
+		deqp::Context context(m_testCtx, glu::ContextType(m_apiType));
+		if (!(context.getContextInfo().isExtensionSupported("GL_ARB_robustness") &&
+			  context.getContextInfo().isExtensionSupported("GL_ARB_robust_buffer_access_behavior")) &&
+			!contextSupports(context.getRenderContext().getType(), glu::ApiType::es(3, 2)))
+		{
+			throw tcu::NotSupportedError("GL_ARB_robustness and GL_ARB_robust_buffer_access_behavior or ES 3.2 must be supported to run this test case");
+		}
 	}
 
-	{
-		glu::RenderConfig		renderCfg(glu::ContextType(m_context.getRenderContext().getType().getAPI(), glu::CONTEXT_ROBUST));
-		glu::parseRenderConfig(&renderCfg, commandLine);
+	glu::RenderConfig		renderCfg(glu::ContextType(m_apiType, glu::CONTEXT_ROBUST));
+	const tcu::CommandLine& commandLine = m_testCtx.getCommandLine();
+	glu::parseRenderConfig(&renderCfg, commandLine);
 
-		m_renderContext = createRenderContext(platform, commandLine, renderCfg);
-		m_previousRenderContext = &m_context.getRenderContext();
-		m_context.setRenderContext(m_renderContext);
-	}
+	if (commandLine.getSurfaceType() != tcu::SURFACETYPE_WINDOW)
+		throw tcu::NotSupportedError("Test not supported in non-windowed context");
+
+	/* Try to create robustness context */
+	m_renderContext =  createRenderContext(m_testCtx.getPlatform(), commandLine, renderCfg);
 }
 
 RobustnessEnabledContext::~RobustnessEnabledContext()
 {
 	if (m_renderContext != DE_NULL)
 	{
-		m_context.setRenderContext(m_previousRenderContext);
-
 		delete m_renderContext;
-
-		m_context.getRenderContext().makeCurrent();
 	}
 }
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-VertexBufferObjectsTest::VertexBufferObjectsTest(deqp::Context& context)
-	: TestCase(context, "vertex_buffer_objects", "Verifies that out-of-bound reads from VB result in zero")
+VertexBufferObjectsTest::VertexBufferObjectsTest(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: TestCase(testCtx, "vertex_buffer_objects", "Verifies that out-of-bound reads from VB result in zero")
+	, m_apiType(apiType)
+	, m_renderContext(DE_NULL)
 {
 	/* Nothing to be done */
 }
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-VertexBufferObjectsTest::VertexBufferObjectsTest(deqp::Context& context, const char* name, const char* description)
-	: TestCase(context, name, description)
+VertexBufferObjectsTest::VertexBufferObjectsTest(tcu::TestContext& testCtx, glu::ApiType apiType, const char* name, const char* description)
+	: TestCase(testCtx, name, description)
+	, m_apiType(apiType)
+	, m_renderContext(DE_NULL)
 {
 	/* Nothing to be done */
 }
@@ -1090,7 +1086,10 @@
  **/
 tcu::TestNode::IterateResult VertexBufferObjectsTest::iterate()
 {
-	RobustnessEnabledContext context(m_context, m_testCtx.getCommandLine(), m_testCtx.getPlatform());
+	RobustnessEnabledContext context(m_testCtx, m_apiType);
+	m_renderContext = context.getRenderContext();
+	if (!m_renderContext)
+		return STOP;
 
 	static const GLuint invalid_elements[] = {
 		9, 1, 2, 10, 2, 3, 11, 3, 4, 12, 4, 5, 13, 5, 6, 14, 6, 7, 15, 7, 8, 16, 8, 1,
@@ -1117,19 +1116,19 @@
 	static const GLuint width	  = 8;
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	/* Test result indicator */
 	bool test_result = true;
 
 	/* Test case objects */
-	Framebuffer framebuffer(m_context);
-	Buffer		invalid_elements_buffer(m_context);
-	Program		program(m_context);
-	Texture		texture(m_context);
-	Buffer		valid_elements_buffer(m_context);
-	Buffer		vertices_buffer(m_context);
-	VertexArray vao(m_context);
+	Framebuffer framebuffer(*m_renderContext);
+	Buffer		invalid_elements_buffer(*m_renderContext);
+	Program		program(*m_renderContext);
+	Texture		texture(*m_renderContext);
+	Buffer		valid_elements_buffer(*m_renderContext);
+	Buffer		vertices_buffer(*m_renderContext);
+	VertexArray vao(*m_renderContext);
 
 	/* Vertex array */
 	VertexArray::Generate(gl, vao.m_id);
@@ -1173,7 +1172,7 @@
 
 	if (false == verifyValidResults(texture.m_id))
 	{
-		m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid result for valid input"
+		m_testCtx.getLog() << tcu::TestLog::Message << "Invalid result for valid input"
 											<< tcu::TestLog::EndMessage;
 
 		test_result = false;
@@ -1189,7 +1188,7 @@
 
 	if (false == verifyInvalidResults(texture.m_id))
 	{
-		m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid result for invalid input"
+		m_testCtx.getLog() << tcu::TestLog::Message << "Invalid result for invalid input"
 											<< tcu::TestLog::EndMessage;
 
 		test_result = false;
@@ -1198,14 +1197,15 @@
 	/* Set result */
 	if (true == test_result)
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_PASS, "Pass");
+		m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
 	}
 	else
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_FAIL, "Fail");
+		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
 	}
 
 	/* Done */
+	m_renderContext = DE_NULL;
 	return tcu::TestNode::STOP;
 }
 
@@ -1252,7 +1252,7 @@
 	static const GLuint height = 8;
 	static const GLuint width  = 8;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	GLubyte pixels[width * height];
 	for (GLuint i = 0; i < width * height; ++i)
@@ -1302,7 +1302,7 @@
 	static const GLuint height = 8;
 	static const GLuint width  = 8;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	GLubyte pixels[width * height];
 	for (GLuint i = 0; i < width * height; ++i)
@@ -1322,7 +1322,7 @@
 	{
 		if (255 != pixels[i])
 		{
-			m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)pixels[i]
+			m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)pixels[i]
 												<< " at offset: " << i << tcu::TestLog::EndMessage;
 
 			return false;
@@ -1334,21 +1334,27 @@
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-TexelFetchTest::TexelFetchTest(deqp::Context& context)
-	: TestCase(context, "texel_fetch", "Verifies that out-of-bound fetches from texture result in zero")
+TexelFetchTest::TexelFetchTest(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: TestCase(testCtx, "texel_fetch", "Verifies that out-of-bound fetches from texture result in zero")
 	, m_test_case(R8)
+	, m_apiType(apiType)
+	, m_renderContext(DE_NULL)
 {
 	/* Nothing to be done */
 }
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-TexelFetchTest::TexelFetchTest(deqp::Context& context, const glw::GLchar* name, const glw::GLchar* description)
-	: TestCase(context, name, description), m_test_case(R8)
+TexelFetchTest::TexelFetchTest(tcu::TestContext& testCtx, glu::ApiType apiType, const glw::GLchar* name, const glw::GLchar* description)
+	: TestCase(testCtx, name, description), m_test_case(R8)
+	, m_apiType(apiType)
+	, m_renderContext(DE_NULL)
 {
 	/* Nothing to be done */
 }
@@ -1359,14 +1365,17 @@
  **/
 tcu::TestNode::IterateResult TexelFetchTest::iterate()
 {
-	RobustnessEnabledContext context(m_context, m_testCtx.getCommandLine(), m_testCtx.getPlatform());
+	RobustnessEnabledContext context(m_testCtx, m_apiType);
+	m_renderContext = context.getRenderContext();
+	if (!m_renderContext)
+		return STOP;
 
 	/* Constants */
 	static const GLuint height = 16;
 	static const GLuint width  = 16;
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	/* Test result indicator */
 	bool test_result = true;
@@ -1394,12 +1403,12 @@
 		}
 
 		/* */
-		Texture		destination_texture(m_context);
-		Framebuffer framebuffer(m_context);
-		Program		invalid_program(m_context);
-		Texture		source_texture(m_context);
-		Program		valid_program(m_context);
-		VertexArray vao(m_context);
+		Texture		destination_texture(*m_renderContext);
+		Framebuffer framebuffer(*m_renderContext);
+		Program		invalid_program(*m_renderContext);
+		Texture		source_texture(*m_renderContext);
+		Program		valid_program(*m_renderContext);
+		VertexArray vao(*m_renderContext);
 
 		const std::string& fs_invalid = getFragmentShader(false);
 		const std::string& fs_valid   = getFragmentShader(true);
@@ -1429,7 +1438,7 @@
 				 * to upload the texture so max_image_samples >= 4
 				 * is also required.
 				 */
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
+				m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
 													<< " not supported" << tcu::TestLog::EndMessage;
 
 				continue;
@@ -1476,7 +1485,7 @@
 		GLU_EXPECT_NO_ERROR(gl.getError(), "CheckFramebufferStatus");
 		if (GL_FRAMEBUFFER_COMPLETE != fbo_status)
 		{
-			m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
+			m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
 												<< " not supported" << tcu::TestLog::EndMessage;
 
 			continue;
@@ -1542,7 +1551,7 @@
 		/* Set test result */
 		if (false == case_result)
 		{
-			m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
+			m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
 												<< " failed" << tcu::TestLog::EndMessage;
 
 			test_result = false;
@@ -1552,14 +1561,15 @@
 	/* Set result */
 	if (true == test_result)
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_PASS, "Pass");
+		m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
 	}
 	else
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_FAIL, "Fail");
+		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
 	}
 
 	/* Done */
+	m_renderContext = DE_NULL;
 	return tcu::TestNode::STOP;
 }
 
@@ -1746,7 +1756,7 @@
 	static const GLuint image_width  = 16;
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	/* Texture storage parameters */
 	GLuint  height			= image_height;
@@ -1870,7 +1880,7 @@
 								  "}\n"
 								  "\n";
 
-		Program program(m_context);
+		Program program(*m_renderContext);
 		program.Init(cs, "", "", "", "", "");
 		program.Use();
 
@@ -1901,7 +1911,7 @@
 	static const GLuint width	= 16;
 	static const GLuint n_pixels = height * width;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	bool result = true;
 
@@ -1931,7 +1941,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
 													<< ". Expected value: " << (GLuint)expected_red
 													<< " at offset: " << i << tcu::TestLog::EndMessage;
 
@@ -1969,7 +1979,7 @@
 
 			if ((expected_red != drawn_red) || (expected_green != drawn_green))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << (GLint)drawn_red << ", " << (GLint)drawn_green
 					<< ". Expected value: " << (GLint)expected_red << ", " << (GLint)expected_green
 					<< ". At offset: " << i << tcu::TestLog::EndMessage;
@@ -2022,7 +2032,7 @@
 				((de::abs(expected_alpha_0 - drawn_alpha) > precision) &&
 				 (de::abs(expected_alpha_1 - drawn_alpha) > precision)))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << drawn_red << ", " << drawn_green << ", "
 					<< drawn_blue << ", " << drawn_alpha << ". Expected value: " << expected_red << ", "
 					<< expected_green << ", " << expected_blue << ", " << expected_alpha_0 << " or " << expected_alpha_1
@@ -2059,7 +2069,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -2100,8 +2110,8 @@
 								  "}\n"
 								  "\n";
 
-		Program program(m_context);
-		Texture destination_texture(m_context);
+		Program program(*m_renderContext);
+		Texture destination_texture(*m_renderContext);
 
 		Texture::Generate(gl, destination_texture.m_id);
 		Texture::Bind(gl, destination_texture.m_id, GL_TEXTURE_2D);
@@ -2146,7 +2156,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -2171,7 +2181,7 @@
 	static const GLuint width	= 16;
 	static const GLuint n_pixels = height * width;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	bool result = true;
 
@@ -2201,7 +2211,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
 													<< ". Expected value: " << (GLuint)expected_red
 													<< " at offset: " << i << tcu::TestLog::EndMessage;
 
@@ -2239,7 +2249,7 @@
 
 			if ((expected_red != drawn_red) || (expected_green != drawn_green))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << (GLint)drawn_red << ", " << (GLint)drawn_green
 					<< ". Expected value: " << (GLint)expected_red << ", " << (GLint)expected_green
 					<< ". At offset: " << i << tcu::TestLog::EndMessage;
@@ -2285,7 +2295,7 @@
 			if ((expected_red != drawn_red) || (expected_green != drawn_green) || (expected_blue != drawn_blue) ||
 				(expected_alpha != drawn_alpha))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << drawn_red << ", " << drawn_green << ", "
 					<< drawn_blue << ", " << drawn_alpha << ". Expected value: " << expected_red << ", "
 					<< expected_green << ", " << expected_blue << ", " << expected_alpha << ". At offset: " << i
@@ -2322,7 +2332,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -2365,8 +2375,8 @@
 			"}\n"
 			"\n";
 
-		Program program(m_context);
-		Texture destination_texture(m_context);
+		Program program(*m_renderContext);
+		Texture destination_texture(*m_renderContext);
 
 		Texture::Generate(gl, destination_texture.m_id);
 		Texture::Bind(gl, destination_texture.m_id, GL_TEXTURE_2D);
@@ -2411,7 +2421,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -2426,20 +2436,22 @@
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-ImageLoadStoreTest::ImageLoadStoreTest(deqp::Context& context)
-	: TexelFetchTest(context, "image_load_store", "Verifies that out-of-bound to image result in zero or is discarded")
+ImageLoadStoreTest::ImageLoadStoreTest(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: TexelFetchTest(testCtx, apiType, "image_load_store", "Verifies that out-of-bound to image result in zero or is discarded")
 {
 	/* Nothing to be done */
 }
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-ImageLoadStoreTest::ImageLoadStoreTest(deqp::Context& context, const glw::GLchar* name, const glw::GLchar* description)
-	: TexelFetchTest(context, name, description)
+ImageLoadStoreTest::ImageLoadStoreTest(tcu::TestContext& testCtx, glu::ApiType apiType, const glw::GLchar* name, const glw::GLchar* description)
+	: TexelFetchTest(testCtx, apiType, name, description)
 {
 	/* Nothing to be done */
 }
@@ -2450,14 +2462,17 @@
  **/
 tcu::TestNode::IterateResult ImageLoadStoreTest::iterate()
 {
-	RobustnessEnabledContext context(m_context, m_testCtx.getCommandLine(), m_testCtx.getPlatform());
+	RobustnessEnabledContext context(m_testCtx, m_apiType);
+	m_renderContext = context.getRenderContext();
+	if (!m_renderContext)
+		return STOP;
 
 	/* Constants */
 	static const GLuint height = 16;
 	static const GLuint width  = 16;
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	/* Test result indicator */
 	bool test_result = true;
@@ -2478,11 +2493,11 @@
 		}
 
 		/* */
-		Texture destination_texture(m_context);
-		Program invalid_destination_program(m_context);
-		Program invalid_source_program(m_context);
-		Texture source_texture(m_context);
-		Program valid_program(m_context);
+		Texture destination_texture(*m_renderContext);
+		Program invalid_destination_program(*m_renderContext);
+		Program invalid_source_program(*m_renderContext);
+		Texture source_texture(*m_renderContext);
+		Program valid_program(*m_renderContext);
 
 		const std::string& cs_invalid_destination = getComputeShader(DESTINATION_INVALID);
 		const std::string& cs_invalid_source	  = getComputeShader(SOURCE_INVALID);
@@ -2509,7 +2524,7 @@
 				 * to upload the texture so max_image_samples >= 4
 				 * is also required.
 				 */
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
+				m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
 													<< " not supported" << tcu::TestLog::EndMessage;
 
 				continue;
@@ -2580,7 +2595,7 @@
 		/* Set test result */
 		if (false == case_result)
 		{
-			m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
+			m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
 												<< " failed" << tcu::TestLog::EndMessage;
 
 			test_result = false;
@@ -2590,14 +2605,15 @@
 	/* Set result */
 	if (true == test_result)
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_PASS, "Pass");
+		m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
 	}
 	else
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_FAIL, "Fail");
+		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
 	}
 
 	/* Done */
+	m_renderContext = DE_NULL;
 	return tcu::TestNode::STOP;
 }
 
@@ -2762,7 +2778,7 @@
  **/
 void ImageLoadStoreTest::setTextures(glw::GLuint id_destination, glw::GLuint id_source)
 {
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	GLenum format = 0;
 	GLint  level  = 0;
@@ -2815,7 +2831,7 @@
 	static const GLuint width	= 16;
 	static const GLuint n_pixels = height * width;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 	gl.memoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT);
 	GLU_EXPECT_NO_ERROR(gl.getError(), "MemoryBarrier");
 
@@ -2847,7 +2863,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
 													<< ". Expected value: " << (GLuint)expected_red
 													<< " at offset: " << i << tcu::TestLog::EndMessage;
 
@@ -2885,7 +2901,7 @@
 
 			if ((expected_red != drawn_red) || (expected_green != drawn_green))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << (GLint)drawn_red << ", " << (GLint)drawn_green
 					<< ". Expected value: " << (GLint)expected_red << ", " << (GLint)expected_green
 					<< ". At offset: " << i << tcu::TestLog::EndMessage;
@@ -2931,7 +2947,7 @@
 			if ((expected_red != drawn_red) || (expected_green != drawn_green) || (expected_blue != drawn_blue) ||
 				(expected_alpha != drawn_alpha))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << drawn_red << ", " << drawn_green << ", "
 					<< drawn_blue << ", " << drawn_alpha << ". Expected value: " << expected_red << ", "
 					<< expected_green << ", " << expected_blue << ", " << expected_alpha << ". At offset: " << i
@@ -2968,7 +2984,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -3009,8 +3025,8 @@
 								  "}\n"
 								  "\n";
 
-		Program program(m_context);
-		Texture destination_texture(m_context);
+		Program program(*m_renderContext);
+		Texture destination_texture(*m_renderContext);
 
 		Texture::Generate(gl, destination_texture.m_id);
 		Texture::Bind(gl, destination_texture.m_id, GL_TEXTURE_2D);
@@ -3055,7 +3071,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -3080,7 +3096,7 @@
 	static const GLuint width	= 16;
 	static const GLuint n_pixels = height * width;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 	gl.memoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT);
 	GLU_EXPECT_NO_ERROR(gl.getError(), "MemoryBarrier");
 
@@ -3112,7 +3128,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
 													<< ". Expected value: " << (GLuint)expected_red
 													<< " at offset: " << i << tcu::TestLog::EndMessage;
 
@@ -3150,7 +3166,7 @@
 
 			if ((expected_red != drawn_red) || (expected_green != drawn_green))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << (GLint)drawn_red << ", " << (GLint)drawn_green
 					<< ". Expected value: " << (GLint)expected_red << ", " << (GLint)expected_green
 					<< ". At offset: " << i << tcu::TestLog::EndMessage;
@@ -3196,7 +3212,7 @@
 			if ((expected_red != drawn_red) || (expected_green != drawn_green) || (expected_blue != drawn_blue) ||
 				(expected_alpha != drawn_alpha))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << drawn_red << ", " << drawn_green << ", "
 					<< drawn_blue << ", " << drawn_alpha << ". Expected value: " << expected_red << ", "
 					<< expected_green << ", " << expected_blue << ", " << expected_alpha << ". At offset: " << i
@@ -3233,7 +3249,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -3276,8 +3292,8 @@
 			"}\n"
 			"\n";
 
-		Program program(m_context);
-		Texture destination_texture(m_context);
+		Program program(*m_renderContext);
+		Texture destination_texture(*m_renderContext);
 
 		Texture::Generate(gl, destination_texture.m_id);
 		Texture::Bind(gl, destination_texture.m_id, GL_TEXTURE_2D);
@@ -3322,7 +3338,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -3341,24 +3357,32 @@
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-StorageBufferTest::StorageBufferTest(deqp::Context& context)
-	: TestCase(context, "storage_buffer", "Verifies that out-of-bound access to SSBO is discared or resutls in 0")
+StorageBufferTest::StorageBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: TestCase(testCtx, "storage_buffer", "Verifies that out-of-bound access to SSBO is discared or resutls in 0")
 	, m_test_case(VALID)
 	, m_hasKhrRobustBufferAccess(false)
+	, m_apiType(apiType)
+	, m_renderContext(DE_NULL)
 {
 	/* Nothing to be done here */
 }
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-StorageBufferTest::StorageBufferTest(deqp::Context& context, const glw::GLchar* name, const glw::GLchar* description)
-	: TestCase(context, name, description), m_test_case(VALID)
+StorageBufferTest::StorageBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType, const glw::GLchar* name, const glw::GLchar* description)
+	: TestCase(testCtx, name, description)
+	, m_test_case(VALID)
+	, m_hasKhrRobustBufferAccess(false)
+	, m_apiType(apiType)
+	, m_renderContext(DE_NULL)
 {
-	/* Nothing to be done */
+	/* Nothing to be done here */
 }
 
 /** Execute test
@@ -3367,13 +3391,17 @@
  **/
 tcu::TestNode::IterateResult StorageBufferTest::iterate()
 {
-	RobustnessEnabledContext context(m_context, m_testCtx.getCommandLine(), m_testCtx.getPlatform());
+	RobustnessEnabledContext context(m_testCtx, m_apiType);
+	m_renderContext = context.getRenderContext();
+	if (!m_renderContext)
+		return STOP;
+	de::MovePtr<glu::ContextInfo> contextInfo = de::MovePtr<glu::ContextInfo>(glu::ContextInfo::create(*m_renderContext));
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
-	m_hasKhrRobustBufferAccess = m_context.getContextInfo().isExtensionSupported("GL_KHR_robust_buffer_access_behavior") ||
-								 contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5));
+	m_hasKhrRobustBufferAccess = contextInfo->isExtensionSupported("GL_KHR_robust_buffer_access_behavior") ||
+								 contextSupports(m_renderContext->getType(), glu::ApiType::core(4, 5));
 
 	/* Test result indicator */
 	bool test_result = true;
@@ -3382,9 +3410,9 @@
 	while (LAST != m_test_case)
 	{
 		/* Test case objects */
-		Buffer  destination_buffer(m_context);
-		Buffer  source_buffer(m_context);
-		Program program(m_context);
+		Buffer  destination_buffer(*m_renderContext);
+		Buffer  source_buffer(*m_renderContext);
+		Program program(*m_renderContext);
 
 		/* Compute Shader */
 		const std::string& cs = getComputeShader();
@@ -3427,14 +3455,15 @@
 	/* Set result */
 	if (true == test_result)
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_PASS, "Pass");
+		m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
 	}
 	else
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_FAIL, "Fail");
+		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
 	}
 
 	/* Done */
+	m_renderContext = DE_NULL;
 	return tcu::TestNode::STOP;
 }
 
@@ -3551,7 +3580,7 @@
 				}
 				if (!valid)
 				{
-					m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
+					m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
 														<< tcu::TestLog::EndMessage;
 				}
 			}
@@ -3590,7 +3619,7 @@
 				}
 				if (!valid)
 				{
-					m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
+					m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
 														<< tcu::TestLog::EndMessage;
 				}
 			}
@@ -3611,7 +3640,7 @@
 		int size = static_cast<int>(sizeof(GLfloat) * 4);
 		if (0 != memcmp(expected_data, buffer_data, size))
 		{
-			m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
+			m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
 												<< tcu::TestLog::EndMessage;
 			return false;
 		}
@@ -3622,22 +3651,28 @@
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-UniformBufferTest::UniformBufferTest(deqp::Context& context)
-	: TestCase(context, "uniform_buffer", "Verifies that out-of-bound access to UBO resutls in 0"), m_test_case(VALID)
+UniformBufferTest::UniformBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: TestCase(testCtx, "uniform_buffer", "Verifies that out-of-bound access to UBO resutls in 0"), m_test_case(VALID)
+	, m_apiType(apiType)
+	, m_renderContext(DE_NULL)
 {
 	/* Nothing to be done here */
 }
 
 /** Constructor
  *
- * @param context Test context
+ * @param testCtx Test context
+ * @param apiType Api Type
  **/
-UniformBufferTest::UniformBufferTest(deqp::Context& context, const glw::GLchar* name, const glw::GLchar* description)
-	: TestCase(context, name, description), m_test_case(VALID)
+UniformBufferTest::UniformBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType, const glw::GLchar* name, const glw::GLchar* description)
+	: TestCase(testCtx, name, description), m_test_case(VALID)
+	, m_apiType(apiType)
+	, m_renderContext(DE_NULL)
 {
-	/* Nothing to be done */
+	/* Nothing to be done here */
 }
 
 /** Execute test
@@ -3646,7 +3681,10 @@
  **/
 tcu::TestNode::IterateResult UniformBufferTest::iterate()
 {
-	RobustnessEnabledContext context(m_context, m_testCtx.getCommandLine(), m_testCtx.getPlatform());
+	RobustnessEnabledContext context(m_testCtx, m_apiType);
+	m_renderContext = context.getRenderContext();
+	if (!m_renderContext)
+		return STOP;
 
 	static const GLfloat destination_data[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
 	/* The source buffer is packed std140 so we need vec4s */
@@ -3655,7 +3693,7 @@
 	};
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	/* Test result indicator */
 	bool test_result = true;
@@ -3664,9 +3702,9 @@
 	while (LAST != m_test_case)
 	{
 		/* Test case objects */
-		Buffer  destination_buffer(m_context);
-		Buffer  source_buffer(m_context);
-		Program program(m_context);
+		Buffer  destination_buffer(*m_renderContext);
+		Buffer  source_buffer(*m_renderContext);
+		Program program(*m_renderContext);
 
 		/* Compute Shader */
 		const std::string& cs = getComputeShader();
@@ -3709,14 +3747,15 @@
 	/* Set result */
 	if (true == test_result)
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_PASS, "Pass");
+		m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
 	}
 	else
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_FAIL, "Fail");
+		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
 	}
 
 	/* Done */
+	m_renderContext = DE_NULL;
 	return tcu::TestNode::STOP;
 }
 
@@ -3805,7 +3844,7 @@
 	/* Verify buffer data */
 	if (0 != memcmp(expected_data, buffer_data, size))
 	{
-		m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
+		m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
 											<< tcu::TestLog::EndMessage;
 		return false;
 	}
@@ -3818,9 +3857,10 @@
  *
  *  @param context Rendering context.
  **/
-RobustBufferAccessBehaviorTests::RobustBufferAccessBehaviorTests(deqp::Context& context)
-	: TestCaseGroup(context, "robust_buffer_access_behavior",
+RobustBufferAccessBehaviorTests::RobustBufferAccessBehaviorTests(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: TestCaseGroup(testCtx, "robust_buffer_access_behavior",
 					"Verifies \"robust buffer access behavior\" functionality")
+	, m_apiType(apiType)
 {
 	/* Left blank on purpose */
 }
@@ -3830,11 +3870,11 @@
  **/
 void RobustBufferAccessBehaviorTests::init(void)
 {
-	addChild(new RobustBufferAccessBehavior::VertexBufferObjectsTest(m_context));
-	addChild(new RobustBufferAccessBehavior::TexelFetchTest(m_context));
-	addChild(new RobustBufferAccessBehavior::ImageLoadStoreTest(m_context));
-	addChild(new RobustBufferAccessBehavior::StorageBufferTest(m_context));
-	addChild(new RobustBufferAccessBehavior::UniformBufferTest(m_context));
+	addChild(new RobustBufferAccessBehavior::VertexBufferObjectsTest(m_testCtx, m_apiType));
+	addChild(new RobustBufferAccessBehavior::TexelFetchTest(m_testCtx, m_apiType));
+	addChild(new RobustBufferAccessBehavior::ImageLoadStoreTest(m_testCtx, m_apiType));
+	addChild(new RobustBufferAccessBehavior::StorageBufferTest(m_testCtx, m_apiType));
+	addChild(new RobustBufferAccessBehavior::UniformBufferTest(m_testCtx, m_apiType));
 }
 
 } /* deqp */
diff --git a/external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.hpp b/external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.hpp
index 5ab2c0e..8f9a41a 100644
--- a/external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.hpp
+++ b/external/openglcts/modules/common/glcRobustBufferAccessBehaviorTests.hpp
@@ -47,7 +47,7 @@
 public:
 	/* Public methods */
 	/* Ctr & Dtr */
-	Buffer(deqp::Context& context);
+	Buffer(glu::RenderContext& renderContext);
 	~Buffer();
 
 	/* Init & Release */
@@ -80,7 +80,7 @@
 	/* Private enums */
 
 	/* Private fields */
-	deqp::Context& m_context;
+	glu::RenderContext& m_renderContext;
 	glw::GLenum	m_target;
 };
 
@@ -92,7 +92,7 @@
 public:
 	/* Public methods */
 	/* Ctr & Dtr */
-	Framebuffer(deqp::Context& context);
+	Framebuffer(glu::RenderContext& renderContext);
 	~Framebuffer();
 
 	/* Init & Release */
@@ -113,7 +113,7 @@
 
 private:
 	/* Private fields */
-	deqp::Context& m_context;
+	glu::RenderContext& m_renderContext;
 };
 
 /** Represents shader instance.
@@ -124,7 +124,7 @@
 public:
 	/* Public methods */
 	/* Ctr & Dtr */
-	Shader(deqp::Context& context);
+	Shader(glu::RenderContext& renderContext);
 	~Shader();
 
 	/* Init & Realese */
@@ -145,7 +145,7 @@
 
 private:
 	/* Private fields */
-	deqp::Context& m_context;
+	glu::RenderContext& m_renderContext;
 };
 
 /** Represents program instance.
@@ -156,7 +156,7 @@
 public:
 	/* Public methods */
 	/* Ctr & Dtr */
-	Program(deqp::Context& context);
+	Program(glu::RenderContext& renderContext);
 	~Program();
 
 	/* Init & Release */
@@ -191,7 +191,7 @@
 
 private:
 	/* Private fields */
-	deqp::Context& m_context;
+	glu::RenderContext& m_renderContext;
 };
 
 /** Represents texture instance
@@ -201,7 +201,7 @@
 public:
 	/* Public methods */
 	/* Ctr & Dtr */
-	Texture(deqp::Context& context);
+	Texture(glu::RenderContext& renderContext);
 	~Texture();
 
 	/* Init & Release */
@@ -245,7 +245,7 @@
 
 private:
 	/* Private fields */
-	deqp::Context& m_context;
+	glu::RenderContext& m_renderContext;
 };
 
 /** Represents Vertex array object
@@ -256,7 +256,7 @@
 public:
 	/* Public methods */
 	/* Ctr & Dtr */
-	VertexArray(deqp::Context& Context);
+	VertexArray(glu::RenderContext& renderContext);
 	~VertexArray();
 
 	/* Init & Release */
@@ -274,7 +274,7 @@
 
 private:
 	/* Private fields */
-	deqp::Context& m_context;
+	glu::RenderContext& m_renderContext;
 };
 
 /** Implementation of test VertexBufferObjects. Description follows:
@@ -323,12 +323,12 @@
  * - inspect contents of framebuffer, it is expected that it is filled with
  * value 1.
  **/
-class VertexBufferObjectsTest : public TestCase
+class VertexBufferObjectsTest : public tcu::TestCase
 {
 public:
 	/* Public methods */
-	VertexBufferObjectsTest(deqp::Context& context);
-	VertexBufferObjectsTest(deqp::Context& context, const char* name, const char* description);
+	VertexBufferObjectsTest(tcu::TestContext& testCtx, glu::ApiType apiType);
+	VertexBufferObjectsTest(tcu::TestContext& testCtx, glu::ApiType apiType, const char* name, const char* description);
 	virtual ~VertexBufferObjectsTest()
 	{
 	}
@@ -344,6 +344,9 @@
 	virtual bool verifyInvalidResults(glw::GLuint texture_id);
 	virtual bool verifyValidResults(glw::GLuint texture_id);
 	virtual bool verifyResults(glw::GLuint texture_id);
+
+	glu::ApiType m_apiType;
+	glu::RenderContext* m_renderContext;
 };
 
 /** Implementation of test TexelFetch. Description follows:
@@ -374,12 +377,12 @@
  * - a texture with 4 samples.
  **/
 
-class TexelFetchTest : public TestCase
+class TexelFetchTest : public tcu::TestCase
 {
 public:
 	/* Public methods */
-	TexelFetchTest(deqp::Context& context);
-	TexelFetchTest(deqp::Context& context, const glw::GLchar* name, const glw::GLchar* description);
+	TexelFetchTest(tcu::TestContext& testCtx, glu::ApiType apiType);
+	TexelFetchTest(tcu::TestContext& testCtx, glu::ApiType apiType, const char* name, const char* description);
 	virtual ~TexelFetchTest()
 	{
 	}
@@ -413,6 +416,8 @@
 
 	/* Protected fields */
 	TEST_CASES m_test_case;
+	glu::ApiType m_apiType;
+	glu::RenderContext* m_renderContext;
 
 protected:
 	/* Protected methods */
@@ -441,8 +446,8 @@
 {
 public:
 	/* Public methods */
-	ImageLoadStoreTest(deqp::Context& context);
-	ImageLoadStoreTest(deqp::Context& context, const char* name, const char* description);
+	ImageLoadStoreTest(tcu::TestContext& testCtx, glu::ApiType apiType);
+	ImageLoadStoreTest(tcu::TestContext& testCtx, glu::ApiType apiType, const char* name, const char* description);
 	virtual ~ImageLoadStoreTest()
 	{
 	}
@@ -484,12 +489,12 @@
  *   * value of src_index is equal to gl_LocalInvocationID.x + 16; It is
  *   expected that destination buffer will be filled with value 0.
  **/
-class StorageBufferTest : public TestCase
+class StorageBufferTest : public tcu::TestCase
 {
 public:
 	/* Public methods */
-	StorageBufferTest(deqp::Context& context);
-	StorageBufferTest(deqp::Context& context, const char* name, const char* description);
+	StorageBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType);
+	StorageBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType, const char* name, const char* description);
 	virtual ~StorageBufferTest()
 	{
 	}
@@ -515,6 +520,8 @@
 	/* Protected fields */
 	VERSION m_test_case;
 	bool m_hasKhrRobustBufferAccess;
+	glu::ApiType m_apiType;
+	glu::RenderContext* m_renderContext;
 
 	/* Protected constants */
 	static const glw::GLfloat m_destination_data[4];
@@ -530,12 +537,12 @@
  * - use uniform buffer for source instead of storage buffer;
  * - ignore the case with invalid value of dst_index.
  **/
-class UniformBufferTest : public TestCase
+class UniformBufferTest : public tcu::TestCase
 {
 public:
 	/* Public methods */
-	UniformBufferTest(deqp::Context& context);
-	UniformBufferTest(deqp::Context& context, const char* name, const char* description);
+	UniformBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType);
+	UniformBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType, const char* name, const char* description);
 	virtual ~UniformBufferTest()
 	{
 	}
@@ -559,21 +566,45 @@
 
 	/* Protected fields */
 	VERSION m_test_case;
+	glu::ApiType m_apiType;
+	glu::RenderContext* m_renderContext;
 };
+
+/** Class for creating robustness context */
+class RobustnessEnabledContext
+{
+public:
+
+	RobustnessEnabledContext(tcu::TestContext& testCtx, glu::ApiType apiType);
+
+	~RobustnessEnabledContext(void);
+
+	glu::RenderContext* getRenderContext() { return m_renderContext; }
+
+private:
+	tcu::TestContext&	m_testCtx;
+	glu::ApiType		m_apiType;
+	glu::RenderContext* m_renderContext;
+};
+
 } /* RobustBufferAccessBehavior */
 
 /** Group class for multi bind conformance tests */
-class RobustBufferAccessBehaviorTests : public deqp::TestCaseGroup
+class RobustBufferAccessBehaviorTests : public tcu::TestCaseGroup
 {
 public:
 	/* Public methods */
-	RobustBufferAccessBehaviorTests(deqp::Context& context);
+	RobustBufferAccessBehaviorTests(tcu::TestContext& testCtx, glu::ApiType apiType);
 	virtual ~RobustBufferAccessBehaviorTests(void)
 	{
 	}
 
 	virtual void init(void);
 
+protected:
+	/* Protected fields */
+	glu::ApiType m_apiType;
+
 private:
 	/* Private methods */
 	RobustBufferAccessBehaviorTests(const RobustBufferAccessBehaviorTests& other);
diff --git a/external/openglcts/modules/common/glcRobustnessTests.cpp b/external/openglcts/modules/common/glcRobustnessTests.cpp
index ac8e251..3f8573d 100644
--- a/external/openglcts/modules/common/glcRobustnessTests.cpp
+++ b/external/openglcts/modules/common/glcRobustnessTests.cpp
@@ -283,7 +283,7 @@
 	bool test_result = true;
 
 	/* Iterate over all cases */
-	Program program(*context);
+	Program program(renderContext);
 
 	/* Compute Shader */
 	bool			   glslES320 = contextSupports(renderContext.getType(), glu::ApiType::es(3, 2));
@@ -530,14 +530,15 @@
 	static const GLuint n_vertices = 24;
 
 	/* GL entry points */
-	const Functions& gl = context->getRenderContext().getFunctions();
+	glu::RenderContext& renderContext = context->getRenderContext();
+	const Functions& gl = renderContext.getFunctions();
 
 	/* Test case objects */
-	Program		program(*context);
-	Texture		texture(*context);
-	Buffer		elements_buffer(*context);
-	Buffer		vertices_buffer(*context);
-	VertexArray vao(*context);
+	Program		program(renderContext);
+	Texture		texture(renderContext);
+	Buffer		elements_buffer(renderContext);
+	Buffer		vertices_buffer(renderContext);
+	VertexArray vao(renderContext);
 
 	/* Vertex array initialization */
 	VertexArray::Generate(gl, vao.m_id);
diff --git a/external/openglcts/modules/gl/gl4cTestPackages.cpp b/external/openglcts/modules/gl/gl4cTestPackages.cpp
index 4bc5887..a559594 100644
--- a/external/openglcts/modules/gl/gl4cTestPackages.cpp
+++ b/external/openglcts/modules/gl/gl4cTestPackages.cpp
@@ -72,7 +72,6 @@
 #include "glcInfoTests.hpp"
 #include "glcParallelShaderCompileTests.hpp"
 #include "glcPolygonOffsetClampTests.hpp"
-#include "glcRobustBufferAccessBehaviorTests.hpp"
 #include "glcSampleVariablesTests.hpp"
 #include "glcSeparableProgramsTransformFeedbackTests.hpp"
 #include "glcShaderConstExprTests.hpp"
@@ -231,7 +230,6 @@
 		addChild(new glcts::DrawIndirectTestsGL43(getContext()));
 		addChild(new gl4cts::ProgramInterfaceQueryTests(getContext()));
 		addChild(new gl4cts::ComputeShaderTests(getContext()));
-		addChild(new deqp::RobustBufferAccessBehaviorTests(getContext()));
 		addChild(new gl4cts::ShaderStorageBufferObjectTests(getContext()));
 		addChild(new gl4cts::VertexAttribBindingTests(getContext()));
 		addChild(new gl4cts::ShaderImageSizeTests(getContext()));
diff --git a/external/openglcts/modules/gles32/es32cRobustBufferAccessBehaviorTests.cpp b/external/openglcts/modules/gles32/es32cRobustBufferAccessBehaviorTests.cpp
index 1fcdeb2..da15134 100644
--- a/external/openglcts/modules/gles32/es32cRobustBufferAccessBehaviorTests.cpp
+++ b/external/openglcts/modules/gles32/es32cRobustBufferAccessBehaviorTests.cpp
@@ -48,9 +48,9 @@
  *
  * @param context Test context
  **/
-VertexBufferObjectsTest::VertexBufferObjectsTest(deqp::Context& context)
+VertexBufferObjectsTest::VertexBufferObjectsTest(tcu::TestContext& testCtx, glu::ApiType apiType)
 	: deqp::RobustBufferAccessBehavior::VertexBufferObjectsTest(
-		  context, "vertex_buffer_objects", "Verifies that out-of-bound reads from VB result in zero")
+		  testCtx, apiType, "vertex_buffer_objects", "Verifies that out-of-bound reads from VB result in zero")
 {
 	/* Nothing to be done */
 }
@@ -122,7 +122,7 @@
 	static const GLuint width	  = 8;
 	static const GLuint pixel_size = 4 * sizeof(GLuint);
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	const GLint buf_size = width * height * pixel_size;
 	GLubyte		pixels[buf_size];
@@ -140,7 +140,7 @@
 	{
 		if (1 != pixels[i])
 		{
-			m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)pixels[i]
+			m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)pixels[i]
 												<< " at offset: " << i << tcu::TestLog::EndMessage;
 
 			return false;
@@ -154,15 +154,15 @@
  *
  * @param context Test context
  **/
-TexelFetchTest::TexelFetchTest(deqp::Context& context)
-	: deqp::RobustBufferAccessBehavior::TexelFetchTest(context, "texel_fetch",
+TexelFetchTest::TexelFetchTest(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: deqp::RobustBufferAccessBehavior::TexelFetchTest(testCtx, apiType, "texel_fetch",
 													   "Verifies that out-of-bound fetches from texture result in zero")
 {
 	/* Nothing to be done */
 }
 
-TexelFetchTest::TexelFetchTest(deqp::Context& context, const glw::GLchar* name, const glw::GLchar* description)
-	: deqp::RobustBufferAccessBehavior::TexelFetchTest(context, name, description)
+TexelFetchTest::TexelFetchTest(tcu::TestContext& testCtx, glu::ApiType apiType, const glw::GLchar* name, const glw::GLchar* description)
+	: deqp::RobustBufferAccessBehavior::TexelFetchTest(testCtx, apiType, name, description)
 {
 	/* Nothing to be done */
 }
@@ -326,7 +326,7 @@
 	static const GLuint image_width  = 16;
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	/* Texture storage parameters */
 	GLuint  height			= image_height;
@@ -458,7 +458,7 @@
 								  "}\n"
 								  "\n";
 
-		Program program(m_context);
+		Program program(*m_renderContext);
 		program.Init(cs, "", "", "", "", "");
 		program.Use();
 
@@ -497,7 +497,7 @@
 	static const GLuint width	= 16;
 	static const GLuint n_pixels = height * width;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	bool result = true;
 
@@ -527,7 +527,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << (GLuint)drawn_red
 													<< ". Expected value: " << (GLuint)expected_red
 													<< " at offset: " << i << tcu::TestLog::EndMessage;
 
@@ -565,7 +565,7 @@
 
 			if ((expected_red != drawn_red) || (expected_green != drawn_green))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << (GLint)drawn_red << ", " << (GLint)drawn_green
 					<< ". Expected value: " << (GLint)expected_red << ", " << (GLint)expected_green
 					<< ". At offset: " << i << tcu::TestLog::EndMessage;
@@ -611,7 +611,7 @@
 			if ((expected_red != drawn_red) || (expected_green != drawn_green) || (expected_blue != drawn_blue) ||
 				(expected_alpha != drawn_alpha))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << drawn_red << ", " << drawn_green << ", "
 					<< drawn_blue << ", " << drawn_alpha << ". Expected value: " << expected_red << ", "
 					<< expected_green << ", " << expected_blue << ", " << expected_alpha << ". At offset: " << i
@@ -645,7 +645,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -688,8 +688,8 @@
 			"}\n"
 			"\n";
 
-		Program program(m_context);
-		Texture destination_texture(m_context);
+		Program program(*m_renderContext);
+		Texture destination_texture(*m_renderContext);
 
 		Texture::Generate(gl, destination_texture.m_id);
 		Texture::Bind(gl, destination_texture.m_id, GL_TEXTURE_2D);
@@ -729,7 +729,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -746,8 +746,8 @@
  *
  * @param context Test context
  **/
-ImageLoadStoreTest::ImageLoadStoreTest(deqp::Context& context)
-	: TexelFetchTest(context, "image_load_store", "Verifies that out-of-bound to image result in zero or is discarded")
+ImageLoadStoreTest::ImageLoadStoreTest(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: TexelFetchTest(testCtx, apiType, "image_load_store", "Verifies that out-of-bound to image result in zero or is discarded")
 {
 	/* start from RGBA32F as R8, R32UI_MULTISAMPLE and R8_SNORM are not supported under GLES */
 	m_test_case = RGBA32F;
@@ -759,12 +759,17 @@
  **/
 tcu::TestNode::IterateResult ImageLoadStoreTest::iterate()
 {
+	RobustnessEnabledContext context(m_testCtx, m_apiType);
+	m_renderContext = context.getRenderContext();
+	if (!m_renderContext)
+		return STOP;
+
 	/* Constants */
 	static const GLuint height = 16;
 	static const GLuint width  = 16;
 
 	/* GL entry points */
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	/* Test result indicator */
 	bool test_result = true;
@@ -776,11 +781,11 @@
 		bool case_result = true;
 
 		/* Test case objects */
-		Texture destination_texture(m_context);
-		Program invalid_destination_program(m_context);
-		Program invalid_source_program(m_context);
-		Texture source_texture(m_context);
-		Program valid_program(m_context);
+		Texture destination_texture(*m_renderContext);
+		Program invalid_destination_program(*m_renderContext);
+		Program invalid_source_program(*m_renderContext);
+		Texture source_texture(*m_renderContext);
+		Program valid_program(*m_renderContext);
 
 		const std::string& cs_invalid_destination = getComputeShader(DESTINATION_INVALID);
 		const std::string& cs_invalid_source	  = getComputeShader(SOURCE_INVALID);
@@ -854,7 +859,7 @@
 		/* Set test result */
 		if (false == case_result)
 		{
-			m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
+			m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << getTestCaseName()
 												<< " failed" << tcu::TestLog::EndMessage;
 
 			test_result = false;
@@ -867,11 +872,11 @@
 	/* Set result */
 	if (true == test_result)
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_PASS, "Pass");
+		m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
 	}
 	else
 	{
-		m_context.getTestContext().setTestResult(QP_TEST_RESULT_FAIL, "Fail");
+		m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
 	}
 
 	/* Done */
@@ -989,7 +994,7 @@
  **/
 void ImageLoadStoreTest::setTextures(glw::GLuint id_destination, glw::GLuint id_source)
 {
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 
 	GLenum format = 0;
 	GLint  level  = 0;
@@ -1039,7 +1044,7 @@
 	static const GLuint width	= 16;
 	static const GLuint n_pixels = height * width;
 
-	const Functions& gl = m_context.getRenderContext().getFunctions();
+	const Functions& gl = m_renderContext->getFunctions();
 	gl.memoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT);
 	GLU_EXPECT_NO_ERROR(gl.getError(), "MemoryBarrier");
 
@@ -1081,7 +1086,7 @@
 			if ((expected_red != drawn_red) || (expected_green != drawn_green) || (expected_blue != drawn_blue) ||
 				(expected_alpha != drawn_alpha))
 			{
-				m_context.getTestContext().getLog()
+				m_testCtx.getLog()
 					<< tcu::TestLog::Message << "Invalid value: " << drawn_red << ", " << drawn_green << ", "
 					<< drawn_blue << ", " << drawn_alpha << ". Expected value: " << expected_red << ", "
 					<< expected_green << ", " << expected_blue << ", " << expected_alpha << ". At offset: " << i
@@ -1118,7 +1123,7 @@
 
 			if (expected_red != drawn_red)
 			{
-				m_context.getTestContext().getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
+				m_testCtx.getLog() << tcu::TestLog::Message << "Invalid value: " << drawn_red
 													<< ". Expected value: " << expected_red << " at offset: " << i
 													<< tcu::TestLog::EndMessage;
 
@@ -1135,9 +1140,9 @@
  *
  * @param context Test context
  **/
-StorageBufferTest::StorageBufferTest(deqp::Context& context)
+StorageBufferTest::StorageBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType)
 	: deqp::RobustBufferAccessBehavior::StorageBufferTest(
-		  context, "storage_buffer", "Verifies that out-of-bound access to SSBO results with no error")
+		  testCtx, apiType, "storage_buffer", "Verifies that out-of-bound access to SSBO results with no error")
 {
 	/* Nothing to be done here */
 }
@@ -1245,7 +1250,7 @@
 	/* Verify buffer data */
 	if (m_test_case == VALID && memcmp(expected_data, buffer_data, size) != 0)
 	{
-		m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
+		m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
 											<< tcu::TestLog::EndMessage;
 		return false;
 	}
@@ -1257,9 +1262,9 @@
  *
  * @param context Test context
  **/
-UniformBufferTest::UniformBufferTest(deqp::Context& context)
+UniformBufferTest::UniformBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType)
 	: deqp::RobustBufferAccessBehavior::UniformBufferTest(
-		  context, "uniform_buffer", "Verifies that out-of-bound access to UBO resutls with no error")
+		  testCtx, apiType, "uniform_buffer", "Verifies that out-of-bound access to UBO resutls with no error")
 {
 	/* Nothing to be done here */
 }
@@ -1358,7 +1363,7 @@
 	/* Verify buffer data */
 	if (m_test_case == VALID && memcmp(expected_data, buffer_data, size) != 0)
 	{
-		m_context.getTestContext().getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
+		m_testCtx.getLog() << tcu::TestLog::Message << "Test case: " << name << " failed"
 											<< tcu::TestLog::EndMessage;
 		return false;
 	}
@@ -1372,8 +1377,8 @@
  *
  *  @param context Rendering context.
  **/
-RobustBufferAccessBehaviorTests::RobustBufferAccessBehaviorTests(deqp::Context& context)
-	: deqp::RobustBufferAccessBehaviorTests(context)
+RobustBufferAccessBehaviorTests::RobustBufferAccessBehaviorTests(tcu::TestContext& testCtx, glu::ApiType apiType)
+	: deqp::RobustBufferAccessBehaviorTests(testCtx, apiType)
 {
 	/* Left blank on purpose */
 }
@@ -1383,11 +1388,11 @@
  **/
 void RobustBufferAccessBehaviorTests::init(void)
 {
-	addChild(new RobustBufferAccessBehavior::VertexBufferObjectsTest(m_context));
-	addChild(new RobustBufferAccessBehavior::TexelFetchTest(m_context));
-	addChild(new RobustBufferAccessBehavior::ImageLoadStoreTest(m_context));
-	addChild(new RobustBufferAccessBehavior::StorageBufferTest(m_context));
-	addChild(new RobustBufferAccessBehavior::UniformBufferTest(m_context));
+	addChild(new RobustBufferAccessBehavior::VertexBufferObjectsTest(m_testCtx, m_apiType));
+	addChild(new RobustBufferAccessBehavior::TexelFetchTest(m_testCtx, m_apiType));
+	addChild(new RobustBufferAccessBehavior::ImageLoadStoreTest(m_testCtx, m_apiType));
+	addChild(new RobustBufferAccessBehavior::StorageBufferTest(m_testCtx, m_apiType));
+	addChild(new RobustBufferAccessBehavior::UniformBufferTest(m_testCtx, m_apiType));
 }
 
 } /* es32cts namespace */
diff --git a/external/openglcts/modules/gles32/es32cRobustBufferAccessBehaviorTests.hpp b/external/openglcts/modules/gles32/es32cRobustBufferAccessBehaviorTests.hpp
index c349995..9a27432 100644
--- a/external/openglcts/modules/gles32/es32cRobustBufferAccessBehaviorTests.hpp
+++ b/external/openglcts/modules/gles32/es32cRobustBufferAccessBehaviorTests.hpp
@@ -46,7 +46,7 @@
 {
 public:
 	/* Public methods */
-	VertexBufferObjectsTest(deqp::Context& context);
+	VertexBufferObjectsTest(tcu::TestContext& testCtx, glu::ApiType apiType);
 	virtual ~VertexBufferObjectsTest()
 	{
 	}
@@ -72,8 +72,8 @@
 {
 public:
 	/* Public methods */
-	TexelFetchTest(deqp::Context& context);
-	TexelFetchTest(deqp::Context& context, const glw::GLchar* name, const glw::GLchar* description);
+	TexelFetchTest(tcu::TestContext& testCtx, glu::ApiType apiType);
+	TexelFetchTest(tcu::TestContext& testCtx, glu::ApiType apiType, const glw::GLchar* name, const glw::GLchar* description);
 	virtual ~TexelFetchTest()
 	{
 	}
@@ -102,7 +102,7 @@
 {
 public:
 	/* Public methods */
-	ImageLoadStoreTest(deqp::Context& context);
+	ImageLoadStoreTest(tcu::TestContext& testCtx, glu::ApiType apiType);
 	virtual ~ImageLoadStoreTest()
 	{
 	}
@@ -126,7 +126,7 @@
 {
 public:
 	/* Public methods */
-	StorageBufferTest(deqp::Context& context);
+	StorageBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType);
 	virtual ~StorageBufferTest()
 	{
 	}
@@ -149,7 +149,7 @@
 {
 public:
 	/* Public methods */
-	UniformBufferTest(deqp::Context& context);
+	UniformBufferTest(tcu::TestContext& testCtx, glu::ApiType apiType);
 	virtual ~UniformBufferTest()
 	{
 	}
@@ -170,7 +170,7 @@
 {
 public:
 	/* Public methods */
-	RobustBufferAccessBehaviorTests(deqp::Context& context);
+	RobustBufferAccessBehaviorTests(tcu::TestContext& testCtx, glu::ApiType apiType);
 	virtual ~RobustBufferAccessBehaviorTests(void)
 	{
 	}
diff --git a/external/openglcts/modules/gles32/es32cTestPackage.cpp b/external/openglcts/modules/gles32/es32cTestPackage.cpp
index 2a9a5a9..a3ce66c 100644
--- a/external/openglcts/modules/gles32/es32cTestPackage.cpp
+++ b/external/openglcts/modules/gles32/es32cTestPackage.cpp
@@ -23,7 +23,6 @@
  */ /*-------------------------------------------------------------------*/
 
 #include "es32cTestPackage.hpp"
-#include "es32cRobustBufferAccessBehaviorTests.hpp"
 #include "esextcTestPackage.hpp"
 #include "glcFragDepthTests.hpp"
 #include "glcInfoTests.hpp"
@@ -159,9 +158,6 @@
 		coreGroup->addChild(new glcts::ShaderConstExprTests(getContext()));
 		coreGroup->addChild(new glcts::SeparableProgramsTransformFeedbackTests(getContext()));
 		addChild(coreGroup);
-		tcu::TestCaseGroup* robustGroup = new tcu::TestCaseGroup(getTestContext(), "robust", "");
-		robustGroup->addChild(new es32cts::RobustBufferAccessBehaviorTests(getContext()));
-		addChild(robustGroup);
 	}
 	catch (...)
 	{