[Piglit] Fwd: [PATCH 1/1] glsl: add explicit version 100 support

Tom Gall tom.gall at linaro.org
Tue Feb 5 13:22:32 PST 2013


Nearly two weeks since this was posted. Any reason this shouldn't go it?

Thanks!

---------- Forwarded message ----------
From: Tom Gall <tom.gall at linaro.org>
Date: Wed, Jan 23, 2013 at 2:48 PM
Subject: [PATCH 1/1] glsl: add explicit version 100 support
To: piglit at lists.freedesktop.org
Cc: patches at linaro.org, Tom Gall <tom.gall at linaro.org>


This is a small change to add explicit support for glsl
version 100 which is used by OpenGL ES 2. This allows for
100 to be passed on the command line.

In glslparsertest.c add 100 to the list of versions processed
by the switch. Also when version 100 is used, check for gles
and if running as gles don't require the
GL_ARB_ES2_compatibility extension.

In CMakeList.gles2.txt remove ${OPENGL_gles2_LIBRARY} as it's
not needed.

v2: detach patch from proposed python change.

Signed-off-by: Tom Gall <tom.gall at linaro.org>
---
 tests/glslparsertest/CMakeLists.gles2.txt |    5 +----
 tests/glslparsertest/glslparsertest.c     |    6 +++++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/glslparsertest/CMakeLists.gles2.txt
b/tests/glslparsertest/CMakeLists.gles2.txt
index 1e37bed..5b437f8 100644
--- a/tests/glslparsertest/CMakeLists.gles2.txt
+++ b/tests/glslparsertest/CMakeLists.gles2.txt
@@ -1,10 +1,7 @@
 link_libraries(
        piglitutil_${piglit_target_api}
-       ${OPENGL_gles2_LIBRARY}
        )

-piglit_add_executable(glslparsertest_${piglit_target_api}
-       glslparsertest.c
-       )
+piglit_add_executable(glslparsertest_${piglit_target_api} glslparsertest.c)

 # vim: ft=cmake:
diff --git a/tests/glslparsertest/glslparsertest.c
b/tests/glslparsertest/glslparsertest.c
index ff32da7..c91a56b 100644
--- a/tests/glslparsertest/glslparsertest.c
+++ b/tests/glslparsertest/glslparsertest.c
@@ -43,6 +43,10 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
                const unsigned int int_version = parse_glsl_version(argv[3]);

                switch (int_version) {
+               case 100:
+                       config.supports_gl_compat_version = 10;
+                       config.supports_gl_es_version = 20;
+                       break;
                case 110:
                case 120:
                case 130:
@@ -351,7 +355,7 @@ piglit_init(int argc, char**argv)
        if (glsl_version_string != NULL)
                glsl_version = parse_glsl_version(glsl_version_string);

-       if (requested_version == 100) {
+       if (!piglit_is_gles() && requested_version == 100) {
                piglit_require_extension("GL_ARB_ES2_compatibility");
        } else if (requested_version == 300) {
                piglit_require_extension("GL_ARB_ES3_compatibility");
--
1.7.10.4



-- 
Regards,
Tom

"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Tech Lead, Graphics Working Group | Linaro.org │ Open source software
for ARM SoCs
w) tom.gall att linaro.org
h) tom_gall att mac.com


More information about the Piglit mailing list