Commit d39eca2b authored by Chad Versace's avatar Chad Versace

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's avatarJordan Justen <jordan.l.justen@intel.com>
Acked-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Tested-by: Paul Berry's avatarPaul Berry <stereotype441@gmail.com>
Acked-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
parent 074a6d54
...@@ -17,37 +17,37 @@ find_package(PNG REQUIRED) ...@@ -17,37 +17,37 @@ find_package(PNG REQUIRED)
find_package(X11) find_package(X11)
option(BUILD_GLES1_TESTS "Build tests for OpenGL ES1" OFF) option(PIGLIT_BUILD_GLES1_TESTS "Build tests for OpenGL ES1" OFF)
option(BUILD_GLES2_TESTS "Build tests for OpenGL ES2" OFF) option(PIGLIT_BUILD_GLES2_TESTS "Build tests for OpenGL ES2" OFF)
option(BUILD_CL_TESTS "Build tests for OpenCL" OFF) option(PIGLIT_BUILD_CL_TESTS "Build tests for OpenCL" OFF)
option(USE_WAFFLE "Use Waffle in place of GLUT" OFF) option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" OFF)
if(USE_WAFFLE) if(PIGLIT_USE_WAFFLE)
pkg_check_modules(WAFFLE REQUIRED waffle-1>=1.0.1) 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_C_FLAGS "${CMAKE_C_FLAGS} ${WAFFLE_CFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_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) if(PIGLIT_BUILD_GLES1_TESTS AND NOT PIGLIT_USE_WAFFLE)
message(FATAL_ERROR "Option BUILD_GLES1_TESTS requires USE_WAFFLE") message(FATAL_ERROR "Option PIGLIT_BUILD_GLES1_TESTS requires PIGLIT_USE_WAFFLE")
endif(BUILD_GLES1_TESTS AND NOT USE_WAFFLE) endif(PIGLIT_BUILD_GLES1_TESTS AND NOT PIGLIT_USE_WAFFLE)
if(BUILD_GLES2_TESTS AND NOT USE_WAFFLE) if(PIGLIT_BUILD_GLES2_TESTS AND NOT PIGLIT_USE_WAFFLE)
message(FATAL_ERROR "Option BUILD_GLES2_TESTS requires USE_WAFFLE") message(FATAL_ERROR "Option PIGLIT_BUILD_GLES2_TESTS requires PIGLIT_USE_WAFFLE")
endif(BUILD_GLES2_TESTS AND NOT 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) find_package(OpenCL REQUIRED)
endif(BUILD_CL_TESTS) endif(PIGLIT_BUILD_CL_TESTS)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(-DPIGLIT_HAS_X11) 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() ELSE()
option(BUILD_GLX_TESTS "Build tests that require GLX" OFF) option(PIGLIT_BUILD_GLX_TESTS "Build tests that require GLX" OFF)
ENDIF() ENDIF()
IF(BUILD_GLX_TESTS) IF(PIGLIT_BUILD_GLX_TESTS)
pkg_check_modules(GLPROTO REQUIRED glproto) pkg_check_modules(GLPROTO REQUIRED glproto)
ENDIF() ENDIF()
......
...@@ -25,14 +25,14 @@ add_subdirectory(no_api) ...@@ -25,14 +25,14 @@ add_subdirectory(no_api)
add_subdirectory(gl) add_subdirectory(gl)
if(BUILD_GLES1_TESTS) if(PIGLIT_BUILD_GLES1_TESTS)
add_subdirectory(gles1) add_subdirectory(gles1)
endif(BUILD_GLES1_TESTS) endif(PIGLIT_BUILD_GLES1_TESTS)
if(BUILD_GLES2_TESTS) if(PIGLIT_BUILD_GLES2_TESTS)
add_subdirectory(gles2) add_subdirectory(gles2)
endif(BUILD_GLES2_TESTS) endif(PIGLIT_BUILD_GLES2_TESTS)
if(BUILD_CL_TESTS) if(PIGLIT_BUILD_CL_TESTS)
add_subdirectory(cl) add_subdirectory(cl)
endif(BUILD_CL_TESTS) endif(PIGLIT_BUILD_CL_TESTS)
set(piglit_target_api "gl") set(piglit_target_api "gl")
add_definitions( add_definitions(
-DUSE_OPENGL -DPIGLIT_USE_OPENGL
) )
if(USE_WAFFLE) if(PIGLIT_USE_WAFFLE)
link_libraries(glut_waffle) link_libraries(glut_waffle)
else(USE_WAFFLE) else(PIGLIT_USE_WAFFLE)
add_definitions(-DUSE_GLUT) add_definitions(-DPIGLIT_USE_GLUT)
include_directories( include_directories(
${GLUT_INCLUDE_DIR} ${GLUT_INCLUDE_DIR}
) )
link_libraries( link_libraries(
${GLUT_glut_LIBRARY} ${GLUT_glut_LIBRARY}
) )
endif(USE_WAFFLE) endif(PIGLIT_USE_WAFFLE)
add_subdirectory(${piglit_SOURCE_DIR}/tests add_subdirectory(${piglit_SOURCE_DIR}/tests
${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
......
set(piglit_target_api "gles1") set(piglit_target_api "gles1")
add_definitions( add_definitions(
-DUSE_OPENGL_ES1 -DPIGLIT_USE_OPENGL_ES1
) )
link_libraries(glut_waffle) link_libraries(glut_waffle)
add_subdirectory(${piglit_SOURCE_DIR}/tests add_subdirectory(${piglit_SOURCE_DIR}/tests
......
set(piglit_target_api "gles2") set(piglit_target_api "gles2")
add_definitions( add_definitions(
-DUSE_OPENGL_ES2 -DPIGLIT_USE_OPENGL_ES2
) )
link_libraries(glut_waffle) link_libraries(glut_waffle)
add_subdirectory(${piglit_SOURCE_DIR}/tests add_subdirectory(${piglit_SOURCE_DIR}/tests
......
if(USE_WAFFLE) if(PIGLIT_USE_WAFFLE)
add_subdirectory(glut_waffle) add_subdirectory(glut_waffle)
endif(USE_WAFFLE) endif(PIGLIT_USE_WAFFLE)
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* \brief Convenience header that includes the actual OpenGL headers. * \brief Convenience header that includes the actual OpenGL headers.
* *
* The actual OpenGL headers are chosen according to the macro definitions * 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 #pragma once
...@@ -42,10 +42,10 @@ extern "C" { ...@@ -42,10 +42,10 @@ extern "C" {
#include <windows.h> #include <windows.h>
#endif #endif
#if defined(USE_OPENGL) #if defined(PIGLIT_USE_OPENGL)
# include "piglit-dispatch.h" # include "piglit-dispatch.h"
#elif defined(USE_OPENGL_ES1) #elif defined(PIGLIT_USE_OPENGL_ES1)
# include <GLES/gl.h> # include <GLES/gl.h>
# include <GLES/glext.h> # include <GLES/glext.h>
...@@ -57,7 +57,7 @@ extern "C" { ...@@ -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_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES
# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_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/gl2.h>
# include <GLES2/gl2ext.h> # include <GLES2/gl2ext.h>
#endif #endif
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* \brief Convenience header that includes the actual GLUT headers. * \brief Convenience header that includes the actual GLUT headers.
* *
* The actual GLUT headers are chosen according to the macro definitions * 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 #pragma once
...@@ -42,9 +42,9 @@ extern "C" { ...@@ -42,9 +42,9 @@ extern "C" {
#include <windows.h> #include <windows.h>
#endif #endif
#if defined(USE_WAFFLE) #if defined(PIGLIT_USE_WAFFLE)
# include <glut_waffle/glut_waffle.h> # include <glut_waffle/glut_waffle.h>
#elif defined(USE_GLUT) #elif defined(PIGLIT_USE_GLUT)
# ifdef __APPLE__ # ifdef __APPLE__
# include <GLUT/glut.h> # include <GLUT/glut.h>
......
...@@ -25,6 +25,6 @@ IF(OPENGL_egl_LIBRARY) ...@@ -25,6 +25,6 @@ IF(OPENGL_egl_LIBRARY)
add_subdirectory (egl) add_subdirectory (egl)
ENDIF(OPENGL_egl_LIBRARY) ENDIF(OPENGL_egl_LIBRARY)
IF(BUILD_CL_TESTS) IF(PIGLIT_BUILD_CL_TESTS)
add_subdirectory (cl) add_subdirectory (cl)
ENDIF(BUILD_CL_TESTS) ENDIF(PIGLIT_BUILD_CL_TESTS)
...@@ -11,10 +11,10 @@ link_libraries ( ...@@ -11,10 +11,10 @@ link_libraries (
${OPENGL_glu_LIBRARY} ${OPENGL_glu_LIBRARY}
) )
if(NOT USE_WAFFLE) if(NOT PIGLIT_USE_WAFFLE)
# This test uses glutSolidSphere. # This test uses glutSolidSphere.
piglit_add_executable (fbo-depth-sample-compare fbo-depth-sample-compare.c) 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-1d fbo-1d.c)
piglit_add_executable (fbo-alphatest-formats fbo-alphatest-formats.c) piglit_add_executable (fbo-alphatest-formats fbo-alphatest-formats.c)
......
...@@ -10,10 +10,10 @@ link_libraries ( ...@@ -10,10 +10,10 @@ link_libraries (
${OPENGL_glu_LIBRARY} ${OPENGL_glu_LIBRARY}
) )
if(NOT USE_WAFFLE) if(NOT PIGLIT_USE_WAFFLE)
# This test uses glutCreateSubWindow. # This test uses glutCreateSubWindow.
piglit_add_executable (windowoverlap windowoverlap.c) 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 (array-stride array-stride.c)
piglit_add_executable (bgra-vert-attrib-pointer bgra-vert-attrib-pointer.c) piglit_add_executable (bgra-vert-attrib-pointer bgra-vert-attrib-pointer.c)
......
...@@ -51,13 +51,13 @@ get_shader_compile_status(GLuint shader) ...@@ -51,13 +51,13 @@ get_shader_compile_status(GLuint shader)
{ {
GLint status; GLint status;
#if defined USE_OPENGL #if defined PIGLIT_USE_OPENGL
if (gl_version_times_10 >= 20) { if (gl_version_times_10 >= 20) {
glGetShaderiv(shader, GL_COMPILE_STATUS, &status); glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
} else { } else {
glGetObjectParameterivARB(shader, GL_OBJECT_COMPILE_STATUS_ARB, &status); 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); glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
#else #else
# error # error
...@@ -71,13 +71,13 @@ get_shader_info_log_length(GLuint shader) ...@@ -71,13 +71,13 @@ get_shader_info_log_length(GLuint shader)
{ {
GLsizei length; GLsizei length;
#if defined USE_OPENGL #if defined PIGLIT_USE_OPENGL
if (gl_version_times_10 >= 20) { if (gl_version_times_10 >= 20) {
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length); glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
} else { } else {
glGetObjectParameterivARB(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); 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); glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
#else #else
# error # error
......
...@@ -4,18 +4,18 @@ include_directories( ...@@ -4,18 +4,18 @@ include_directories(
${OPENGL_INCLUDE_PATH} ${OPENGL_INCLUDE_PATH}
) )
if(BUILD_GLX_TESTS) if(PIGLIT_BUILD_GLX_TESTS)
link_libraries ( link_libraries (
piglitglxutil piglitglxutil
) )
endif(BUILD_GLX_TESTS) endif(PIGLIT_BUILD_GLX_TESTS)
link_libraries ( link_libraries (
${OPENGL_gl_LIBRARY} ${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY} ${OPENGL_glu_LIBRARY}
) )
IF(BUILD_GLX_TESTS) IF(PIGLIT_BUILD_GLX_TESTS)
include_directories( include_directories(
${GLPROTO_INCLUDE_DIRS} ${GLPROTO_INCLUDE_DIRS}
) )
...@@ -66,6 +66,6 @@ IF(BUILD_GLX_TESTS) ...@@ -66,6 +66,6 @@ IF(BUILD_GLX_TESTS)
piglit_add_executable (glx-copy-sub-buffer glx-copy-sub-buffer.c) piglit_add_executable (glx-copy-sub-buffer glx-copy-sub-buffer.c)
piglit_add_executable (glx-query-drawable glx-query-drawable.c) piglit_add_executable (glx-query-drawable glx-query-drawable.c)
ENDIF(BUILD_GLX_TESTS) ENDIF(PIGLIT_BUILD_GLX_TESTS)
# vim: ft=cmake: # vim: ft=cmake:
...@@ -4,18 +4,18 @@ include_directories( ...@@ -4,18 +4,18 @@ include_directories(
${OPENGL_INCLUDE_PATH} ${OPENGL_INCLUDE_PATH}
) )
if(BUILD_GLX_TESTS) if(PIGLIT_BUILD_GLX_TESTS)
link_libraries ( link_libraries (
piglitglxutil piglitglxutil
) )
endif(BUILD_GLX_TESTS) endif(PIGLIT_BUILD_GLX_TESTS)
link_libraries ( link_libraries (
${OPENGL_gl_LIBRARY} ${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY} ${OPENGL_glu_LIBRARY}
) )
IF(BUILD_GLX_TESTS) IF(PIGLIT_BUILD_GLX_TESTS)
include_directories( include_directories(
${GLPROTO_INCLUDE_DIRS} ${GLPROTO_INCLUDE_DIRS}
) )
...@@ -40,6 +40,6 @@ IF(BUILD_GLX_TESTS) ...@@ -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-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-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) 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: # vim: ft=cmake:
...@@ -4,18 +4,18 @@ include_directories( ...@@ -4,18 +4,18 @@ include_directories(
${OPENGL_INCLUDE_PATH} ${OPENGL_INCLUDE_PATH}
) )
if(BUILD_GLX_TESTS) if(PIGLIT_BUILD_GLX_TESTS)
link_libraries ( link_libraries (
piglitglxutil piglitglxutil
) )
endif(BUILD_GLX_TESTS) endif(PIGLIT_BUILD_GLX_TESTS)
link_libraries ( link_libraries (
${OPENGL_gl_LIBRARY} ${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY} ${OPENGL_glu_LIBRARY}
) )
IF(BUILD_GLX_TESTS) IF(PIGLIT_BUILD_GLX_TESTS)
include_directories( include_directories(
${GLPROTO_INCLUDE_DIRS} ${GLPROTO_INCLUDE_DIRS}
) )
...@@ -31,6 +31,6 @@ IF(BUILD_GLX_TESTS) ...@@ -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-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-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) 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: # vim: ft=cmake:
...@@ -94,7 +94,7 @@ piglit_init(int argc, char **argv) ...@@ -94,7 +94,7 @@ piglit_init(int argc, char **argv)
glTexImage2D(GL_TEXTURE_2D, 0, t[i].internal_format, glTexImage2D(GL_TEXTURE_2D, 0, t[i].internal_format,
16, 16, 0, 16, 16, 0,
t[i].internal_format, t[i].type, buffer); 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)) if (!piglit_check_gl_error(GL_INVALID_VALUE))
piglit_report_result(PIGLIT_FAIL); piglit_report_result(PIGLIT_FAIL);
#else #else
...@@ -170,7 +170,7 @@ piglit_init(int argc, char **argv) ...@@ -170,7 +170,7 @@ piglit_init(int argc, char **argv)
glCompressedTexImage2D(GL_TEXTURE_2D, 0, t[i].internal_format, glCompressedTexImage2D(GL_TEXTURE_2D, 0, t[i].internal_format,
16, 16, 1, 16, 16, 1,
size + t[i].palette_size, buffer); 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)) if (!piglit_check_gl_error(GL_INVALID_VALUE))
piglit_report_result(PIGLIT_FAIL); piglit_report_result(PIGLIT_FAIL);
#else #else
......
...@@ -18,14 +18,14 @@ link_libraries( ...@@ -18,14 +18,14 @@ link_libraries(
${UTIL_GL_LIBS} ${UTIL_GL_LIBS}
) )
IF(BUILD_GLX_TESTS) IF(PIGLIT_BUILD_GLX_TESTS)
# XXX: This is currently duplicated wherever tests # XXX: This is currently duplicated wherever tests
# include "piglit-glx-util.h". Is it possible to refactor it? # include "piglit-glx-util.h". Is it possible to refactor it?
include_directories( include_directories(
${GLPROTO_INCLUDE_DIRS} ${GLPROTO_INCLUDE_DIRS}
) )
add_definitions ( -DUSE_GLX ) add_definitions ( -DPIGLIT_USE_GLX )
piglit_add_library (piglitglxutil piglit_add_library (piglitglxutil
piglit-shader.c piglit-shader.c
piglit-shader-gl.c piglit-shader-gl.c
...@@ -44,7 +44,7 @@ IF(BUILD_GLX_TESTS) ...@@ -44,7 +44,7 @@ IF(BUILD_GLX_TESTS)
${UTIL_GL_SOURCES} ${UTIL_GL_SOURCES}
piglit-glx-util.c piglit-glx-util.c
) )
ENDIF(BUILD_GLX_TESTS) ENDIF(PIGLIT_BUILD_GLX_TESTS)
piglit_add_library (piglitutil_${piglit_target_api} piglit_add_library (piglitutil_${piglit_target_api}
${UTIL_GL_SOURCES} ${UTIL_GL_SOURCES}
......
...@@ -21,17 +21,17 @@ ...@@ -21,17 +21,17 @@
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
#if defined(USE_OPENGL_ES1) #if defined(PIGLIT_USE_OPENGL_ES1)
# define PIGLIT_FRAMEWORK_FBO_DISABLED # define PIGLIT_FRAMEWORK_FBO_DISABLED
#elif defined(USE_WAFFLE) #elif defined(PIGLIT_USE_WAFFLE)
# define PIGLIT_FRAMEWORK_FBO_USE_WAFFLE # define PIGLIT_FRAMEWORK_FBO_USE_WAFFLE
#elif defined(USE_GLX) #elif defined(PIGLIT_USE_GLX)
# define PIGLIT_FRAMEWORK_FBO_USE_GLX # define PIGLIT_FRAMEWORK_FBO_USE_GLX
#else #else
# define PIGLIT_FRAMEWORK_FBO_DISABLED # define PIGLIT_FRAMEWORK_FBO_DISABLED
#endif #endif
#ifdef USE_OPENGL_ES2 #ifdef PIGLIT_USE_OPENGL_ES2
# define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES # define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES
# define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES # define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES
#endif #endif
...@@ -147,11 +147,11 @@ piglit_framework_fbo_waffle_init(void) ...@@ -147,11 +147,11 @@ piglit_framework_fbo_waffle_init(void)
"value \"%s\"", env_platform); "value \"%s\"", env_platform);
} }
#if defined(USE_OPENGL) #if defined(PIGLIT_USE_OPENGL)
waffle_context_api = WAFFLE_CONTEXT_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; 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; waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES2;
#else #else
# error # error
...@@ -240,7 +240,7 @@ piglit_framework_fbo_gl_init(const struct piglit_gl_test_info *info) ...@@ -240,7 +240,7 @@ piglit_framework_fbo_gl_init(const struct piglit_gl_test_info *info)
GLuint tex, depth = 0; GLuint tex, depth = 0;
GLenum status; GLenum status;
#ifdef USE_OPENGL #ifdef PIGLIT_USE_OPENGL
glewInit(); glewInit();
if (piglit_get_gl_version() < 20) if (piglit_get_gl_version() < 20)
...@@ -317,7 +317,7 @@ piglit_framework_fbo_init(const struct piglit_gl_test_info *info) ...@@ -317,7 +317,7 @@ piglit_framework_fbo_init(const struct piglit_gl_test_info *info)
static void static void
piglit_framework_fbo_destroy(void) piglit_framework_fbo_destroy(void)
{ {
#ifdef USE_OPENGL #ifdef PIGLIT_USE_OPENGL
glDeleteFramebuffers(1, &piglit_winsys_fbo); glDeleteFramebuffers(1, &piglit_winsys_fbo);
#endif #endif
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "piglit-framework-gl.h" #include "piglit-framework-gl.h"
#include "piglit-framework-glut.h" #include "piglit-framework-glut.h"
#ifdef USE_GLX #ifdef PIGLIT_USE_GLX
#include "piglit-glx-util.h" #include "piglit-glx-util.h"
#endif #endif
...@@ -103,12 +103,12 @@ piglit_framework_glut_init(int argc, char *argv[], ...@@ -103,12 +103,12 @@ piglit_framework_glut_init(int argc, char *argv[],
test_info = info; test_info = info;
glutInit(&argc, argv); glutInit(&argc, argv);
# if defined(USE_WAFFLE) # if defined(PIGLIT_USE_WAFFLE)
# if defined(USE_OPENGL) # if defined(PIGLIT_USE_OPENGL)
glutInitAPIMask(GLUT_OPENGL_BIT); glutInitAPIMask(GLUT_OPENGL_BIT);
# elif defined(USE_OPENGL_ES1) # elif defined(PIGLIT_USE_OPENGL_ES1)
glutInitAPIMask(GLUT_OPENGL_ES1_BIT);