summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-09-22 16:33:42 +0200
committerChad Versace <chad.versace@linux.intel.com>2012-10-09 19:08:30 -0700
commitd39eca2b85d60540d6099150ca1eea9c14afef23 (patch)
tree920bf62953617fe8c3ec121e39ca9903f068e17f
parent074a6d54f5a7fa4c88a31f826ee517b4601b1e61 (diff)
cmake: Prefix cmake options and feature macros with PIGLIT
Some cmake options and features macros had form USE_${feature}, others BUILD_${category}_TESTS. This patch consistently prefixes all such options and macros with PIGLIT. Piglit, be a good code citizen. Namespace your variables. This patch was created with find . -type f | xargs sed -i \ -e 's/\(^\|[^_]\)\(USE_\(GLX\|GLUT\|WAFFLE\|OPENGL\|OPENGL_ES1\|OPENGL_ES2\)\)\($\|[^_]\)/\1PIGLIT_\2\4/g' \ -e 's/\(^\|[^_]\)\(BUILD_\(CL\|GLX\|GLES1\|GLES2\)_TESTS\)\($\|[^_]\)/\1PIGLIT_\2\4/g' \ Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--CMakeLists.txt36
-rw-r--r--cmake/target_api/CMakeLists.txt12
-rw-r--r--cmake/target_api/gl/CMakeLists.txt10
-rw-r--r--cmake/target_api/gles1/CMakeLists.txt2
-rw-r--r--cmake/target_api/gles2/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/piglit/gl_wrap.h8
-rw-r--r--src/piglit/glut_wrap.h6
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/fbo/CMakeLists.gl.txt4
-rw-r--r--tests/general/CMakeLists.gl.txt4
-rw-r--r--tests/glslparsertest/glslparsertest.c8
-rw-r--r--tests/glx/CMakeLists.gl.txt8
-rw-r--r--tests/spec/glx_arb_create_context/CMakeLists.gl.txt8
-rw-r--r--tests/spec/glx_ext_import_context/CMakeLists.gl.txt8
-rw-r--r--tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c4
-rw-r--r--tests/util/CMakeLists.gl.txt6
-rw-r--r--tests/util/piglit-framework-fbo.c18
-rw-r--r--tests/util/piglit-framework-glut.c14
-rw-r--r--tests/util/piglit-shader-gl.c4
-rw-r--r--tests/util/piglit-shader-gles1.c4
-rw-r--r--tests/util/piglit-shader-gles2.c4
-rw-r--r--tests/util/piglit-shader.c2
-rw-r--r--tests/util/piglit-shader.h4
-rw-r--r--tests/util/piglit-util-gl-common.c6
-rw-r--r--tests/util/piglit-util-gl-enum.c8
-rw-r--r--tests/util/piglit-util-gles.c8
-rw-r--r--tests/util/piglit_ktx.c6
28 files changed, 106 insertions, 106 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b2be79e2..b30f483e1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,37 +17,37 @@ find_package(PNG REQUIRED)
find_package(X11)
-option(BUILD_GLES1_TESTS "Build tests for OpenGL ES1" OFF)
-option(BUILD_GLES2_TESTS "Build tests for OpenGL ES2" OFF)
-option(BUILD_CL_TESTS "Build tests for OpenCL" OFF)
+option(PIGLIT_BUILD_GLES1_TESTS "Build tests for OpenGL ES1" OFF)
+option(PIGLIT_BUILD_GLES2_TESTS "Build tests for OpenGL ES2" OFF)
+option(PIGLIT_BUILD_CL_TESTS "Build tests for OpenCL" OFF)
-option(USE_WAFFLE "Use Waffle in place of GLUT" OFF)
-if(USE_WAFFLE)
+option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" OFF)
+if(PIGLIT_USE_WAFFLE)
pkg_check_modules(WAFFLE REQUIRED waffle-1>=1.0.1)
- add_definitions(-DUSE_WAFFLE)
+ add_definitions(-DPIGLIT_USE_WAFFLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WAFFLE_CFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WAFFLE_CFLAGS}")
-endif(USE_WAFFLE)
+endif(PIGLIT_USE_WAFFLE)
-if(BUILD_GLES1_TESTS AND NOT USE_WAFFLE)
- message(FATAL_ERROR "Option BUILD_GLES1_TESTS requires USE_WAFFLE")
-endif(BUILD_GLES1_TESTS AND NOT USE_WAFFLE)
+if(PIGLIT_BUILD_GLES1_TESTS AND NOT PIGLIT_USE_WAFFLE)
+ message(FATAL_ERROR "Option PIGLIT_BUILD_GLES1_TESTS requires PIGLIT_USE_WAFFLE")
+endif(PIGLIT_BUILD_GLES1_TESTS AND NOT PIGLIT_USE_WAFFLE)
-if(BUILD_GLES2_TESTS AND NOT USE_WAFFLE)
- message(FATAL_ERROR "Option BUILD_GLES2_TESTS requires USE_WAFFLE")
-endif(BUILD_GLES2_TESTS AND NOT USE_WAFFLE)
+if(PIGLIT_BUILD_GLES2_TESTS AND NOT PIGLIT_USE_WAFFLE)
+ message(FATAL_ERROR "Option PIGLIT_BUILD_GLES2_TESTS requires PIGLIT_USE_WAFFLE")
+endif(PIGLIT_BUILD_GLES2_TESTS AND NOT PIGLIT_USE_WAFFLE)
-if(BUILD_CL_TESTS)
+if(PIGLIT_BUILD_CL_TESTS)
find_package(OpenCL REQUIRED)
-endif(BUILD_CL_TESTS)
+endif(PIGLIT_BUILD_CL_TESTS)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(-DPIGLIT_HAS_X11)
- option(BUILD_GLX_TESTS "Build tests that require GLX" ON)
+ option(PIGLIT_BUILD_GLX_TESTS "Build tests that require GLX" ON)
ELSE()
- option(BUILD_GLX_TESTS "Build tests that require GLX" OFF)
+ option(PIGLIT_BUILD_GLX_TESTS "Build tests that require GLX" OFF)
ENDIF()
-IF(BUILD_GLX_TESTS)
+IF(PIGLIT_BUILD_GLX_TESTS)
pkg_check_modules(GLPROTO REQUIRED glproto)
ENDIF()
diff --git a/cmake/target_api/CMakeLists.txt b/cmake/target_api/CMakeLists.txt
index d3e23f9ff..c5e0b904f 100644
--- a/cmake/target_api/CMakeLists.txt
+++ b/cmake/target_api/CMakeLists.txt
@@ -25,14 +25,14 @@ add_subdirectory(no_api)
add_subdirectory(gl)
-if(BUILD_GLES1_TESTS)
+if(PIGLIT_BUILD_GLES1_TESTS)
add_subdirectory(gles1)
-endif(BUILD_GLES1_TESTS)
+endif(PIGLIT_BUILD_GLES1_TESTS)
-if(BUILD_GLES2_TESTS)
+if(PIGLIT_BUILD_GLES2_TESTS)
add_subdirectory(gles2)
-endif(BUILD_GLES2_TESTS)
+endif(PIGLIT_BUILD_GLES2_TESTS)
-if(BUILD_CL_TESTS)
+if(PIGLIT_BUILD_CL_TESTS)
add_subdirectory(cl)
-endif(BUILD_CL_TESTS)
+endif(PIGLIT_BUILD_CL_TESTS)
diff --git a/cmake/target_api/gl/CMakeLists.txt b/cmake/target_api/gl/CMakeLists.txt
index ae67020d3..b13229de4 100644
--- a/cmake/target_api/gl/CMakeLists.txt
+++ b/cmake/target_api/gl/CMakeLists.txt
@@ -1,19 +1,19 @@
set(piglit_target_api "gl")
add_definitions(
- -DUSE_OPENGL
+ -DPIGLIT_USE_OPENGL
)
-if(USE_WAFFLE)
+if(PIGLIT_USE_WAFFLE)
link_libraries(glut_waffle)
-else(USE_WAFFLE)
- add_definitions(-DUSE_GLUT)
+else(PIGLIT_USE_WAFFLE)
+ add_definitions(-DPIGLIT_USE_GLUT)
include_directories(
${GLUT_INCLUDE_DIR}
)
link_libraries(
${GLUT_glut_LIBRARY}
)
-endif(USE_WAFFLE)
+endif(PIGLIT_USE_WAFFLE)
add_subdirectory(${piglit_SOURCE_DIR}/tests
${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
diff --git a/cmake/target_api/gles1/CMakeLists.txt b/cmake/target_api/gles1/CMakeLists.txt
index 02ca906ad..b76d51bd6 100644
--- a/cmake/target_api/gles1/CMakeLists.txt
+++ b/cmake/target_api/gles1/CMakeLists.txt
@@ -1,7 +1,7 @@
set(piglit_target_api "gles1")
add_definitions(
- -DUSE_OPENGL_ES1
+ -DPIGLIT_USE_OPENGL_ES1
)
link_libraries(glut_waffle)
add_subdirectory(${piglit_SOURCE_DIR}/tests
diff --git a/cmake/target_api/gles2/CMakeLists.txt b/cmake/target_api/gles2/CMakeLists.txt
index 4dcfd175c..b8cad2055 100644
--- a/cmake/target_api/gles2/CMakeLists.txt
+++ b/cmake/target_api/gles2/CMakeLists.txt
@@ -1,7 +1,7 @@
set(piglit_target_api "gles2")
add_definitions(
- -DUSE_OPENGL_ES2
+ -DPIGLIT_USE_OPENGL_ES2
)
link_libraries(glut_waffle)
add_subdirectory(${piglit_SOURCE_DIR}/tests
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f1ba7c252..2cca584e0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,3 @@
-if(USE_WAFFLE)
+if(PIGLIT_USE_WAFFLE)
add_subdirectory(glut_waffle)
-endif(USE_WAFFLE)
+endif(PIGLIT_USE_WAFFLE)
diff --git a/src/piglit/gl_wrap.h b/src/piglit/gl_wrap.h
index 3ccc36581..7f646cb30 100644
--- a/src/piglit/gl_wrap.h
+++ b/src/piglit/gl_wrap.h
@@ -29,7 +29,7 @@
* \brief Convenience header that includes the actual OpenGL headers.
*
* The actual OpenGL headers are chosen according to the macro definitions
- * USE_OPENGL, USE_OPENGL_ES1, and USE_OPENGL_ES2.
+ * PIGLIT_USE_OPENGL, PIGLIT_USE_OPENGL_ES1, and PIGLIT_USE_OPENGL_ES2.
*/
#pragma once
@@ -42,10 +42,10 @@ extern "C" {
#include <windows.h>
#endif
-#if defined(USE_OPENGL)
+#if defined(PIGLIT_USE_OPENGL)
# include "piglit-dispatch.h"
-#elif defined(USE_OPENGL_ES1)
+#elif defined(PIGLIT_USE_OPENGL_ES1)
# include <GLES/gl.h>
# include <GLES/glext.h>
@@ -57,7 +57,7 @@ extern "C" {
# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES
# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES
-#elif defined(USE_OPENGL_ES2)
+#elif defined(PIGLIT_USE_OPENGL_ES2)
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
#endif
diff --git a/src/piglit/glut_wrap.h b/src/piglit/glut_wrap.h
index a1bddc3d2..549059daf 100644
--- a/src/piglit/glut_wrap.h
+++ b/src/piglit/glut_wrap.h
@@ -29,7 +29,7 @@
* \brief Convenience header that includes the actual GLUT headers.
*
* The actual GLUT headers are chosen according to the macro definitions
- * USE_GLUT and USE_WAFFLE.
+ * PIGLIT_USE_GLUT and PIGLIT_USE_WAFFLE.
*/
#pragma once
@@ -42,9 +42,9 @@ extern "C" {
#include <windows.h>
#endif
-#if defined(USE_WAFFLE)
+#if defined(PIGLIT_USE_WAFFLE)
# include <glut_waffle/glut_waffle.h>
-#elif defined(USE_GLUT)
+#elif defined(PIGLIT_USE_GLUT)
# ifdef __APPLE__
# include <GLUT/glut.h>
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index ad904c53e..0e137b178 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -25,6 +25,6 @@ IF(OPENGL_egl_LIBRARY)
add_subdirectory (egl)
ENDIF(OPENGL_egl_LIBRARY)
-IF(BUILD_CL_TESTS)
+IF(PIGLIT_BUILD_CL_TESTS)
add_subdirectory (cl)
-ENDIF(BUILD_CL_TESTS)
+ENDIF(PIGLIT_BUILD_CL_TESTS)
diff --git a/tests/fbo/CMakeLists.gl.txt b/tests/fbo/CMakeLists.gl.txt
index d3e4bc995..cf2a2685f 100644
--- a/tests/fbo/CMakeLists.gl.txt
+++ b/tests/fbo/CMakeLists.gl.txt
@@ -11,10 +11,10 @@ link_libraries (
${OPENGL_glu_LIBRARY}
)
-if(NOT USE_WAFFLE)
+if(NOT PIGLIT_USE_WAFFLE)
# This test uses glutSolidSphere.
piglit_add_executable (fbo-depth-sample-compare fbo-depth-sample-compare.c)
-endif(NOT USE_WAFFLE)
+endif(NOT PIGLIT_USE_WAFFLE)
piglit_add_executable (fbo-1d fbo-1d.c)
piglit_add_executable (fbo-alphatest-formats fbo-alphatest-formats.c)
diff --git a/tests/general/CMakeLists.gl.txt b/tests/general/CMakeLists.gl.txt
index 0e351ca98..11da25f7b 100644
--- a/tests/general/CMakeLists.gl.txt
+++ b/tests/general/CMakeLists.gl.txt
@@ -10,10 +10,10 @@ link_libraries (
${OPENGL_glu_LIBRARY}
)
-if(NOT USE_WAFFLE)
+if(NOT PIGLIT_USE_WAFFLE)
# This test uses glutCreateSubWindow.
piglit_add_executable (windowoverlap windowoverlap.c)
-endif(NOT USE_WAFFLE)
+endif(NOT PIGLIT_USE_WAFFLE)
piglit_add_executable (array-stride array-stride.c)
piglit_add_executable (bgra-vert-attrib-pointer bgra-vert-attrib-pointer.c)
diff --git a/tests/glslparsertest/glslparsertest.c b/tests/glslparsertest/glslparsertest.c
index ff4c4b93b..b45f1ed4f 100644
--- a/tests/glslparsertest/glslparsertest.c
+++ b/tests/glslparsertest/glslparsertest.c
@@ -51,13 +51,13 @@ get_shader_compile_status(GLuint shader)
{
GLint status;
-#if defined USE_OPENGL
+#if defined PIGLIT_USE_OPENGL
if (gl_version_times_10 >= 20) {
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
} else {
glGetObjectParameterivARB(shader, GL_OBJECT_COMPILE_STATUS_ARB, &status);
}
-#elif defined USE_OPENGL_ES2
+#elif defined PIGLIT_USE_OPENGL_ES2
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
#else
# error
@@ -71,13 +71,13 @@ get_shader_info_log_length(GLuint shader)
{
GLsizei length;
-#if defined USE_OPENGL
+#if defined PIGLIT_USE_OPENGL
if (gl_version_times_10 >= 20) {
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
} else {
glGetObjectParameterivARB(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length);
}
-#elif defined USE_OPENGL_ES2
+#elif defined PIGLIT_USE_OPENGL_ES2
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
#else
# error
diff --git a/tests/glx/CMakeLists.gl.txt b/tests/glx/CMakeLists.gl.txt
index 874991b40..0eac8ce87 100644
--- a/tests/glx/CMakeLists.gl.txt
+++ b/tests/glx/CMakeLists.gl.txt
@@ -4,18 +4,18 @@ include_directories(
${OPENGL_INCLUDE_PATH}
)
-if(BUILD_GLX_TESTS)
+if(PIGLIT_BUILD_GLX_TESTS)
link_libraries (
piglitglxutil
)
-endif(BUILD_GLX_TESTS)
+endif(PIGLIT_BUILD_GLX_TESTS)
link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
)
-IF(BUILD_GLX_TESTS)
+IF(PIGLIT_BUILD_GLX_TESTS)
include_directories(
${GLPROTO_INCLUDE_DIRS}
)
@@ -66,6 +66,6 @@ IF(BUILD_GLX_TESTS)
piglit_add_executable (glx-copy-sub-buffer glx-copy-sub-buffer.c)
piglit_add_executable (glx-query-drawable glx-query-drawable.c)
-ENDIF(BUILD_GLX_TESTS)
+ENDIF(PIGLIT_BUILD_GLX_TESTS)
# vim: ft=cmake:
diff --git a/tests/spec/glx_arb_create_context/CMakeLists.gl.txt b/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
index 2f27d5753..b57e94853 100644
--- a/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
+++ b/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
@@ -4,18 +4,18 @@ include_directories(
${OPENGL_INCLUDE_PATH}
)
-if(BUILD_GLX_TESTS)
+if(PIGLIT_BUILD_GLX_TESTS)
link_libraries (
piglitglxutil
)
-endif(BUILD_GLX_TESTS)
+endif(PIGLIT_BUILD_GLX_TESTS)
link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
)
-IF(BUILD_GLX_TESTS)
+IF(PIGLIT_BUILD_GLX_TESTS)
include_directories(
${GLPROTO_INCLUDE_DIRS}
)
@@ -40,6 +40,6 @@ IF(BUILD_GLX_TESTS)
piglit_add_executable (glx-create-context-valid-attribute-empty valid-attribute-empty.c common.c)
piglit_add_executable (glx-create-context-valid-attribute-null valid-attribute-null.c common.c)
piglit_add_executable (glx-create-context-valid-flag-forward-compatible valid-flag-forward-compatible.c common.c)
-ENDIF(BUILD_GLX_TESTS)
+ENDIF(PIGLIT_BUILD_GLX_TESTS)
# vim: ft=cmake:
diff --git a/tests/spec/glx_ext_import_context/CMakeLists.gl.txt b/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
index 1eaa2ea59..af93a1697 100644
--- a/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
+++ b/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
@@ -4,18 +4,18 @@ include_directories(
${OPENGL_INCLUDE_PATH}
)
-if(BUILD_GLX_TESTS)
+if(PIGLIT_BUILD_GLX_TESTS)
link_libraries (
piglitglxutil
)
-endif(BUILD_GLX_TESTS)
+endif(PIGLIT_BUILD_GLX_TESTS)
link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
)
-IF(BUILD_GLX_TESTS)
+IF(PIGLIT_BUILD_GLX_TESTS)
include_directories(
${GLPROTO_INCLUDE_DIRS}
)
@@ -31,6 +31,6 @@ IF(BUILD_GLX_TESTS)
piglit_add_executable (glx-make-current-multi-process make-current-multi-process.c common.c)
piglit_add_executable (glx-make-current-single-process make-current-single-process.c common.c)
piglit_add_executable (glx-query-context-info-ext query-context-info.c common.c)
-ENDIF(BUILD_GLX_TESTS)
+ENDIF(PIGLIT_BUILD_GLX_TESTS)
# vim: ft=cmake:
diff --git a/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c b/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c
index 39a734db4..5c61e44f5 100644
--- a/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c
+++ b/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c
@@ -94,7 +94,7 @@ piglit_init(int argc, char **argv)
glTexImage2D(GL_TEXTURE_2D, 0, t[i].internal_format,
16, 16, 0,
t[i].internal_format, t[i].type, buffer);
-#if defined(USE_OPENGL_ES1) || defined(USE_OPENGL_ES2)
+#if defined(PIGLIT_USE_OPENGL_ES1) || defined(PIGLIT_USE_OPENGL_ES2)
if (!piglit_check_gl_error(GL_INVALID_VALUE))
piglit_report_result(PIGLIT_FAIL);
#else
@@ -170,7 +170,7 @@ piglit_init(int argc, char **argv)
glCompressedTexImage2D(GL_TEXTURE_2D, 0, t[i].internal_format,
16, 16, 1,
size + t[i].palette_size, buffer);
-#if defined(USE_OPENGL_ES1) || defined(USE_OPENGL_ES2)
+#if defined(PIGLIT_USE_OPENGL_ES1) || defined(PIGLIT_USE_OPENGL_ES2)
if (!piglit_check_gl_error(GL_INVALID_VALUE))
piglit_report_result(PIGLIT_FAIL);
#else
diff --git a/tests/util/CMakeLists.gl.txt b/tests/util/CMakeLists.gl.txt
index 2cd4ecdb9..a4e7dc682 100644
--- a/tests/util/CMakeLists.gl.txt
+++ b/tests/util/CMakeLists.gl.txt
@@ -18,14 +18,14 @@ link_libraries(
${UTIL_GL_LIBS}
)
-IF(BUILD_GLX_TESTS)
+IF(PIGLIT_BUILD_GLX_TESTS)
# XXX: This is currently duplicated wherever tests
# include "piglit-glx-util.h". Is it possible to refactor it?
include_directories(
${GLPROTO_INCLUDE_DIRS}
)
- add_definitions ( -DUSE_GLX )
+ add_definitions ( -DPIGLIT_USE_GLX )
piglit_add_library (piglitglxutil
piglit-shader.c
piglit-shader-gl.c
@@ -44,7 +44,7 @@ IF(BUILD_GLX_TESTS)
${UTIL_GL_SOURCES}
piglit-glx-util.c
)
-ENDIF(BUILD_GLX_TESTS)
+ENDIF(PIGLIT_BUILD_GLX_TESTS)
piglit_add_library (piglitutil_${piglit_target_api}
${UTIL_GL_SOURCES}
diff --git a/tests/util/piglit-framework-fbo.c b/tests/util/piglit-framework-fbo.c
index 1164f80e7..713a31971 100644
--- a/tests/util/piglit-framework-fbo.c
+++ b/tests/util/piglit-framework-fbo.c
@@ -21,17 +21,17 @@
* IN THE SOFTWARE.
*/
-#if defined(USE_OPENGL_ES1)
+#if defined(PIGLIT_USE_OPENGL_ES1)
# define PIGLIT_FRAMEWORK_FBO_DISABLED
-#elif defined(USE_WAFFLE)
+#elif defined(PIGLIT_USE_WAFFLE)
# define PIGLIT_FRAMEWORK_FBO_USE_WAFFLE
-#elif defined(USE_GLX)
+#elif defined(PIGLIT_USE_GLX)
# define PIGLIT_FRAMEWORK_FBO_USE_GLX
#else
# define PIGLIT_FRAMEWORK_FBO_DISABLED
#endif
-#ifdef USE_OPENGL_ES2
+#ifdef PIGLIT_USE_OPENGL_ES2
# define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES
# define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES
#endif
@@ -147,11 +147,11 @@ piglit_framework_fbo_waffle_init(void)
"value \"%s\"", env_platform);
}
-#if defined(USE_OPENGL)
+#if defined(PIGLIT_USE_OPENGL)
waffle_context_api = WAFFLE_CONTEXT_OPENGL;
-#elif defined(USE_OPENGL_ES1)
+#elif defined(PIGLIT_USE_OPENGL_ES1)
waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES1;
-#elif defined(USE_OPENGL_ES2)
+#elif defined(PIGLIT_USE_OPENGL_ES2)
waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES2;
#else
# error
@@ -240,7 +240,7 @@ piglit_framework_fbo_gl_init(const struct piglit_gl_test_info *info)
GLuint tex, depth = 0;
GLenum status;
-#ifdef USE_OPENGL
+#ifdef PIGLIT_USE_OPENGL
glewInit();
if (piglit_get_gl_version() < 20)
@@ -317,7 +317,7 @@ piglit_framework_fbo_init(const struct piglit_gl_test_info *info)
static void
piglit_framework_fbo_destroy(void)
{
-#ifdef USE_OPENGL
+#ifdef PIGLIT_USE_OPENGL
glDeleteFramebuffers(1, &piglit_winsys_fbo);
#endif
diff --git a/tests/util/piglit-framework-glut.c b/tests/util/piglit-framework-glut.c
index d61eed629..6510df6ea 100644
--- a/tests/util/piglit-framework-glut.c
+++ b/tests/util/piglit-framework-glut.c
@@ -31,7 +31,7 @@
#include "piglit-framework-gl.h"
#include "piglit-framework-glut.h"
-#ifdef USE_GLX
+#ifdef PIGLIT_USE_GLX
#include "piglit-glx-util.h"
#endif
@@ -103,12 +103,12 @@ piglit_framework_glut_init(int argc, char *argv[],
test_info = info;
glutInit(&argc, argv);
-# if defined(USE_WAFFLE)
-# if defined(USE_OPENGL)
+# if defined(PIGLIT_USE_WAFFLE)
+# if defined(PIGLIT_USE_OPENGL)
glutInitAPIMask(GLUT_OPENGL_BIT);
-# elif defined(USE_OPENGL_ES1)
+# elif defined(PIGLIT_USE_OPENGL_ES1)
glutInitAPIMask(GLUT_OPENGL_ES1_BIT);
-# elif defined(USE_OPENGL_ES2)
+# elif defined(PIGLIT_USE_OPENGL_ES2)
glutInitAPIMask(GLUT_OPENGL_ES2_BIT);
# else
# error
@@ -121,7 +121,7 @@ piglit_framework_glut_init(int argc, char *argv[],
glutInitDisplayMode(info->window_visual);
piglit_window = glutCreateWindow(argv[0]);
-#if defined(USE_GLX) && !defined(USE_WAFFLE)
+#if defined(PIGLIT_USE_GLX) && !defined(PIGLIT_USE_WAFFLE)
/* If using waffle, then the current platform might not be GLX.
* So we can't call any GLX functions.
*
@@ -136,7 +136,7 @@ piglit_framework_glut_init(int argc, char *argv[],
glutReshapeFunc(reshape);
glutKeyboardFunc(piglit_escape_exit_key);
-#ifdef USE_OPENGL
+#ifdef PIGLIT_USE_OPENGL
glewInit();
#endif
}
diff --git a/tests/util/piglit-shader-gl.c b/tests/util/piglit-shader-gl.c
index d3eee6784..1ca443e9f 100644
--- a/tests/util/piglit-shader-gl.c
+++ b/tests/util/piglit-shader-gl.c
@@ -21,8 +21,8 @@
* DEALINGS IN THE SOFTWARE.
*/
-#ifndef USE_OPENGL
-# error USE_OPENGL is undefined
+#ifndef PIGLIT_USE_OPENGL
+# error PIGLIT_USE_OPENGL is undefined
#endif
#if defined(_MSC_VER)
diff --git a/tests/util/piglit-shader-gles1.c b/tests/util/piglit-shader-gles1.c
index 6fd7d105a..88606ca1d 100644
--- a/tests/util/piglit-shader-gles1.c
+++ b/tests/util/piglit-shader-gles1.c
@@ -21,8 +21,8 @@
* DEALINGS IN THE SOFTWARE.
*/
-#ifndef USE_OPENGL_ES1
-# error USE_OPENGL_ES1 is undefined
+#ifndef PIGLIT_USE_OPENGL_ES1
+# error PIGLIT_USE_OPENGL_ES1 is undefined
#endif
#include "piglit-util-gl-common.h"
diff --git a/tests/util/piglit-shader-gles2.c b/tests/util/piglit-shader-gles2.c
index 8e85bbd97..c6e6dfb00 100644
--- a/tests/util/piglit-shader-gles2.c
+++ b/tests/util/piglit-shader-gles2.c
@@ -21,8 +21,8 @@
* DEALINGS IN THE SOFTWARE.
*/
-#ifndef USE_OPENGL_ES2
-# error USE_OPENGL_ES2 is undefined
+#ifndef PIGLIT_USE_OPENGL_ES2
+# error PIGLIT_USE_OPENGL_ES2 is undefined
#endif
#include "piglit-util-gl-common.h"
diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c
index d04247dfe..89021e32c 100644
--- a/tests/util/piglit-shader.c
+++ b/tests/util/piglit-shader.c
@@ -118,7 +118,7 @@ shader_name(GLenum target)
switch (target) {
case GL_VERTEX_SHADER:
return "vertex";
-#if defined USE_OPENGL
+#if defined PIGLIT_USE_OPENGL
case GL_GEOMETRY_SHADER:
return "geometry";
#endif
diff --git a/tests/util/piglit-shader.h b/tests/util/piglit-shader.h
index 74396ef43..d2bcdeb7e 100644
--- a/tests/util/piglit-shader.h
+++ b/tests/util/piglit-shader.h
@@ -45,7 +45,7 @@ GLint piglit_link_simple_program(GLint vs, GLint fs);
* wrappers.
*/
/*@{*/
-#if defined(USE_OPENGL_ES1)
+#if defined(PIGLIT_USE_OPENGL_ES1)
#define piglit_AttachShader assert(!"glAttachShader does not exist in ES1")
#define piglit_BindAttribLocation assert(!"glBindAttribLocation does not exist in ES1")
#define piglit_CompileShader assert(!"glCompileShader does not exist in ES1")
@@ -88,7 +88,7 @@ GLint piglit_link_simple_program(GLint vs, GLint fs);
#define piglit_UniformMatrix3x4fv assert(!"glUniformMatrix3x4fv does not exist in ES1")
#define piglit_UniformMatrix4x2fv assert(!"glUniformMatrix4x2fv does not exist in ES1")
#define piglit_UniformMatrix4x3fv assert(!"glUniformMatrix4x3fv does not exist in ES1")
-#elif defined(USE_OPENGL_ES2)
+#elif defined(PIGLIT_USE_OPENGL_ES2)
#define piglit_AttachShader glAttachShader
#define piglit_BindAttribLocation glBindAttribLocation
#define piglit_CompileShader glCompileShader
diff --git a/tests/util/piglit-util-gl-common.c b/tests/util/piglit-util-gl-common.c
index 62b531298..466814d6e 100644
--- a/tests/util/piglit-util-gl-common.c
+++ b/tests/util/piglit-util-gl-common.c
@@ -90,7 +90,7 @@ static const char** gl_extension_array_from_getstring()
return split_string(gl_extensions_string);
}
-#if defined(USE_OPENGL)
+#if defined(PIGLIT_USE_OPENGL)
static const char** gl_extension_array_from_getstringi()
{
const char **strings;
@@ -116,9 +116,9 @@ static void initialize_piglit_extension_support(void)
return;
}
-#if defined(USE_OPENGL_ES1) || defined(USE_OPENGL_ES2)
+#if defined(PIGLIT_USE_OPENGL_ES1) || defined(PIGLIT_USE_OPENGL_ES2)
gl_extensions = gl_extension_array_from_getstring();
-#elif defined(USE_OPENGL)
+#elif defined(PIGLIT_USE_OPENGL)
if (piglit_get_gl_version() < 30) {
gl_extensions = gl_extension_array_from_getstring();
} else {
diff --git a/tests/util/piglit-util-gl-enum.c b/tests/util/piglit-util-gl-enum.c
index 225b00810..bde15eaf7 100644
--- a/tests/util/piglit-util-gl-enum.c
+++ b/tests/util/piglit-util-gl-enum.c
@@ -30,10 +30,10 @@
#endif
/* Force GL defines */
-#ifndef USE_OPENGL
-# define USE_OPENGL
-# undef USE_OPENGL_ES1
-# undef USE_OPENGL_ES2
+#ifndef PIGLIT_USE_OPENGL
+# define PIGLIT_USE_OPENGL
+# undef PIGLIT_USE_OPENGL_ES1
+# undef PIGLIT_USE_OPENGL_ES2
#endif
#include "piglit-util-gl-common.h"
diff --git a/tests/util/piglit-util-gles.c b/tests/util/piglit-util-gles.c
index 12ae847cd..f83d3739b 100644
--- a/tests/util/piglit-util-gles.c
+++ b/tests/util/piglit-util-gles.c
@@ -188,7 +188,7 @@ piglit_escape_exit_key(unsigned char key, int x, int y)
static void
draw_arrays(const GLvoid *verts, const GLvoid *tex)
{
-#if defined(USE_OPENGL_ES1)
+#if defined(PIGLIT_USE_OPENGL_ES1)
if (verts) {
glVertexPointer(4, GL_FLOAT, 0, verts);
glEnableClientState(GL_VERTEX_ARRAY);
@@ -205,7 +205,7 @@ draw_arrays(const GLvoid *verts, const GLvoid *tex)
glDisableClientState(GL_VERTEX_ARRAY);
if (tex)
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-#elif defined(USE_OPENGL_ES2)
+#elif defined(PIGLIT_USE_OPENGL_ES2)
if (verts) {
glVertexAttribPointer(PIGLIT_ATTRIB_POS, 4, GL_FLOAT, GL_FALSE, 0, verts);
glEnableVertexAttribArray(PIGLIT_ATTRIB_POS);
@@ -521,7 +521,7 @@ piglit_checkerboard_texture(GLuint tex, unsigned level,
return tex;
}
-#if defined(USE_OPENGL_ES1)
+#if defined(PIGLIT_USE_OPENGL_ES1)
/**
* Convenience function to configure an abitrary orthogonal projection matrix
@@ -556,4 +556,4 @@ piglit_ortho_projection(int w, int h, GLboolean push)
piglit_gen_ortho_projection(0, w, 0, h, -1, 1, push);
}
-#endif /* USE_OPENGL_ES1 */
+#endif /* PIGLIT_USE_OPENGL_ES1 */
diff --git a/tests/util/piglit_ktx.c b/tests/util/piglit_ktx.c
index 4c6748963..7febc8ff5 100644
--- a/tests/util/piglit_ktx.c
+++ b/tests/util/piglit_ktx.c
@@ -631,7 +631,7 @@ piglit_ktx_load_noncubeface(struct piglit_ktx *self,
switch (info->target) {
case GL_TEXTURE_1D:
-#ifdef USE_OPENGL
+#ifdef PIGLIT_USE_OPENGL
if (info->gl_type == 0)
glCompressedTexImage1D(info->target,
level,
@@ -679,7 +679,7 @@ piglit_ktx_load_noncubeface(struct piglit_ktx *self,
case GL_TEXTURE_2D_ARRAY:
case GL_TEXTURE_3D:
case GL_TEXTURE_CUBE_MAP_ARRAY:
-#ifdef USE_OPENGL
+#ifdef PIGLIT_USE_OPENGL
if (info->gl_type == 0)
glCompressedTexImage3D(info->target,
level,
@@ -715,7 +715,7 @@ piglit_ktx_load_noncubeface(struct piglit_ktx *self,
*gl_error = glGetError();
return *gl_error == 0;
-#ifndef USE_OPENGL
+#ifndef PIGLIT_USE_OPENGL
unsupported_on_gles:
*gl_error = 0;
piglit_ktx_error("%s", "GLES supports only GL_TEXTURE_2D and "