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

Erik Faye-Lund erik.faye-lund at collabora.com
Wed Nov 7 21:14:13 UTC 2018


These two tests are trivial to port to GLES 2. So let's do this to get
some test-coverage for nv_conditional_render on OpenGL ES.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
---
 tests/opengl.py                                       | 2 ++
 tests/spec/nv_conditional_render/CMakeLists.gles2.txt | 6 ++++++
 tests/spec/nv_conditional_render/begin-while-active.c | 4 ++++
 tests/spec/nv_conditional_render/begin-zero.c         | 5 +++++
 4 files changed, 17 insertions(+)
 create mode 100644 tests/spec/nv_conditional_render/CMakeLists.gles2.txt

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;
 
-- 
2.19.1



More information about the Piglit mailing list