OSDN Git Service

gles: use new symbols check script
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 11 Oct 2018 13:46:34 +0000 (14:46 +0100)
committerEric Engestrom <eric@engestrom.ch>
Wed, 10 Jul 2019 11:27:51 +0000 (11:27 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mapi/es1api/gles1-symbols.txt [moved from src/mapi/es1api/ABI-check with 81% similarity, mode: 0644]
src/mapi/es1api/meson.build
src/mapi/es2api/gles2-symbols.txt [moved from src/mapi/es2api/ABI-check with 93% similarity, mode: 0644]
src/mapi/es2api/meson.build

old mode 100755 (executable)
new mode 100644 (file)
similarity index 81%
rename from src/mapi/es1api/ABI-check
rename to src/mapi/es1api/gles1-symbols.txt
index e9a2cb2..935b9d5
@@ -1,29 +1,7 @@
-#!/bin/sh
-set -eu
-
-# Print defined gl.* functions not in GL ES 1.1
+# gl.* functions in GL ES 1.1
 # or in extensions that are part of the ES 1.1 extension pack.
 # (see http://www.khronos.org/registry/gles/specs/1.1/opengles_spec_1_1_extension_pack.pdf)
 
-case "$(uname)" in
-Darwin)
-  LIB=${1-es1api/.libs/libGLESv1_CM.dylib}
-  ;;
-CYGWIN*)
-  LIB=${1-es1api/.libs/cygGLESv1_CM-1.dll}
-  ;;
-*)
-  LIB=${1-es1api/.libs/libGLESv1_CM.so.1}
-  ;;
-esac
-
-if ! [ -f "$LIB" ]
-then
-  exit 1
-fi
-
-FUNCS=$($NM -D --defined-only $LIB | grep -o 'T gl.*' | cut -c 3- | while read func; do
-( grep -q "^$func$" || echo $func )  <<EOF
 glActiveTexture
 glAlphaFunc
 glAlphaFuncx
@@ -169,8 +147,3 @@ glTranslatef
 glTranslatex
 glVertexPointer
 glViewport
-EOF
-done)
-
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
index 53bdc16..150f62f 100644 (file)
@@ -55,9 +55,12 @@ pkg.generate(
 if with_tests and prog_nm.found()
   test(
     'es1-ABI-check',
-    find_program('ABI-check'),
-    env : env_test,
-    args : libglesv1_cm,
+    symbols_check,
+    args : [
+      '--lib', libglesv1_cm,
+      '--symbols-file', files('gles1-symbols.txt'),
+      '--nm', prog_nm.path(),
+    ],
     suite : ['mapi'],
   )
 endif
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from src/mapi/es2api/ABI-check
rename to src/mapi/es2api/gles2-symbols.txt
index e709c8c..92d8e9a
@@ -1,27 +1,5 @@
-#!/bin/sh
-set -eu
+# gl.* functions in GL ES 2 and 3.{0..2}
 
-# Print defined gl.* functions not in GL ES 3.{0..2}
-
-case "$(uname)" in
-Darwin)
-  LIB=${1-es2api/.libs/libGLESv2.dylib}
-  ;;
-CYGWIN*)
-  LIB=${1-es2api/.libs/cygGLESv2-2.dll}
-  ;;
-*)
-  LIB=${1-es2api/.libs/libGLESv2.so.2}
-  ;;
-esac
-
-if ! [ -f "$LIB" ]
-then
-  exit 1
-fi
-
-FUNCS=$($NM -D --defined-only $LIB | grep -o 'T gl.*' | cut -c 3- | while read func; do
-( grep -q "^$func$" || echo $func )  <<EOF
 glActiveShaderProgram
 glActiveTexture
 glAttachShader
@@ -380,8 +358,3 @@ glVertexAttribPointer
 glVertexBindingDivisor
 glViewport
 glWaitSync
-EOF
-done)
-
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
index d374bd8..97e4ad2 100644 (file)
@@ -55,9 +55,12 @@ pkg.generate(
 if with_tests and prog_nm.found()
   test(
     'es2-ABI-check',
-    find_program('ABI-check'),
-    env : env_test,
-    args : libgles2,
+    symbols_check,
+    args : [
+      '--lib', libgles2,
+      '--symbols-file', files('gles2-symbols.txt'),
+      '--nm', prog_nm.path(),
+    ],
     suite : ['mapi'],
   )
 endif