[v2,08/15] nv_conditional_render: port trivial tests to gles2

Submitted by Erik Faye-Lund on Nov. 7, 2018, 9:14 p.m.

Details

Message ID 20181107211420.7355-9-erik.faye-lund@collabora.com
State New
Headers show

Not browsing as part of any series.

Patch hide | download patch | download mbox

diff --git a/tests/opengl.py b/tests/opengl.py
index b74606be1..b3a624512 100644
--- a/tests/opengl.py
+++ b/tests/opengl.py
@@ -3801,7 +3801,9 @@  with profile.test_list.group_manager(
         PiglitGLTest,
         grouptools.join('spec', 'nv_conditional_render')) as g:
     g(['nv_conditional_render-begin-while-active'], 'begin-while-active')
+    g(['nv_conditional_render-begin-while-active_gles2'], 'begin-while-active_gles2')
     g(['nv_conditional_render-begin-zero'], 'begin-zero')
+    g(['nv_conditional_render-begin-zero_gles2'], 'begin-zero_gles2')
     g(['nv_conditional_render-bitmap'], 'bitmap')
     g(['nv_conditional_render-blitframebuffer'], 'blitframebuffer')
     g(['nv_conditional_render-clear'], 'clear')
diff --git a/tests/spec/nv_conditional_render/CMakeLists.gles2.txt b/tests/spec/nv_conditional_render/CMakeLists.gles2.txt
new file mode 100644
index 000000000..227134cd0
--- /dev/null
+++ b/tests/spec/nv_conditional_render/CMakeLists.gles2.txt
@@ -0,0 +1,6 @@ 
+link_libraries(piglitutil_${piglit_target_api})
+
+piglit_add_executable (nv_conditional_render-begin-while-active_gles2 begin-while-active.c common.c)
+piglit_add_executable (nv_conditional_render-begin-zero_gles2 begin-zero.c)
+
+# vim: ft=cmake:
diff --git a/tests/spec/nv_conditional_render/begin-while-active.c b/tests/spec/nv_conditional_render/begin-while-active.c
index 36a1b4070..6d68752bc 100644
--- a/tests/spec/nv_conditional_render/begin-while-active.c
+++ b/tests/spec/nv_conditional_render/begin-while-active.c
@@ -43,7 +43,11 @@ 
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
+#ifdef PIGLIT_USE_OPENGL
 	config.supports_gl_compat_version = 10;
+#else // PIGLIT_USE_OPENGL_ES2
+	config.supports_gl_es_version = 20;
+#endif
 
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA;
 	config.khr_no_error_support = PIGLIT_HAS_ERRORS;
diff --git a/tests/spec/nv_conditional_render/begin-zero.c b/tests/spec/nv_conditional_render/begin-zero.c
index 85304643c..1afdf7ddd 100644
--- a/tests/spec/nv_conditional_render/begin-zero.c
+++ b/tests/spec/nv_conditional_render/begin-zero.c
@@ -40,7 +40,12 @@ 
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
+#ifdef PIGLIT_USE_OPENGL
 	config.supports_gl_compat_version = 10;
+#else // PIGLIT_USE_OPENGL_ES2
+	config.supports_gl_es_version = 20;
+#endif
+
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA;
 	config.khr_no_error_support = PIGLIT_HAS_ERRORS;