summaryrefslogtreecommitdiff
authorChad Versace <chad.versace@linux.intel.com>2012-05-24 06:19:31 (GMT)
committer Chad Versace <chad.versace@linux.intel.com>2012-05-24 06:19:31 (GMT)
commitb3e2f8807311026a11c905d84cb9f51d4fc36c0d (patch) (side-by-side diff)
tree7fc26b44aa88c4c309696c8a0c260ac0c6c78c37
parenta3b5e2e075b4f2636921f3f90c4cc2379becce83 (diff)
parent518fee37bde0788aed86c48fbda3de7585c4ff04 (diff)
downloadpiglit-master.zip
piglit-master.tar.gz
Merge branch 'waffle-v10' of git://people.freedesktop.org/~chadversary/piglitHEADmaster
Conflicts: tests/texturing/crossbar.c
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--CMakeLists.txt22
-rw-r--r--cmake/Modules/FindWaffle.cmake43
-rw-r--r--cmake/target_api/CMakeLists.txt20
-rw-r--r--cmake/target_api/gl/CMakeLists.txt14
-rw-r--r--cmake/target_api/gles1/CMakeLists.txt16
-rw-r--r--cmake/target_api/gles2/CMakeLists.txt16
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/glut_egl/CMakeLists.no_api.txt13
-rw-r--r--src/glut_egl/glut_egl.c406
-rw-r--r--src/glut_egl/glut_egl_x11.c245
-rw-r--r--src/glut_egl/glut_eglint.h101
-rw-r--r--src/glut_waffle/CMakeLists.no_api.txt6
-rw-r--r--src/glut_waffle/CMakeLists.txt (renamed from src/glut_egl/CMakeLists.txt)0
-rw-r--r--src/glut_waffle/README.txt5
-rw-r--r--src/glut_waffle/TODO.txt2
-rw-r--r--src/glut_waffle/glut_waffle.c421
-rw-r--r--src/glut_waffle/glut_waffle.h (renamed from src/glut_egl/glut_egl.h)66
-rw-r--r--src/piglit/glut_wrap.h10
-rw-r--r--tests/asmparsertest/CMakeLists.gl.txt2
-rw-r--r--tests/bugs/CMakeLists.gl.txt2
-rw-r--r--tests/egl/CMakeLists.gl.txt2
-rw-r--r--tests/fbo/CMakeLists.gl.txt8
-rw-r--r--tests/general/CMakeLists.gl.txt8
-rw-r--r--tests/glean/CMakeLists.gl.txt2
-rw-r--r--tests/gles2/CMakeLists.gles2.txt1
-rw-r--r--tests/glslparsertest/CMakeLists.gl.txt2
-rw-r--r--tests/glslparsertest/CMakeLists.gles2.txt1
-rw-r--r--tests/glx/CMakeLists.gl.txt2
-rw-r--r--tests/hiz/CMakeLists.gl.txt2
-rw-r--r--tests/mesa/tests/CMakeLists.gl.txt2
-rw-r--r--tests/mesa/util/CMakeLists.gl.txt2
-rw-r--r--tests/shaders/CMakeLists.gl.txt2
-rw-r--r--tests/spec/amd_seamless_cubemap_per_texture/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_color_buffer_float/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_copy_buffer/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_debug_output/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_draw_buffers/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_draw_elements_base_vertex/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_draw_instanced/execution/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_es2_compatibility/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_fragment_program/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_framebuffer_object/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_instanced_arrays/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_map_buffer_range/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_multisample/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_robustness/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_sampler_objects/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_seamless_cube_map/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_shader_objects/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_shader_texture_lod/execution/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_texture_compression/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_texture_float/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_texture_storage/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_transform_feedback2/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_uniform_buffer_object/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_vertex_program/CMakeLists.gl.txt2
-rw-r--r--tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ati_draw_buffers/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ati_envmap_bumpmap/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_fog_coord/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_packed_depth_stencil/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_packed_float/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_texture_array/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_texture_integer/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_timer_query/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_transform_feedback/CMakeLists.gl.txt2
-rw-r--r--tests/spec/ext_unpack_subimage/CMakeLists.gles2.txt1
-rw-r--r--tests/spec/gl-2.0/CMakeLists.gl.txt2
-rw-r--r--tests/spec/gl-2.0/api/CMakeLists.gl.txt2
-rw-r--r--tests/spec/gl-2.1/CMakeLists.gl.txt2
-rw-r--r--tests/spec/gl-3.0/CMakeLists.gl.txt2
-rw-r--r--tests/spec/gl-3.0/api/CMakeLists.gl.txt2
-rw-r--r--tests/spec/gl-3.1/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glsl-1.10/execution/clipping/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glsl-1.20/recursion/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glsl-1.30/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glsl-1.30/execution/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glsl-1.30/execution/clipping/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glsl-1.30/linker/clipping/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glsl-1.40/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glx_arb_create_context/CMakeLists.gl.txt2
-rw-r--r--tests/spec/glx_ext_import_context/CMakeLists.gl.txt2
-rw-r--r--tests/spec/nv_conditional_render/CMakeLists.gl.txt2
-rw-r--r--tests/spec/nv_texture_barrier/CMakeLists.gl.txt2
-rw-r--r--tests/spec/oes_compressed_etc1_rgb8_texture/CMakeLists.gles1.txt1
-rw-r--r--tests/spec/oes_compressed_paletted_texture/CMakeLists.gles1.txt1
-rw-r--r--tests/spec/oes_draw_texture/CMakeLists.gles1.txt1
-rw-r--r--tests/texturing/CMakeLists.gl.txt12
-rw-r--r--tests/texturing/shaders/CMakeLists.gl.txt2
-rw-r--r--tests/util/CMakeLists.gl.txt1
-rw-r--r--tests/util/CMakeLists.gles1.txt1
-rw-r--r--tests/util/CMakeLists.gles2.txt1
-rw-r--r--tests/util/CMakeLists.txt5
-rw-r--r--tests/util/piglit-framework-fbo.c330
-rw-r--r--tests/util/piglit-framework-fbo.h29
-rw-r--r--tests/util/piglit-framework.c138
-rw-r--r--tests/util/piglit-util.c20
-rwxr-xr-xtests/util/piglit-util.h2
103 files changed, 973 insertions, 1134 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f84117..7202417 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
+
INCLUDE (CheckCCompilerFlag)
INCLUDE (CheckCXXCompilerFlag)
INCLUDE (CheckFunctionExists)
@@ -14,6 +16,26 @@ find_package(GLUT REQUIRED)
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(USE_WAFFLE "Use Waffle in place of GLUT" OFF)
+if(USE_WAFFLE)
+ # FIXME: Specify version requirements for Waffle.
+ find_package(Waffle REQUIRED)
+ add_definitions(-DUSE_WAFFLE)
+ include_directories("${WAFFLE_INCLUDE_DIR}")
+endif(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(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(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
option(BUILD_GLX_TESTS "Build tests that require GLX" ON)
ELSE()
diff --git a/cmake/Modules/FindWaffle.cmake b/cmake/Modules/FindWaffle.cmake
new file mode 100644
index 0000000..8ac4d62
--- a/dev/null
+++ b/cmake/Modules/FindWaffle.cmake
@@ -0,0 +1,43 @@
+# Copyright © 2012 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+
+# This module defines the following variables:
+#
+# WAFFLE_FOUND
+# True if Waffle is installed.
+#
+# WAFFLE_INCLUDE_DIR
+#
+# WAFFLE_waffle_LIBRARY
+# Path to Waffle's library.
+#
+# FIXME: Set WAFFLE_VERSION. But how does one detect package versions in
+# FIXME: CMake?
+
+find_path(WAFFLE_INCLUDE_DIR waffle/waffle.h)
+find_library(WAFFLE_waffle_LIBRARY waffle)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Waffle
+ DEFAULT_MSG
+ WAFFLE_INCLUDE_DIR WAFFLE_waffle_LIBRARY
+ )
diff --git a/cmake/target_api/CMakeLists.txt b/cmake/target_api/CMakeLists.txt
index f0c0e13..f152ba2 100644
--- a/cmake/target_api/CMakeLists.txt
+++ b/cmake/target_api/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 Intel Corporation
+# Copyright (c) 2010-2012 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -18,11 +18,17 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-#
-# Authors:
-# Chad Versace <chad.versace@intel.com>
-add_subdirectory(gl)
-add_subdirectory(gles1)
-add_subdirectory(gles2)
+# The no_api directory must precede the GL directories because it builds
+# glut_waffle, which the GL targets depend on.
add_subdirectory(no_api)
+
+add_subdirectory(gl)
+
+if(BUILD_GLES1_TESTS)
+ add_subdirectory(gles1)
+endif(BUILD_GLES1_TESTS)
+
+if(BUILD_GLES2_TESTS)
+ add_subdirectory(gles2)
+endif(BUILD_GLES2_TESTS)
diff --git a/cmake/target_api/gl/CMakeLists.txt b/cmake/target_api/gl/CMakeLists.txt
index 506bb93..ae67020 100644
--- a/cmake/target_api/gl/CMakeLists.txt
+++ b/cmake/target_api/gl/CMakeLists.txt
@@ -1,8 +1,20 @@
set(piglit_target_api "gl")
add_definitions(
-DUSE_OPENGL
- -DUSE_GLUT
)
+
+if(USE_WAFFLE)
+ link_libraries(glut_waffle)
+else(USE_WAFFLE)
+ add_definitions(-DUSE_GLUT)
+ include_directories(
+ ${GLUT_INCLUDE_DIR}
+ )
+ link_libraries(
+ ${GLUT_glut_LIBRARY}
+ )
+endif(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 ed50d1c..02ca906 100644
--- a/cmake/target_api/gles1/CMakeLists.txt
+++ b/cmake/target_api/gles1/CMakeLists.txt
@@ -1,11 +1,9 @@
set(piglit_target_api "gles1")
-if(OPENGL_gles1_LIBRARY AND OPENGL_egl_LIBRARY)
- add_definitions(
- -DUSE_OPENGL_ES1
- -DUSE_EGLUT
- )
- add_subdirectory(${piglit_SOURCE_DIR}/tests
- ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
- )
-endif(OPENGL_gles1_LIBRARY AND OPENGL_egl_LIBRARY)
+add_definitions(
+ -DUSE_OPENGL_ES1
+ )
+link_libraries(glut_waffle)
+add_subdirectory(${piglit_SOURCE_DIR}/tests
+ ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
+ )
diff --git a/cmake/target_api/gles2/CMakeLists.txt b/cmake/target_api/gles2/CMakeLists.txt
index 091dcf2..4dcfd17 100644
--- a/cmake/target_api/gles2/CMakeLists.txt
+++ b/cmake/target_api/gles2/CMakeLists.txt
@@ -1,11 +1,9 @@
set(piglit_target_api "gles2")
-if(OPENGL_gles2_LIBRARY AND OPENGL_egl_LIBRARY)
- add_definitions(
- -DUSE_OPENGL_ES2
- -DUSE_EGLUT
- )
- add_subdirectory(${piglit_SOURCE_DIR}/tests
- ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
- )
-endif(OPENGL_gles2_LIBRARY AND OPENGL_egl_LIBRARY)
+add_definitions(
+ -DUSE_OPENGL_ES2
+ )
+link_libraries(glut_waffle)
+add_subdirectory(${piglit_SOURCE_DIR}/tests
+ ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
+ )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2a01ca0..f1ba7c2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,3 @@
-if(OPENGL_egl_LIBRARY)
- add_subdirectory(glut_egl)
-endif(OPENGL_egl_LIBRARY)
+if(USE_WAFFLE)
+ add_subdirectory(glut_waffle)
+endif(USE_WAFFLE)
diff --git a/src/glut_egl/CMakeLists.no_api.txt b/src/glut_egl/CMakeLists.no_api.txt
deleted file mode 100644
index 90773c4..0000000
--- a/src/glut_egl/CMakeLists.no_api.txt
+++ b/dev/null
@@ -1,13 +0,0 @@
-include_directories(
- ${GLEXT_INCLUDE_DIR}
- ${OPENGL_INCLUDE_PATH}
- )
-
-link_libraries(${OPENGL_egl_LIBRARY})
-
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- piglit_add_library (glut_egl
- glut_egl.c
- glut_egl_x11.c
- )
-endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
diff --git a/src/glut_egl/glut_egl.c b/src/glut_egl/glut_egl.c
deleted file mode 100644
index 5dd80eb..0000000
--- a/src/glut_egl/glut_egl.c
+++ b/dev/null
@@ -1,406 +0,0 @@
-/*
- * Copyright (C) 2010 LunarG Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Chia-I Wu <olv@lunarg.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <sys/time.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#include <glut_egl/glut_eglint.h>
-
-static struct glut_state _glut_state = {
- .api_mask = GLUT_OPENGL_ES1_BIT,
- .display_mode = GLUT_RGB,
- .window_width = 300,
- .window_height = 300,
- .verbose = 0,
- .num_windows = 0,
-};
-
-struct glut_state *_glut = &_glut_state;
-
-void
-_glutFatal(char *format, ...)
-{
- va_list args;
-
- va_start(args, format);
-
- fprintf(stderr, "GLUT_EGL: ");
- vfprintf(stderr, format, args);
- va_end(args);
- putc('\n', stderr);
-
- exit(1);
-}
-
-/* return current time (in milliseconds) */
-int
-_glutNow(void)
-{
- struct timeval tv;
-#ifdef __VMS
- (void) gettimeofday(&tv, NULL );
-#else
- struct timezone tz;
- (void) gettimeofday(&tv, &tz);
-#endif
- return tv.tv_sec * 1000 + tv.tv_usec / 1000;
-}
-
-static void
-_glutDestroyWindow(struct glut_window *win)
-{
- if (_glut->surface_type != EGL_PBUFFER_BIT &&
- _glut->surface_type != EGL_SCREEN_BIT_MESA)
- eglDestroySurface(_glut->dpy, win->surface);
-
- _glutNativeFiniWindow(win);
-
- eglDestroyContext(_glut->dpy, win->context);
-}
-
-static EGLConfig
-_glutChooseConfig(void)
-{
- EGLConfig config;
- EGLint config_attribs[32];
- EGLint renderable_type, num_configs, i;
-
- i = 0;
- config_attribs[i++] = EGL_RED_SIZE;
- config_attribs[i++] = 1;
- config_attribs[i++] = EGL_GREEN_SIZE;
- config_attribs[i++] = 1;
- config_attribs[i++] = EGL_BLUE_SIZE;
- config_attribs[i++] = 1;
-
- config_attribs[i++] = EGL_ALPHA_SIZE;
- if (_glut->display_mode & GLUT_ALPHA)
- config_attribs[i++] = 1;
- else
- config_attribs[i++] = 0;
-
- config_attribs[i++] = EGL_DEPTH_SIZE;
- if (_glut->display_mode & GLUT_DEPTH)
- config_attribs[i++] = 1;
- else
- config_attribs[i++] = 0;
-
- config_attribs[i++] = EGL_STENCIL_SIZE;
- if (_glut->display_mode & GLUT_STENCIL)
- config_attribs[i++] = 1;
- else
- config_attribs[i++] = 0;
-
- config_attribs[i++] = EGL_SURFACE_TYPE;
- config_attribs[i++] = _glut->surface_type;
-
- config_attribs[i++] = EGL_RENDERABLE_TYPE;
- renderable_type = 0x0;
- if (_glut->api_mask & GLUT_OPENGL_BIT)
- renderable_type |= EGL_OPENGL_BIT;
- if (_glut->api_mask & GLUT_OPENGL_ES1_BIT)
- renderable_type |= EGL_OPENGL_ES_BIT;
- if (_glut->api_mask & GLUT_OPENGL_ES2_BIT)
- renderable_type |= EGL_OPENGL_ES2_BIT;
- if (_glut->api_mask & GLUT_OPENVG_BIT)
- renderable_type |= EGL_OPENVG_BIT;
- config_attribs[i++] = renderable_type;
-
- config_attribs[i] = EGL_NONE;
-
- if (!eglChooseConfig(_glut->dpy,
- config_attribs, &config, 1, &num_configs) || !num_configs)
- _glutFatal("failed to choose a config");
-
- return config;
-}
-
-static struct glut_window *
-_glutCreateWindow(const char *title, int x, int y, int w, int h)
-{
- struct glut_window *win;
- EGLint context_attribs[4];
- EGLint api, i;
-
- win = calloc(1, sizeof(*win));
- if (!win)
- _glutFatal("failed to allocate window");
-
- win->config = _glutChooseConfig();
-
- i = 0;
- context_attribs[i] = EGL_NONE;
-
- /* multiple APIs? */
-
- api = EGL_OPENGL_ES_API;
- if (_glut->api_mask & GLUT_OPENGL_BIT) {
- api = EGL_OPENGL_API;
- }
- else if (_glut->api_mask & GLUT_OPENVG_BIT) {
- api = EGL_OPENVG_API;
- }
- else if (_glut->api_mask & GLUT_OPENGL_ES2_BIT) {
- context_attribs[i++] = EGL_CONTEXT_CLIENT_VERSION;
- context_attribs[i++] = 2;
- }
-
- context_attribs[i] = EGL_NONE;
-
- eglBindAPI(api);
- win->context = eglCreateContext(_glut->dpy,
- win->config, EGL_NO_CONTEXT, context_attribs);
- if (!win->context)
- _glutFatal("failed to create context");
-
- _glutNativeInitWindow(win, title, x, y, w, h);
- switch (_glut->surface_type) {
- case EGL_WINDOW_BIT:
- win->surface = eglCreateWindowSurface(_glut->dpy,
- win->config, win->native.u.window, NULL);
- break;
- case EGL_PIXMAP_BIT:
- win->surface = eglCreatePixmapSurface(_glut->dpy,
- win->config, win->native.u.pixmap, NULL);
- break;
- case EGL_PBUFFER_BIT:
- case EGL_SCREEN_BIT_MESA:
- win->surface = win->native.u.surface;
- break;
- default:
- break;
- }
- if (win->surface == EGL_NO_SURFACE)
- _glutFatal("failed to create surface");
-
- return win;
-}
-
-void
-glutInitAPIMask(int mask)
-{
- _glut->api_mask = mask;
-}
-
-void
-glutInitDisplayMode(unsigned int mode)
-{
- _glut->display_mode = mode;
-}
-
-void
-glutInitWindowPosition(int x, int y)
-{
-}
-
-void
-glutInitWindowSize(int width, int height)
-{
- _glut->window_width = width;
- _glut->window_height = height;
-}
-
-void
-glutInit(int *argcp, char **argv)
-{
- int i;
-
- for (i = 1; i < *argcp; i++) {
- if (strcmp(argv[i], "-display") == 0)
- _glut->display_name = argv[++i];
- else if (strcmp(argv[i], "-info") == 0) {
- _glut->verbose = 1;
- }
- }
-
- _glutNativeInitDisplay();
- _glut->dpy = eglGetDisplay(_glut->native_dpy);
-
- if (!eglInitialize(_glut->dpy, &_glut->major, &_glut->minor))
- _glutFatal("failed to initialize EGL display");
-
- _glut->init_time = _glutNow();
-
- printf("EGL_VERSION = %s\n", eglQueryString(_glut->dpy, EGL_VERSION));
- if (_glut->verbose) {
- printf("EGL_VENDOR = %s\n", eglQueryString(_glut->dpy, EGL_VENDOR));
- printf("EGL_EXTENSIONS = %s\n",
- eglQueryString(_glut->dpy, EGL_EXTENSIONS));
- printf("EGL_CLIENT_APIS = %s\n",
- eglQueryString(_glut->dpy, EGL_CLIENT_APIS));
- }
-}
-
-int
-glutGet(int state)
-{
- int val;
-
- switch (state) {
- case GLUT_ELAPSED_TIME:
- val = _glutNow() - _glut->init_time;
- break;
- default:
- val = -1;
- break;
- }
-
- return val;
-}
-
-void
-glutIdleFunc(GLUT_EGLidleCB func)
-{
- _glut->idle_cb = func;
-}
-
-void
-glutPostRedisplay(void)
-{
- _glut->redisplay = 1;
-}
-
-void
-glutMainLoop(void)
-{
- struct glut_window *win = _glut->current;
-
- if (!win)
- _glutFatal("no window is created\n");
-
- if (win->reshape_cb)
- win->reshape_cb(win->native.width, win->native.height);
-
- _glutNativeEventLoop();
-}
-
-static void
-_glutFini(void)
-{
- eglTerminate(_glut->dpy);
- _glutNativeFiniDisplay();
-}
-
-void
-glutDestroyWindow(int win)
-{
- struct glut_window *window = _glut->current;
-
- if (window->index != win)
- return;
-
- /* XXX it causes some bug in st/egl KMS backend */
- if ( _glut->surface_type != EGL_SCREEN_BIT_MESA)
- eglMakeCurrent(_glut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-
- _glutDestroyWindow(_glut->current);
-}
-
-static void
-_glutDefaultKeyboard(unsigned char key, int x, int y)
-{
- if (key == 27) {
- if (_glut->current)
- glutDestroyWindow(_glut->current->index);
- _glutFini();
-
- exit(0);
- }
-}
-
-int
-glutCreateWindow(const char *title)
-{
- struct glut_window *win;
-
- win = _glutCreateWindow(title, 0, 0,
- _glut->window_width, _glut->window_height);
-
- win->index = _glut->num_windows++;
- win->reshape_cb = NULL;
- win->display_cb = NULL;
- win->keyboard_cb = _glutDefaultKeyboard;
- win->special_cb = NULL;
-
- if (!eglMakeCurrent(_glut->dpy, win->surface, win->surface, win->context))
- _glutFatal("failed to make window current");
- _glut->current = win;
-
- return win->index;
-}
-
-int
-glutGetWindowWidth(void)
-{
- struct glut_window *win = _glut->current;
- return win->native.width;
-}
-
-int
-glutGetWindowHeight(void)
-{
- struct glut_window *win = _glut->current;
- return win->native.height;
-}
-
-void
-glutDisplayFunc(GLUT_EGLdisplayCB func)
-{
- struct glut_window *win = _glut->current;
- win->display_cb = func;
-
-}
-
-void
-glutReshapeFunc(GLUT_EGLreshapeCB func)
-{
- struct glut_window *win = _glut->current;
- win->reshape_cb = func;
-}
-
-void
-glutKeyboardFunc(GLUT_EGLkeyboardCB func)
-{
- struct glut_window *win = _glut->current;
- win->keyboard_cb = func;
-}
-
-void
-glutSpecialFunc(GLUT_EGLspecialCB func)
-{
- struct glut_window *win = _glut->current;
- win->special_cb = func;
-}
-
-void
-glutSwapBuffers(void)
-{
-}
diff --git a/src/glut_egl/glut_egl_x11.c b/src/glut_egl/glut_egl_x11.c
deleted file mode 100644
index 7a857c8..0000000
--- a/src/glut_egl/glut_egl_x11.c
+++ b/dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (C) 2010 LunarG Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Chia-I Wu <olv@lunarg.com>
- */
-
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
-
-#include <glut_egl/glut_eglint.h>
-
-void
-_glutNativeInitDisplay(void)
-{
- _glut->native_dpy = XOpenDisplay(_glut->display_name);
- if (!_glut->native_dpy)
- _glutFatal("failed to initialize native display");
-
- _glut->surface_type = EGL_WINDOW_BIT;
-}
-
-void
-_glutNativeFiniDisplay(void)
-{
- XCloseDisplay(_glut->native_dpy);
-}
-
-void
-_glutNativeInitWindow(struct glut_window *win, const char *title,
- int x, int y, int w, int h)
-{
- XVisualInfo *visInfo, visTemplate;
- int num_visuals;
- Window root, xwin;
- XSetWindowAttributes attr;
- unsigned long mask;
- EGLint vid;
-
- if (!eglGetConfigAttrib(_glut->dpy,
- win->config, EGL_NATIVE_VISUAL_ID, &vid))
- _glutFatal("failed to get visual id");
-
- /* The X window visual must match the EGL config */
- visTemplate.visualid = vid;
- visInfo = XGetVisualInfo(_glut->native_dpy,
- VisualIDMask, &visTemplate, &num_visuals);
- if (!visInfo)
- _glutFatal("failed to get an visual of id 0x%x", vid);
-
- root = RootWindow(_glut->native_dpy, DefaultScreen(_glut->native_dpy));
-
- /* window attributes */
- attr.background_pixel = 0;
- attr.border_pixel = 0;
- attr.colormap = XCreateColormap(_glut->native_dpy,
- root, visInfo->visual, AllocNone);
- attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;
- mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
-
- xwin = XCreateWindow(_glut->native_dpy, root, x, y, w, h,
- 0, visInfo->depth, InputOutput, visInfo->visual, mask, &attr);
- if (!xwin)
- _glutFatal("failed to create a window");
-
- XFree(visInfo);
-
- /* set hints and properties */
- {
- XSizeHints sizehints;
- sizehints.x = x;
- sizehints.y = y;
- sizehints.width = w;
- sizehints.height = h;
- sizehints.flags = USSize | USPosition;
- XSetNormalHints(_glut->native_dpy, xwin, &sizehints);
- XSetStandardProperties(_glut->native_dpy, xwin,
- title, title, None, (char **) NULL, 0, &sizehints);
- }
-
- XMapWindow(_glut->native_dpy, xwin);
-
- win->native.u.window = xwin;
- win->native.width = w;
- win->native.height = h;
-}
-
-void
-_glutNativeFiniWindow(struct glut_window *win)
-{
- XDestroyWindow(_glut->native_dpy, win->native.u.window);
-}
-
-static int
-lookup_keysym(KeySym sym)
-{
- int special;
-
- switch (sym) {
- case XK_F1:
- special = GLUT_KEY_F1;
- break;
- case XK_F2:
- special = GLUT_KEY_F2;
- break;
- case XK_F3:
- special = GLUT_KEY_F3;
- break;
- case XK_F4:
- special = GLUT_KEY_F4;
- break;
- case XK_F5:
- special = GLUT_KEY_F5;
- break;
- case XK_F6:
- special = GLUT_KEY_F6;
- break;
- case XK_F7:
- special = GLUT_KEY_F7;
- break;
- case XK_F8:
- special = GLUT_KEY_F8;
- break;
- case XK_F9:
- special = GLUT_KEY_F9;
- break;
- case XK_F10:
- special = GLUT_KEY_F10;
- break;
- case XK_F11:
- special = GLUT_KEY_F11;
- break;
- case XK_F12:
- special = GLUT_KEY_F12;
- break;
- case XK_KP_Left:
- case XK_Left:
- special = GLUT_KEY_LEFT;
- break;
- case XK_KP_Up:
- case XK_Up:
- special = GLUT_KEY_UP;
- break;
- case XK_KP_Right:
- case XK_Right:
- special = GLUT_KEY_RIGHT;
- break;
- case XK_KP_Down:
- case XK_Down:
- special = GLUT_KEY_DOWN;
- break;
- default:
- special = -1;
- break;
- }
-
- return special;
-}
-
-static void
-next_event(struct glut_window *win)
-{
- int redraw = 0;
- XEvent event;
-
- if (!XPending(_glut->native_dpy)) {
- if (_glut->idle_cb)
- _glut->idle_cb();
- return;
- }
-
- XNextEvent(_glut->native_dpy, &event);
-
- switch (event.type) {
- case Expose:
- redraw = 1;
- break;
- case ConfigureNotify:
- win->native.width = event.xconfigure.width;
- win->native.height = event.xconfigure.height;
- if (win->reshape_cb)
- win->reshape_cb(win->native.width, win->native.height);
- break;
- case KeyPress:
- {
- char buffer[1];
- KeySym sym;
- int r;
-
- r = XLookupString(&event.xkey,
- buffer, sizeof(buffer), &sym, NULL);
- if (r && win->keyboard_cb) {
- win->keyboard_cb(buffer[0], event.xkey.x, event.xkey.y);
- }
- else if (!r && win->special_cb) {
- r = lookup_keysym(sym);
- if (r >= 0)
- win->special_cb(r, event.xkey.x, event.xkey.y);
- }
- }
- redraw = 1;
- break;
- default:
- ; /*no-op*/
- }
-
- _glut->redisplay = redraw;
-}
-
-void
-_glutNativeEventLoop(void)
-{
- while (1) {
- struct glut_window *win = _glut->current;
-
- next_event(win);
-
- if (_glut->redisplay) {
- _glut->redisplay = 0;
-
- if (win->display_cb)
- win->display_cb();
- eglSwapBuffers(_glut->dpy, win->surface);
- }
- }
-}
diff --git a/src/glut_egl/glut_eglint.h b/src/glut_egl/glut_eglint.h
deleted file mode 100644
index 6287ec7..0000000
--- a/src/glut_egl/glut_eglint.h
+++ b/dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2010 LunarG Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Chia-I Wu <olv@lunarg.com>
- */
-
-#pragma once
-
-#include <EGL/egl.h>
-#include <glut_egl/glut_egl.h>
-
-struct glut_window {
- EGLConfig config;
- EGLContext context;
-
- /* initialized by native display */
- struct {
- union {
- EGLNativeWindowType window;
- EGLNativePixmapType pixmap;
- EGLSurface surface; /* pbuffer or screen surface */
- } u;
- int width, height;
- } native;
-
- EGLSurface surface;
-
- int index;
-
- GLUT_EGLreshapeCB reshape_cb;
- GLUT_EGLdisplayCB display_cb;
- GLUT_EGLkeyboardCB keyboard_cb;
- GLUT_EGLspecialCB special_cb;
-};
-
-struct glut_state {
- int api_mask;
- int display_mode;
- int window_width, window_height;
- const char *display_name;
- int verbose;
- int init_time;
-
- GLUT_EGLidleCB idle_cb;
-
- int num_windows;
-
- /* initialized by native display */
- EGLNativeDisplayType native_dpy;
- EGLint surface_type;
-
- EGLDisplay dpy;
- EGLint major, minor;
-
- struct glut_window *current;
-
- int redisplay;
-};
-
-extern struct glut_state *_glut;
-
-void
-_glutFatal(char *format, ...);
-
-int
-_glutNow(void);
-
-void
-_glutNativeInitDisplay(void);
-
-void
-_glutNativeFiniDisplay(void);
-
-void
-_glutNativeInitWindow(struct glut_window *win, const char *title,
- int x, int y, int w, int h);
-
-void
-_glutNativeFiniWindow(struct glut_window *win);
-
-void
-_glutNativeEventLoop(void);
diff --git a/src/glut_waffle/CMakeLists.no_api.txt b/src/glut_waffle/CMakeLists.no_api.txt
new file mode 100644
index 0000000..b49965a
--- a/dev/null
+++ b/src/glut_waffle/CMakeLists.no_api.txt
@@ -0,0 +1,6 @@
+include_directories(${WAFFLE_INCLUDE_DIR})
+link_libraries(${WAFFLE_waffle_LIBRARY})
+
+add_library(glut_waffle SHARED
+ glut_waffle.c
+ )
diff --git a/src/glut_egl/CMakeLists.txt b/src/glut_waffle/CMakeLists.txt
index 144a306..144a306 100644
--- a/src/glut_egl/CMakeLists.txt
+++ b/src/glut_waffle/CMakeLists.txt
diff --git a/src/glut_waffle/README.txt b/src/glut_waffle/README.txt
new file mode 100644
index 0000000..a8fe20e
--- a/dev/null
+++ b/src/glut_waffle/README.txt
@@ -0,0 +1,5 @@
+glut_waffle is transitionary only and not intended to be a permanent
+addition to Piglit. Its purpose is to make Piglit's transition from GLUT
+to Waffle go smoothly. Once the transition is complete, piglit-framework.c
+will be updated to use Waffle directly, and libglut_waffle will be
+removed.
diff --git a/src/glut_waffle/TODO.txt b/src/glut_waffle/TODO.txt
new file mode 100644
index 0000000..8663825
--- a/dev/null
+++ b/src/glut_waffle/TODO.txt
@@ -0,0 +1,2 @@
+* Support basic input.
+* Support multiple windows.
diff --git a/src/glut_waffle/glut_waffle.c b/src/glut_waffle/glut_waffle.c
new file mode 100644
index 0000000..60db674
--- a/dev/null
+++ b/src/glut_waffle/glut_waffle.c
@@ -0,0 +1,421 @@
+/*
+ * Copyright 2012 Intel Corporation
+ * Copyright 2010 LunarG Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "glut_waffle.h"
+
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include <EGL/egl.h>
+#include <waffle/waffle.h>
+
+extern int piglit_automatic;
+
+struct glut_waffle_window;
+
+struct glut_waffle_state {
+ /** \brief One of `WAFFLE_PLATFORM_*`. */
+ int waffle_platform;
+
+ /** \brief One of `WAFFLE_CONTEXT_OPENGL*`.
+ *
+ * The default value is `WAFFLE_CONTEXT_OPENGL`. To change the value,
+ * call glutInitAPIMask().
+ */
+ int waffle_context_api;
+
+ /** \brief A bitmask of enum glut_display_mode`. */
+ int display_mode;
+
+ int window_width;
+ int window_height;
+
+ int verbose;
+ int init_time;
+
+ GLUT_EGLidleCB idle_cb;
+
+ struct waffle_display *display;
+ struct waffle_context *context;
+ struct glut_window *window;
+
+ int redisplay;
+ int window_id_pool;
+};
+
+static struct glut_waffle_state _glut_waffle_state = {
+ .display_mode = GLUT_RGB,
+ .window_width = 300,
+ .window_height = 300,
+ .verbose = 0,
+ .window_id_pool = 0,
+};
+
+static struct glut_waffle_state *const _glut = &_glut_waffle_state;
+
+struct glut_window {
+ struct waffle_window *waffle;
+
+ int id;
+
+ GLUT_EGLreshapeCB reshape_cb;
+ GLUT_EGLdisplayCB display_cb;
+ GLUT_EGLkeyboardCB keyboard_cb;
+ GLUT_EGLspecialCB special_cb;
+};
+
+static void
+glutFatal(char *format, ...)
+{
+ va_list args;
+
+ va_start(args, format);
+
+ fflush(stdout);
+ fprintf(stderr, "glut_waffle: ");
+ vfprintf(stderr, format, args);
+ va_end(args);
+ putc('\n', stderr);
+
+ exit(1);
+}
+
+/** Return current time (in milliseconds). */
+static int
+glutNow(void)
+{
+ struct timeval tv;
+#ifdef __VMS
+ (void) gettimeofday(&tv, NULL );
+#else
+ struct timezone tz;
+ (void) gettimeofday(&tv, &tz);
+#endif
+ return tv.tv_sec * 1000 + tv.tv_usec / 1000;
+}
+
+void
+glutInitAPIMask(int mask)
+{
+ switch (mask) {
+ case GLUT_OPENGL_BIT:
+ _glut->waffle_context_api = WAFFLE_CONTEXT_OPENGL;
+ break;
+ case GLUT_OPENGL_ES1_BIT:
+ _glut->waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES1;
+ break;
+ case GLUT_OPENGL_ES2_BIT:
+ _glut->waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES2;
+ break;
+ default:
+ glutFatal("api_mask has bad value %#x", mask);
+ break;
+ }
+}
+
+void
+glutInit(int *argcp, char **argv)
+{
+ const char *piglit_platform;
+ const char *display_name = NULL;
+ bool ok = true;
+ int i;
+
+ int32_t waffle_init_attrib_list[] = {
+ WAFFLE_PLATFORM, 0x31415925,
+ 0,
+ };
+
+ for (i = 1; i < *argcp; i++) {
+ if (strcmp(argv[i], "-display") == 0)
+ display_name = argv[++i];
+ else if (strcmp(argv[i], "-info") == 0) {
+ printf("waffle_glut: ignoring -info\n");
+ }
+ }
+
+ _glut->waffle_context_api = WAFFLE_CONTEXT_OPENGL;
+
+ piglit_platform = getenv("PIGLIT_PLATFORM");
+ if (piglit_platform == NULL) {
+ _glut->waffle_platform = WAFFLE_PLATFORM_GLX;
+ } else if (!strcmp(piglit_platform, "glx")) {
+ _glut->waffle_platform = WAFFLE_PLATFORM_GLX;
+ } else if (!strcmp(piglit_platform, "x11_egl")) {
+ _glut->waffle_platform = WAFFLE_PLATFORM_X11_EGL;
+ } else if (!strcmp(piglit_platform, "wayland")) {
+ _glut->waffle_platform = WAFFLE_PLATFORM_WAYLAND;
+ } else {
+ glutFatal("environment var PIGLIT_PLATFORM has bad "
+ "value \"%s\"", piglit_platform);
+ }
+
+ waffle_init_attrib_list[1] = _glut->waffle_platform;
+ ok = waffle_init(waffle_init_attrib_list);
+ if (!ok)
+ glutFatal("waffle_init() failed");
+
+ _glut->display = waffle_display_connect(display_name);
+ if (!_glut->display)
+ glutFatal("waffle_display_connect() failed");
+
+ _glut->init_time = glutNow();
+}
+
+void
+glutInitDisplayMode(unsigned int mode)
+{
+ _glut->display_mode = mode;
+}
+
+void
+glutInitWindowPosition(int x, int y)
+{
+ // empty
+}
+
+void
+glutInitWindowSize(int width, int height)
+{
+ _glut->window_width = width;
+ _glut->window_height = height;
+}
+
+static struct waffle_config*
+glutChooseConfig(void)
+{
+ struct waffle_config *config = NULL;
+ int32_t attrib_list[64];
+ int i = 0;
+
+ #define ADD_ATTR(name, value) \
+ do { \
+ attrib_list[i++] = name; \
+ attrib_list[i++] = value; \
+ } while (0)
+
+ ADD_ATTR(WAFFLE_CONTEXT_API, _glut->waffle_context_api);
+
+ if (_glut->display_mode & (GLUT_RGB | GLUT_RGBA)) {
+ ADD_ATTR(WAFFLE_RED_SIZE, 1);
+ ADD_ATTR(WAFFLE_GREEN_SIZE, 1);
+ ADD_ATTR(WAFFLE_BLUE_SIZE, 1);
+ }
+
+ if (_glut->display_mode & (GLUT_ALPHA | GLUT_RGBA)) {
+ ADD_ATTR(WAFFLE_ALPHA_SIZE, 1);
+ }
+
+ if (_glut->display_mode & GLUT_DEPTH) {
+ ADD_ATTR(WAFFLE_DEPTH_SIZE, 1);
+ }
+
+ if (_glut->display_mode & GLUT_STENCIL) {
+ ADD_ATTR(WAFFLE_STENCIL_SIZE, 1);
+ }
+
+ if (!(_glut->display_mode & GLUT_DOUBLE)) {
+ ADD_ATTR(WAFFLE_DOUBLE_BUFFERED, false);
+ }
+
+ if (_glut->display_mode & GLUT_ACCUM) {
+ ADD_ATTR(WAFFLE_ACCUM_BUFFER, true);
+ }
+
+ attrib_list[i++] = WAFFLE_NONE;
+
+ config = waffle_config_choose(_glut->display, attrib_list);
+ if (!config)
+ glutFatal("waffle_config_choose() failed");
+ return config;
+}
+
+int
+glutGet(int state)
+{
+ int val;
+
+ switch (state) {
+ case GLUT_ELAPSED_TIME:
+ val = glutNow() - _glut->init_time;
+ break;
+ default:
+ val = -1;
+ break;
+ }
+
+ return val;
+}
+
+void
+glutIdleFunc(GLUT_EGLidleCB func)
+{
+ _glut->idle_cb = func;
+}
+
+void
+glutPostRedisplay(void)
+{
+ _glut->redisplay = 1;
+}
+
+static void
+_glutDefaultKeyboard(unsigned char key, int x, int y)
+{
+ if (key == 27)
+ exit(0);
+}
+
+int
+glutCreateWindow(const char *title)
+{
+ bool ok = true;
+ struct waffle_config *config = NULL;
+
+ if (_glut->window)
+ glutFatal("cannot create window; one already exists");
+
+ config = glutChooseConfig();
+
+ _glut->context = waffle_context_create(config, NULL);
+ if (!_glut->context)
+ glutFatal("waffle_context_create() failed");
+
+ _glut->window = calloc(1, sizeof(*_glut->window));
+ if (!_glut->window)
+ glutFatal("out of memory");
+
+ _glut->window->waffle = waffle_window_create(config,
+ _glut->window_width,
+ _glut->window_height);
+ if (!_glut->window->waffle)
+ glutFatal("waffle_window_create() failed");
+
+ ok = waffle_make_current(_glut->display, _glut->window->waffle,
+ _glut->context);
+ if (!ok)
+ glutFatal("waffle_make_current() failed");
+
+ _glut->window->id = ++_glut->window_id_pool;
+ _glut->window->keyboard_cb = _glutDefaultKeyboard;
+
+ return _glut->window->id;
+}
+
+void
+glutDestroyWindow(int win)
+{
+ bool ok = true;
+
+ if (!_glut->window || _glut->window->id != win)
+ glutFatal("bad window id");
+
+ ok = waffle_window_destroy(_glut->window->waffle);
+ if (!ok)
+ glutFatal("waffle_window_destroy() failed");
+
+ free(_glut->window);
+ _glut->window = NULL;
+}
+
+void
+glutShowWindow(int win)
+{
+ bool ok = true;
+
+ if (!_glut->window || _glut->window->id != win)
+ glutFatal("bad window id");
+
+ ok = waffle_window_show(_glut->window->waffle);
+ if (!ok)
+ glutFatal("waffle_window_show() failed");
+}
+
+void
+glutDisplayFunc(GLUT_EGLdisplayCB func)
+{
+ _glut->window->display_cb = func;
+}
+
+void
+glutReshapeFunc(GLUT_EGLreshapeCB func)
+{
+ _glut->window->reshape_cb = func;
+}
+
+void
+glutKeyboardFunc(GLUT_EGLkeyboardCB func)
+{
+ _glut->window->keyboard_cb = func;
+}
+
+void
+glutSpecialFunc(GLUT_EGLspecialCB func)
+{
+ _glut->window->special_cb = func;
+}
+
+void
+glutMainLoop(void)
+{
+ bool ok = true;
+
+ if (!_glut->window)
+ glutFatal("no window is created");
+
+ ok = waffle_window_show(_glut->window->waffle);
+ if (!ok)
+ glutFatal("waffle_window_show() failed");
+
+ if (_glut->window->reshape_cb)
+ _glut->window->reshape_cb(_glut->window_width,
+ _glut->window_height);
+
+ if (_glut->window->display_cb)
+ _glut->window->display_cb();
+
+ if (_glut->window)
+ waffle_window_swap_buffers(_glut->window->waffle);
+
+ // FIXME: Tests run without -auto require basic input.
+
+ // Workaround for input:
+ // Since glut_waffle doesn't handle input yet, it sleeps in order to
+ // give the user a chance to see the test output. If the user wishes
+ // the test to sleep for a shorter or longer time, he can use Ctrl-C
+ // or Ctrl-Z.
+ sleep(20);
+}
+
+void
+glutSwapBuffers(void)
+{
+ bool ok = waffle_window_swap_buffers(_glut->window->waffle);
+ if (!ok)
+ glutFatal("waffle_window_swap_buffers() failed");
+}
diff --git a/src/glut_egl/glut_egl.h b/src/glut_waffle/glut_waffle.h
index 8b51b64..0ac5ead 100644
--- a/src/glut_egl/glut_egl.h
+++ b/src/glut_waffle/glut_waffle.h
@@ -25,52 +25,32 @@
#pragma once
-enum {
- GLUT_RGB = 0,
- GLUT_RGBA = 0,
- GLUT_INDEX = 1,
- GLUT_SINGLE = 0,
- GLUT_DOUBLE = 2,
- GLUT_ACCUM = 4,
- GLUT_ALPHA = 8,
- GLUT_DEPTH = 16,
- GLUT_STENCIL = 32,
+enum glut_display_mode {
+ GLUT_RGB = 0,
+ GLUT_RGBA = 0,
+ GLUT_INDEX = 1,
+ GLUT_SINGLE = 0,
+ GLUT_DOUBLE = 2,
+ GLUT_ACCUM = 4,
+ GLUT_ALPHA = 8,
+ GLUT_DEPTH = 16,
+ GLUT_STENCIL = 32,
};
/* used by glutInitAPIMask */
-enum {
- GLUT_OPENGL_BIT = 0x1,
- GLUT_OPENGL_ES1_BIT = 0x2,
- GLUT_OPENGL_ES2_BIT = 0x4,
- GLUT_OPENVG_BIT = 0x8
-};
-
-/* used by GLUT_EGLspecialCB */
-enum {
- /* function keys */
- GLUT_KEY_F1 = 1,
- GLUT_KEY_F2 = 2,
- GLUT_KEY_F3 = 3,
- GLUT_KEY_F4 = 4,
- GLUT_KEY_F5 = 5,
- GLUT_KEY_F6 = 6,
- GLUT_KEY_F7 = 7,
- GLUT_KEY_F8 = 8,
- GLUT_KEY_F9 = 9,
- GLUT_KEY_F10 = 10,
- GLUT_KEY_F11 = 11,
- GLUT_KEY_F12 = 12,
-
- /* directional keys */
- GLUT_KEY_LEFT = 100,
- GLUT_KEY_UP = 101,
- GLUT_KEY_RIGHT = 102,
- GLUT_KEY_DOWN = 103,
+enum glut_api {
+ GLUT_OPENGL_BIT = 0x1,
+ GLUT_OPENGL_ES1_BIT = 0x2,
+ GLUT_OPENGL_ES2_BIT = 0x4,
};
/* used by glutGet */
enum {
- GLUT_ELAPSED_TIME
+ GLUT_ELAPSED_TIME,
+ GLUT_WINDOW_RED_SIZE,
+ GLUT_WINDOW_GREEN_SIZE,
+ GLUT_WINDOW_BLUE_SIZE,
+ GLUT_WINDOW_ALPHA_SIZE,
};
typedef void (*GLUT_EGLidleCB)(void);
@@ -92,11 +72,13 @@ void glutPostRedisplay(void);
void glutMainLoop(void);
+/**
+ * Create the window, but do not show it.
+ */
int glutCreateWindow(const char *title);
-void glutDestroyWindow(int win);
-int glutGetWindowWidth(void);
-int glutGetWindowHeight(void);
+void glutDestroyWindow(int win);
+void glutShowWindow(int win);
void glutDisplayFunc(GLUT_EGLdisplayCB func);
void glutReshapeFunc(GLUT_EGLreshapeCB func);
diff --git a/src/piglit/glut_wrap.h b/src/piglit/glut_wrap.h
index e28bac9..a1bddc3 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_EGLUT.
+ * USE_GLUT and USE_WAFFLE.
*/
#pragma once
@@ -42,7 +42,9 @@ extern "C" {
#include <windows.h>
#endif
-#ifdef USE_GLUT
+#if defined(USE_WAFFLE)
+# include <glut_waffle/glut_waffle.h>
+#elif defined(USE_GLUT)
# ifdef __APPLE__
# include <GLUT/glut.h>
@@ -60,10 +62,6 @@ extern "C" {
# endif
#endif
-#ifdef USE_EGLUT
-# include <glut_egl/glut_egl.h>
-#endif
-
#ifdef __cplusplus
} /* end extern "C" */
#endif
diff --git a/tests/asmparsertest/CMakeLists.gl.txt b/tests/asmparsertest/CMakeLists.gl.txt
index ee74560..b2efb9b 100644
--- a/tests/asmparsertest/CMakeLists.gl.txt
+++ b/tests/asmparsertest/CMakeLists.gl.txt
@@ -2,13 +2,11 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (asmparsertest asmparsertest.c)
diff --git a/tests/bugs/CMakeLists.gl.txt b/tests/bugs/CMakeLists.gl.txt
index 50f0715..64c3093 100644
--- a/tests/bugs/CMakeLists.gl.txt
+++ b/tests/bugs/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -10,7 +9,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (crash-cubemap-order crash-cubemap-order.c)
diff --git a/tests/egl/CMakeLists.gl.txt b/tests/egl/CMakeLists.gl.txt
index aa863b0..ddfbbef 100644
--- a/tests/egl/CMakeLists.gl.txt
+++ b/tests/egl/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
@@ -10,7 +9,6 @@ link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${OPENGL_egl_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
diff --git a/tests/fbo/CMakeLists.gl.txt b/tests/fbo/CMakeLists.gl.txt
index 34ac405..7025019 100644
--- a/tests/fbo/CMakeLists.gl.txt
+++ b/tests/fbo/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -10,9 +9,13 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
+if(NOT USE_WAFFLE)
+ # This test uses glutSolidSphere.
+ piglit_add_executable (fbo-depth-sample-compare fbo-depth-sample-compare.c)
+endif(NOT USE_WAFFLE)
+
piglit_add_executable (fbo-1d fbo-1d.c)
piglit_add_executable (fbo-alphatest-formats fbo-alphatest-formats.c)
piglit_add_executable (fbo-alphatest-nocolor fbo-alphatest-nocolor.c)
@@ -20,7 +23,6 @@ piglit_add_executable (fbo-alphatest-nocolor-ff fbo-alphatest-nocolor-ff.c)
piglit_add_executable (fbo-depth fbo-depth.c)
piglit_add_executable (fbo-depth-tex1d fbo-depth-tex1d.c)
piglit_add_executable (fbo-depthstencil fbo-depthstencil.c)
-piglit_add_executable (fbo-depth-sample-compare fbo-depth-sample-compare.c)
piglit_add_executable (fbo-depthtex fbo-depthtex.c)
piglit_add_executable (fbo-3d fbo-3d.c)
piglit_add_executable (fbo-array fbo-array.c)
diff --git a/tests/general/CMakeLists.gl.txt b/tests/general/CMakeLists.gl.txt
index 2c93b56..b2213c4 100644
--- a/tests/general/CMakeLists.gl.txt
+++ b/tests/general/CMakeLists.gl.txt
@@ -2,16 +2,19 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
+if(NOT USE_WAFFLE)
+ # This test uses glutCreateSubWindow.
+ piglit_add_executable (windowoverlap windowoverlap.c)
+endif(NOT USE_WAFFLE)
+
piglit_add_executable (array-stride array-stride.c)
piglit_add_executable (bgra-vert-attrib-pointer bgra-vert-attrib-pointer.c)
piglit_add_executable (bgra-sec-color-pointer bgra-sec-color-pointer.c)
@@ -121,7 +124,6 @@ piglit_add_executable (vbo-map-remap vbo-map-remap.c)
piglit_add_executable (vbo-bufferdata vbo-bufferdata.c)
piglit_add_executable (vbo-subdata-zero vbo-subdata-zero.c)
piglit_add_executable (vbo-subdata-sync vbo-subdata-sync.c)
-piglit_add_executable (windowoverlap windowoverlap.c)
piglit_add_executable (object_purgeable-api-pbo object_purgeable-api-pbo.c object_purgeable.c)
piglit_add_executable (object_purgeable-api-texture object_purgeable-api-texture.c object_purgeable.c)
piglit_add_executable (object_purgeable-api-vbo object_purgeable-api-vbo.c object_purgeable.c)
diff --git a/tests/glean/CMakeLists.gl.txt b/tests/glean/CMakeLists.gl.txt
index aadb9c4..fb06cbc 100644
--- a/tests/glean/CMakeLists.gl.txt
+++ b/tests/glean/CMakeLists.gl.txt
@@ -11,7 +11,6 @@ ENDIF ()
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${TIFF_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/util
)
@@ -93,7 +92,6 @@ target_link_libraries (glean
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
${X11_X11_LIB}
${TIFF_LIBRARY}
${CARBON_LIBRARY}
diff --git a/tests/gles2/CMakeLists.gles2.txt b/tests/gles2/CMakeLists.gles2.txt
index a32d35e..a7807d8 100644
--- a/tests/gles2/CMakeLists.gles2.txt
+++ b/tests/gles2/CMakeLists.gles2.txt
@@ -7,7 +7,6 @@ include_directories(
link_libraries(
${OPENGL_gles2_LIBRARY}
${OPENGL_egl_LIBRARY}
- glut_egl
piglitutil_gles2
)
diff --git a/tests/glslparsertest/CMakeLists.gl.txt b/tests/glslparsertest/CMakeLists.gl.txt
index f78e179..c2e9ba9 100644
--- a/tests/glslparsertest/CMakeLists.gl.txt
+++ b/tests/glslparsertest/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries(
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (glslparsertest glslparsertest.c)
diff --git a/tests/glslparsertest/CMakeLists.gles2.txt b/tests/glslparsertest/CMakeLists.gles2.txt
index b217722..1e37bed 100644
--- a/tests/glslparsertest/CMakeLists.gles2.txt
+++ b/tests/glslparsertest/CMakeLists.gles2.txt
@@ -1,5 +1,4 @@
link_libraries(
- glut_egl
piglitutil_${piglit_target_api}
${OPENGL_gles2_LIBRARY}
)
diff --git a/tests/glx/CMakeLists.gl.txt b/tests/glx/CMakeLists.gl.txt
index fc00635..874991b 100644
--- a/tests/glx/CMakeLists.gl.txt
+++ b/tests/glx/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
if(BUILD_GLX_TESTS)
@@ -14,7 +13,6 @@ endif(BUILD_GLX_TESTS)
link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
IF(BUILD_GLX_TESTS)
diff --git a/tests/hiz/CMakeLists.gl.txt b/tests/hiz/CMakeLists.gl.txt
index cd646f2..28d8f85 100644
--- a/tests/hiz/CMakeLists.gl.txt
+++ b/tests/hiz/CMakeLists.gl.txt
@@ -3,7 +3,6 @@ include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
piglit_add_library(hiz-util
@@ -16,7 +15,6 @@ link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable(hiz-depth-stencil-test-fbo-d0-s8 hiz-depth-stencil-test-fbo-d0-s8.c)
diff --git a/tests/mesa/tests/CMakeLists.gl.txt b/tests/mesa/tests/CMakeLists.gl.txt
index dc60f8e..ba95ce5 100644
--- a/tests/mesa/tests/CMakeLists.gl.txt
+++ b/tests/mesa/tests/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${PNG_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -9,7 +8,6 @@ include_directories(
link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
${PNG_LIBRARIES}
mesautil
)
diff --git a/tests/mesa/util/CMakeLists.gl.txt b/tests/mesa/util/CMakeLists.gl.txt
index d06db3a..f70ad41 100644
--- a/tests/mesa/util/CMakeLists.gl.txt
+++ b/tests/mesa/util/CMakeLists.gl.txt
@@ -2,14 +2,12 @@
include_directories (
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${PNG_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
${PNG_LIBRARIES}
)
add_definitions (
diff --git a/tests/shaders/CMakeLists.gl.txt b/tests/shaders/CMakeLists.gl.txt
index 9efc26a..4a5a174 100644
--- a/tests/shaders/CMakeLists.gl.txt
+++ b/tests/shaders/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -10,7 +9,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (glsl-max-vertex-attrib glsl-max-vertex-attrib.c)
diff --git a/tests/spec/amd_seamless_cubemap_per_texture/CMakeLists.gl.txt b/tests/spec/amd_seamless_cubemap_per_texture/CMakeLists.gl.txt
index 94f8795..2f9a36c 100644
--- a/tests/spec/amd_seamless_cubemap_per_texture/CMakeLists.gl.txt
+++ b/tests/spec/amd_seamless_cubemap_per_texture/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (amd_seamless_cubemap_per_texture amd_seamless_cubemap_per_texture.c)
diff --git a/tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt b/tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt
index 27e9204..926e50d 100644
--- a/tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt
+++ b/tests/spec/arb_blend_func_extended/api/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_blend_func_extended-bindfragdataindexed-invalid-parameters bindfragdataindexed-invalid-parameters.c)
diff --git a/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt b/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt
index 4f25d4c..ed7d96c 100644
--- a/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt
+++ b/tests/spec/arb_blend_func_extended/execution/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_blend_func_extended-fbo-extended-blend fbo-extended-blend.c)
diff --git a/tests/spec/arb_color_buffer_float/CMakeLists.gl.txt b/tests/spec/arb_color_buffer_float/CMakeLists.gl.txt
index 4db9a00..9bab8b2 100644
--- a/tests/spec/arb_color_buffer_float/CMakeLists.gl.txt
+++ b/tests/spec/arb_color_buffer_float/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/spec/arb_color_buffer_float
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_color_buffer_float-getteximage getteximage.c)
diff --git a/tests/spec/arb_copy_buffer/CMakeLists.gl.txt b/tests/spec/arb_copy_buffer/CMakeLists.gl.txt
index 017b526..fc3829d 100644
--- a/tests/spec/arb_copy_buffer/CMakeLists.gl.txt
+++ b/tests/spec/arb_copy_buffer/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (copy_buffer_coherency copy_buffer_coherency.c)
diff --git a/tests/spec/arb_debug_output/CMakeLists.gl.txt b/tests/spec/arb_debug_output/CMakeLists.gl.txt
index 1736589..77f0feb 100644
--- a/tests/spec/arb_debug_output/CMakeLists.gl.txt
+++ b/tests/spec/arb_debug_output/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_debug_output-api_error api_error.c)
diff --git a/tests/spec/arb_draw_buffers/CMakeLists.gl.txt b/tests/spec/arb_draw_buffers/CMakeLists.gl.txt
index dd4aaed..a28660b 100644
--- a/tests/spec/arb_draw_buffers/CMakeLists.gl.txt
+++ b/tests/spec/arb_draw_buffers/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_draw_buffers-state_change state_change.c)
diff --git a/tests/spec/arb_draw_elements_base_vertex/CMakeLists.gl.txt b/tests/spec/arb_draw_elements_base_vertex/CMakeLists.gl.txt
index 04174ee..a2b3dec 100644
--- a/tests/spec/arb_draw_elements_base_vertex/CMakeLists.gl.txt
+++ b/tests/spec/arb_draw_elements_base_vertex/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (draw-elements-instanced-base-vertex draw-elements-instanced-base-vertex.c)
diff --git a/tests/spec/arb_draw_instanced/execution/CMakeLists.gl.txt b/tests/spec/arb_draw_instanced/execution/CMakeLists.gl.txt
index 590127d..532f0fa 100644
--- a/tests/spec/arb_draw_instanced/execution/CMakeLists.gl.txt
+++ b/tests/spec/arb_draw_instanced/execution/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_draw_instanced-dlist dlist.c)
diff --git a/tests/spec/arb_es2_compatibility/CMakeLists.gl.txt b/tests/spec/arb_es2_compatibility/CMakeLists.gl.txt
index abac5a1..82245d2 100644
--- a/tests/spec/arb_es2_compatibility/CMakeLists.gl.txt
+++ b/tests/spec/arb_es2_compatibility/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -10,7 +9,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_es2_compatibility-depthrangef arb_es2_compatibility-depthrangef.c)
diff --git a/tests/spec/arb_fragment_program/CMakeLists.gl.txt b/tests/spec/arb_fragment_program/CMakeLists.gl.txt
index 2d51b72..545e6da 100644
--- a/tests/spec/arb_fragment_program/CMakeLists.gl.txt
+++ b/tests/spec/arb_fragment_program/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_fragment_program-minmax minmax.c)
diff --git a/tests/spec/arb_framebuffer_object/CMakeLists.gl.txt b/tests/spec/arb_framebuffer_object/CMakeLists.gl.txt
index 0783358..ac17f81 100644
--- a/tests/spec/arb_framebuffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_framebuffer_object/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable(get-renderbuffer-internalformat get-renderbuffer-internalformat.c)
diff --git a/tests/spec/arb_instanced_arrays/CMakeLists.gl.txt b/tests/spec/arb_instanced_arrays/CMakeLists.gl.txt
index d9685c5..1c75bcf 100644
--- a/tests/spec/arb_instanced_arrays/CMakeLists.gl.txt
+++ b/tests/spec/arb_instanced_arrays/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (instanced_arrays instanced_arrays.c)
diff --git a/tests/spec/arb_map_buffer_range/CMakeLists.gl.txt b/tests/spec/arb_map_buffer_range/CMakeLists.gl.txt
index cd9d6e4..eaf9217 100644
--- a/tests/spec/arb_map_buffer_range/CMakeLists.gl.txt
+++ b/tests/spec/arb_map_buffer_range/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (map_buffer_range_error_check map_buffer_range_error_check.c)
diff --git a/tests/spec/arb_multisample/CMakeLists.gl.txt b/tests/spec/arb_multisample/CMakeLists.gl.txt
index 623900d..0811058 100644
--- a/tests/spec/arb_multisample/CMakeLists.gl.txt
+++ b/tests/spec/arb_multisample/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_multisample-beginend beginend.c)
diff --git a/tests/spec/arb_robustness/CMakeLists.gl.txt b/tests/spec/arb_robustness/CMakeLists.gl.txt
index e19a598..5bd3c25 100644
--- a/tests/spec/arb_robustness/CMakeLists.gl.txt
+++ b/tests/spec/arb_robustness/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/spec/arb_robustness
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_robustness_draw-vbo-bounds draw-vbo-bounds.c)
diff --git a/tests/spec/arb_sampler_objects/CMakeLists.gl.txt b/tests/spec/arb_sampler_objects/CMakeLists.gl.txt
index 1046be8..479fe48 100644
--- a/tests/spec/arb_sampler_objects/CMakeLists.gl.txt
+++ b/tests/spec/arb_sampler_objects/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (sampler-objects sampler-objects.c)
diff --git a/tests/spec/arb_seamless_cube_map/CMakeLists.gl.txt b/tests/spec/arb_seamless_cube_map/CMakeLists.gl.txt
index 2a6bdd3..6f25470 100644
--- a/tests/spec/arb_seamless_cube_map/CMakeLists.gl.txt
+++ b/tests/spec/arb_seamless_cube_map/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_seamless_cubemap arb_seamless_cubemap.c)
diff --git a/tests/spec/arb_shader_objects/CMakeLists.gl.txt b/tests/spec/arb_shader_objects/CMakeLists.gl.txt
index 984698b..903a29f 100644
--- a/tests/spec/arb_shader_objects/CMakeLists.gl.txt
+++ b/tests/spec/arb_shader_objects/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_shader_objects-bindattriblocation-scratch-name bindattriblocation-scratch-name.c)
diff --git a/tests/spec/arb_shader_texture_lod/execution/CMakeLists.gl.txt b/tests/spec/arb_shader_texture_lod/execution/CMakeLists.gl.txt
index e1e83f8..7ddc580 100644
--- a/tests/spec/arb_shader_texture_lod/execution/CMakeLists.gl.txt
+++ b/tests/spec/arb_shader_texture_lod/execution/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_shader_texture_lod-texgrad texgrad.c)
diff --git a/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt b/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
index fd71ff7..23dcfad 100644
--- a/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_texture_buffer_object-dlist dlist.c)
diff --git a/tests/spec/arb_texture_compression/CMakeLists.gl.txt b/tests/spec/arb_texture_compression/CMakeLists.gl.txt
index 0e09dcc..55039e1 100644
--- a/tests/spec/arb_texture_compression/CMakeLists.gl.txt
+++ b/tests/spec/arb_texture_compression/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_texture_compression-internal-format-query internal-format-query.c)
diff --git a/tests/spec/arb_texture_float/CMakeLists.gl.txt b/tests/spec/arb_texture_float/CMakeLists.gl.txt
index 14df21f..b8fdfde 100644
--- a/tests/spec/arb_texture_float/CMakeLists.gl.txt
+++ b/tests/spec/arb_texture_float/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_texture_float-texture-float-formats texture-float-formats.c)
diff --git a/tests/spec/arb_texture_storage/CMakeLists.gl.txt b/tests/spec/arb_texture_storage/CMakeLists.gl.txt
index a4d33d4..725349a 100644
--- a/tests/spec/arb_texture_storage/CMakeLists.gl.txt
+++ b/tests/spec/arb_texture_storage/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_texture_storage-texture-storage texture-storage.c)
diff --git a/tests/spec/arb_transform_feedback2/CMakeLists.gl.txt b/tests/spec/arb_transform_feedback2/CMakeLists.gl.txt
index fe4e04d..09fb9f9 100644
--- a/tests/spec/arb_transform_feedback2/CMakeLists.gl.txt
+++ b/tests/spec/arb_transform_feedback2/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_transform_feedback2-draw-auto draw-auto.c)
diff --git a/tests/spec/arb_uniform_buffer_object/CMakeLists.gl.txt b/tests/spec/arb_uniform_buffer_object/CMakeLists.gl.txt
index f0cc977..6d0a94f 100644
--- a/tests/spec/arb_uniform_buffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_uniform_buffer_object/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
add_executable (arb_uniform_buffer_object-getuniformblockindex getuniformblockindex.c)
diff --git a/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt b/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
index 60b0d6a..3cd5a5a 100644
--- a/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_vertex_buffer_object/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_vertex_buffer_object-elements-negative-offset elements-negative-offset.c)
diff --git a/tests/spec/arb_vertex_program/CMakeLists.gl.txt b/tests/spec/arb_vertex_program/CMakeLists.gl.txt
index a6e6252..8a79226 100644
--- a/tests/spec/arb_vertex_program/CMakeLists.gl.txt
+++ b/tests/spec/arb_vertex_program/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (arb_vertex_program-getenv4d-with-error getenv4d-with-error.c)
diff --git a/tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt b/tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt
index 8cfc832..5e9d9dc 100644
--- a/tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt
+++ b/tests/spec/arb_vertex_type_2_10_10_10_rev/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (draw-vertices-2101010 draw-vertices-2101010.c)
diff --git a/tests/spec/ati_draw_buffers/CMakeLists.gl.txt b/tests/spec/ati_draw_buffers/CMakeLists.gl.txt
index f333e8f..d5bef57 100644
--- a/tests/spec/ati_draw_buffers/CMakeLists.gl.txt
+++ b/tests/spec/ati_draw_buffers/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ati_draw_buffers-arbfp arbfp.c)
diff --git a/tests/spec/ati_envmap_bumpmap/CMakeLists.gl.txt b/tests/spec/ati_envmap_bumpmap/CMakeLists.gl.txt
index a1d5a00..412bb01 100644
--- a/tests/spec/ati_envmap_bumpmap/CMakeLists.gl.txt
+++ b/tests/spec/ati_envmap_bumpmap/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/spec/arb_color_buffer_float
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ati_envmap_bumpmap-bump bump.c)
diff --git a/tests/spec/ext_fog_coord/CMakeLists.gl.txt b/tests/spec/ext_fog_coord/CMakeLists.gl.txt
index 86e4505..b491b37 100644
--- a/tests/spec/ext_fog_coord/CMakeLists.gl.txt
+++ b/tests/spec/ext_fog_coord/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/spec/arb_color_buffer_float
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ext_fog_coord-modes modes.c)
diff --git a/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt b/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt
index c10043c..4ebb241 100644
--- a/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt
+++ b/tests/spec/ext_framebuffer_multisample/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ext_framebuffer_multisample-accuracy common.cpp accuracy.cpp)
diff --git a/tests/spec/ext_packed_depth_stencil/CMakeLists.gl.txt b/tests/spec/ext_packed_depth_stencil/CMakeLists.gl.txt
index 94c77b9..8ca8002 100644
--- a/tests/spec/ext_packed_depth_stencil/CMakeLists.gl.txt
+++ b/tests/spec/ext_packed_depth_stencil/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ext_packed_depth_stencil-readpixels-24_8 readpixels-24_8.c)
diff --git a/tests/spec/ext_packed_float/CMakeLists.gl.txt b/tests/spec/ext_packed_float/CMakeLists.gl.txt
index a0e6fab..9b33aa6 100644
--- a/tests/spec/ext_packed_float/CMakeLists.gl.txt
+++ b/tests/spec/ext_packed_float/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ext_packed_float-pack pack.c)
diff --git a/tests/spec/ext_texture_array/CMakeLists.gl.txt b/tests/spec/ext_texture_array/CMakeLists.gl.txt
index 578cc03..1648412 100644
--- a/tests/spec/ext_texture_array/CMakeLists.gl.txt
+++ b/tests/spec/ext_texture_array/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ext_texture_array-maxlayers maxlayers.c)
diff --git a/tests/spec/ext_texture_integer/CMakeLists.gl.txt b/tests/spec/ext_texture_integer/CMakeLists.gl.txt
index 072996a..674e151 100644
--- a/tests/spec/ext_texture_integer/CMakeLists.gl.txt
+++ b/tests/spec/ext_texture_integer/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/spec/arb_color_buffer_float
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ext_texture_integer-fbo-blending fbo-blending.c)
diff --git a/tests/spec/ext_timer_query/CMakeLists.gl.txt b/tests/spec/ext_timer_query/CMakeLists.gl.txt
index 057c25f..3ac563f 100644
--- a/tests/spec/ext_timer_query/CMakeLists.gl.txt
+++ b/tests/spec/ext_timer_query/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
IF (UNIX)
diff --git a/tests/spec/ext_transform_feedback/CMakeLists.gl.txt b/tests/spec/ext_transform_feedback/CMakeLists.gl.txt
index 2c984d2..b8c2693 100644
--- a/tests/spec/ext_transform_feedback/CMakeLists.gl.txt
+++ b/tests/spec/ext_transform_feedback/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (ext_transform_feedback-alignment alignment.c)
diff --git a/tests/spec/ext_unpack_subimage/CMakeLists.gles2.txt b/tests/spec/ext_unpack_subimage/CMakeLists.gles2.txt
index de58843..e798224 100644
--- a/tests/spec/ext_unpack_subimage/CMakeLists.gles2.txt
+++ b/tests/spec/ext_unpack_subimage/CMakeLists.gles2.txt
@@ -7,7 +7,6 @@ include_directories(
link_libraries(
${OPENGL_gles2_LIBRARY}
${OPENGL_egl_LIBRARY}
- glut_egl
piglitutil_gles2
)
diff --git a/tests/spec/gl-2.0/CMakeLists.gl.txt b/tests/spec/gl-2.0/CMakeLists.gl.txt
index 5ad939a..6d24003 100644
--- a/tests/spec/gl-2.0/CMakeLists.gl.txt
+++ b/tests/spec/gl-2.0/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (vertex-program-two-side vertex-program-two-side.c)
diff --git a/tests/spec/gl-2.0/api/CMakeLists.gl.txt b/tests/spec/gl-2.0/api/CMakeLists.gl.txt
index b455301..1d7737e 100644
--- a/tests/spec/gl-2.0/api/CMakeLists.gl.txt
+++ b/tests/spec/gl-2.0/api/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (getattriblocation-conventional getattriblocation-conventional.c)
diff --git a/tests/spec/gl-2.1/CMakeLists.gl.txt b/tests/spec/gl-2.1/CMakeLists.gl.txt
index f422313..edf9e71 100644
--- a/tests/spec/gl-2.1/CMakeLists.gl.txt
+++ b/tests/spec/gl-2.1/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (gl-2.1-minmax minmax.c)
diff --git a/tests/spec/gl-3.0/CMakeLists.gl.txt b/tests/spec/gl-3.0/CMakeLists.gl.txt
index 304e4d7..e3dbef1 100644
--- a/tests/spec/gl-3.0/CMakeLists.gl.txt
+++ b/tests/spec/gl-3.0/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (gl-3.0-minmax minmax.c)
diff --git a/tests/spec/gl-3.0/api/CMakeLists.gl.txt b/tests/spec/gl-3.0/api/CMakeLists.gl.txt
index a945dbb..924c17e 100644
--- a/tests/spec/gl-3.0/api/CMakeLists.gl.txt
+++ b/tests/spec/gl-3.0/api/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (bindfragdata-invalid-parameters bindfragdata-invalid-parameters.c)
diff --git a/tests/spec/gl-3.1/CMakeLists.gl.txt b/tests/spec/gl-3.1/CMakeLists.gl.txt
index 608e457..d30670c 100644
--- a/tests/spec/gl-3.1/CMakeLists.gl.txt
+++ b/tests/spec/gl-3.1/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (gl-3.1-minmax minmax.c)
diff --git a/tests/spec/glsl-1.10/execution/clipping/CMakeLists.gl.txt b/tests/spec/glsl-1.10/execution/clipping/CMakeLists.gl.txt
index 41454d2..9f5d48d 100644
--- a/tests/spec/glsl-1.10/execution/clipping/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.10/execution/clipping/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -10,7 +9,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (clip-plane-transformation clip-plane-transformation.c)
diff --git a/tests/spec/glsl-1.20/recursion/CMakeLists.gl.txt b/tests/spec/glsl-1.20/recursion/CMakeLists.gl.txt
index 2bac526..69cdaa2 100644
--- a/tests/spec/glsl-1.20/recursion/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.20/recursion/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (recursion recursion.c)
diff --git a/tests/spec/glsl-1.30/CMakeLists.gl.txt b/tests/spec/glsl-1.30/CMakeLists.gl.txt
index 3364994..b45dae9 100644
--- a/tests/spec/glsl-1.30/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.30/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (glsl-1.30-texel-offset-limits texel-offset-limits.c)
diff --git a/tests/spec/glsl-1.30/execution/CMakeLists.gl.txt b/tests/spec/glsl-1.30/execution/CMakeLists.gl.txt
index 8c64778..fd6691d 100644
--- a/tests/spec/glsl-1.30/execution/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.30/execution/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (fs-discard-exit-2 fs-discard-exit-2.c)
diff --git a/tests/spec/glsl-1.30/execution/clipping/CMakeLists.gl.txt b/tests/spec/glsl-1.30/execution/clipping/CMakeLists.gl.txt
index 0028686..6871f5c 100644
--- a/tests/spec/glsl-1.30/execution/clipping/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.30/execution/clipping/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -10,7 +9,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (max-clip-distances max-clip-distances.c)
diff --git a/tests/spec/glsl-1.30/linker/clipping/CMakeLists.gl.txt b/tests/spec/glsl-1.30/linker/clipping/CMakeLists.gl.txt
index c498072..626c632 100644
--- a/tests/spec/glsl-1.30/linker/clipping/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.30/linker/clipping/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -10,7 +9,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (mixing-clip-distance-and-clip-vertex-disallowed mixing-clip-distance-and-clip-vertex-disallowed.c)
diff --git a/tests/spec/glsl-1.40/CMakeLists.gl.txt b/tests/spec/glsl-1.40/CMakeLists.gl.txt
index 0d57dbc..dfa7f02 100644
--- a/tests/spec/glsl-1.40/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.40/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/spec/arb_color_buffer_float
${piglit_SOURCE_DIR}/tests/util
)
@@ -10,7 +9,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
add_executable (glsl-1.40-tf-no-position tf-no-position.c)
diff --git a/tests/spec/glx_arb_create_context/CMakeLists.gl.txt b/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
index 93aba50..aad93ae 100644
--- a/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
+++ b/tests/spec/glx_arb_create_context/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
if(BUILD_GLX_TESTS)
@@ -14,7 +13,6 @@ endif(BUILD_GLX_TESTS)
link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
IF(BUILD_GLX_TESTS)
diff --git a/tests/spec/glx_ext_import_context/CMakeLists.gl.txt b/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
index e6941f2..1eaa2ea 100644
--- a/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
+++ b/tests/spec/glx_ext_import_context/CMakeLists.gl.txt
@@ -2,7 +2,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
if(BUILD_GLX_TESTS)
@@ -14,7 +13,6 @@ endif(BUILD_GLX_TESTS)
link_libraries (
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
IF(BUILD_GLX_TESTS)
diff --git a/tests/spec/nv_conditional_render/CMakeLists.gl.txt b/tests/spec/nv_conditional_render/CMakeLists.gl.txt
index 670daac..4e7d4b2 100644
--- a/tests/spec/nv_conditional_render/CMakeLists.gl.txt
+++ b/tests/spec/nv_conditional_render/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (nv_conditional_render-begin-while-active begin-while-active.c)
diff --git a/tests/spec/nv_texture_barrier/CMakeLists.gl.txt b/tests/spec/nv_texture_barrier/CMakeLists.gl.txt
index 1b0394d..98adeb4 100644
--- a/tests/spec/nv_texture_barrier/CMakeLists.gl.txt
+++ b/tests/spec/nv_texture_barrier/CMakeLists.gl.txt
@@ -1,14 +1,12 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (blending-in-shader blending-in-shader.c)
diff --git a/tests/spec/oes_compressed_etc1_rgb8_texture/CMakeLists.gles1.txt b/tests/spec/oes_compressed_etc1_rgb8_texture/CMakeLists.gles1.txt
index c82c9c5..ce0511b 100644
--- a/tests/spec/oes_compressed_etc1_rgb8_texture/CMakeLists.gles1.txt
+++ b/tests/spec/oes_compressed_etc1_rgb8_texture/CMakeLists.gles1.txt
@@ -4,7 +4,6 @@ include_directories(
)
link_libraries(
- glut_egl
piglitutil_${piglit_target_api}
${OPENGL_gles1_LIBRARY}
)
diff --git a/tests/spec/oes_compressed_paletted_texture/CMakeLists.gles1.txt b/tests/spec/oes_compressed_paletted_texture/CMakeLists.gles1.txt
index 11192d3..f615b12 100644
--- a/tests/spec/oes_compressed_paletted_texture/CMakeLists.gles1.txt
+++ b/tests/spec/oes_compressed_paletted_texture/CMakeLists.gles1.txt
@@ -4,7 +4,6 @@ include_directories(
)
link_libraries(
- glut_egl
piglitutil_${piglit_target_api}
${OPENGL_gles1_LIBRARY}
)
diff --git a/tests/spec/oes_draw_texture/CMakeLists.gles1.txt b/tests/spec/oes_draw_texture/CMakeLists.gles1.txt
index 1ba0dd4..cdde780 100644
--- a/tests/spec/oes_draw_texture/CMakeLists.gles1.txt
+++ b/tests/spec/oes_draw_texture/CMakeLists.gles1.txt
@@ -7,7 +7,6 @@ include_directories(
link_libraries(
${OPENGL_gles1_LIBRARY}
${OPENGL_egl_LIBRARY}
- glut_egl
piglitutil_gles1
)
diff --git a/tests/texturing/CMakeLists.gl.txt b/tests/texturing/CMakeLists.gl.txt
index 37b8bc7..47f294b 100644
--- a/tests/texturing/CMakeLists.gl.txt
+++ b/tests/texturing/CMakeLists.gl.txt
@@ -2,16 +2,21 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
+if(NOT USE_WAFFLE)
+ # These tests use glutBitmapCharacter.
+ piglit_add_executable (getteximage-formats getteximage-formats.c)
+ piglit_add_executable (texture-packed-formats texture-packed-formats.c)
+ piglit_add_executable (texwrap texwrap.c)
+endif(NOT USE_WAFFLE)
+
piglit_add_executable (1-1-linear-texture 1-1-linear-texture.c)
piglit_add_executable (array-texture array-texture.c)
piglit_add_executable (compressedteximage compressedteximage.c)
@@ -30,7 +35,6 @@ piglit_add_executable (gen-nonzero-unit gen-nonzero-unit.c)
piglit_add_executable (gen-teximage gen-teximage.c)
piglit_add_executable (gen-texsubimage gen-texsubimage.c)
piglit_add_executable (getteximage-simple getteximage-simple.c)
-piglit_add_executable (getteximage-formats getteximage-formats.c)
piglit_add_executable (getteximage-luminance getteximage-luminance.c)
piglit_add_executable (incomplete-texture incomplete-texture.c)
piglit_add_executable (fragment-and-vertex-texturing fragment-and-vertex-texturing.c)
@@ -65,7 +69,6 @@ piglit_add_executable (texdepth texdepth.c)
piglit_add_executable (teximage-errors teximage-errors.c)
piglit_add_executable (texrect-many texrect-many.c)
piglit_add_executable (texredefine texredefine.c)
-piglit_add_executable (texture-packed-formats texture-packed-formats.c)
piglit_add_executable (texture-integer texture-integer.c)
piglit_add_executable (depth-tex-modes depth-tex-modes.c depth-tex-modes-common.c)
piglit_add_executable (depth-tex-modes-rg depth-tex-modes-rg.c depth-tex-modes-common.c)
@@ -83,6 +86,5 @@ ENDIF (UNIX)
piglit_add_executable (texsubimage texsubimage.c)
piglit_add_executable (texture-al texture-al.c)
piglit_add_executable (texture-rg texture-rg.c)
-piglit_add_executable (texwrap texwrap.c)
# vim: ft=cmake:
diff --git a/tests/texturing/shaders/CMakeLists.gl.txt b/tests/texturing/shaders/CMakeLists.gl.txt
index ac421dd..cab42d9 100644
--- a/tests/texturing/shaders/CMakeLists.gl.txt
+++ b/tests/texturing/shaders/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
${piglit_SOURCE_DIR}/tests/mesa/util
)
@@ -9,7 +8,6 @@ link_libraries (
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
- ${GLUT_glut_LIBRARY}
)
piglit_add_executable (textureSize textureSize.c common.c)
diff --git a/tests/util/CMakeLists.gl.txt b/tests/util/CMakeLists.gl.txt
index 3d08b97..7494de3 100644
--- a/tests/util/CMakeLists.gl.txt
+++ b/tests/util/CMakeLists.gl.txt
@@ -1,7 +1,6 @@
include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
- ${GLUT_INCLUDE_DIR}
)
set(UTIL_SOURCES
diff --git a/tests/util/CMakeLists.gles1.txt b/tests/util/CMakeLists.gles1.txt
index 9e4263a..95c42e5 100644
--- a/tests/util/CMakeLists.gles1.txt
+++ b/tests/util/CMakeLists.gles1.txt
@@ -6,7 +6,6 @@ set(UTIL_SOURCES
link_libraries(
${OPENGL_gles1_LIBRARY}
piglitutil_${piglit_target_api}
- glut_egl
)
piglit_add_library(piglitutil_${piglit_target_api}
diff --git a/tests/util/CMakeLists.gles2.txt b/tests/util/CMakeLists.gles2.txt
index 274ce4c..244de61 100644
--- a/tests/util/CMakeLists.gles2.txt
+++ b/tests/util/CMakeLists.gles2.txt
@@ -8,7 +8,6 @@ set(UTIL_SOURCES
link_libraries(
${OPENGL_gles2_LIBRARY}
piglitutil_${piglit_target_api}
- glut_egl
)
piglit_add_library(piglitutil_${piglit_target_api}
diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index c7fe8cb..e69127d 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -17,6 +17,7 @@ set(UTIL_SOURCES
piglit-util-enum.c
shader-load.c
piglit-framework.c
+ piglit-framework-fbo.c
rgb9e5.c
)
@@ -27,4 +28,8 @@ if(OPENGL_egl_LIBRARY)
)
endif(OPENGL_egl_LIBRARY)
+if(USE_WAFFLE)
+ link_libraries("${WAFFLE_waffle_LIBRARY}")
+endif(USE_WAFFLE)
+
piglit_include_target_api()
diff --git a/tests/util/piglit-framework-fbo.c b/tests/util/piglit-framework-fbo.c
new file mode 100644
index 0000000..37411e3
--- a/dev/null
+++ b/tests/util/piglit-framework-fbo.c
@@ -0,0 +1,330 @@
+/*
+ * Copyright © 2009-2012 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#if defined(USE_OPENGL_ES1)
+# define PIGLIT_FRAMEWORK_FBO_DISABLED
+#elif defined(USE_WAFFLE)
+# define PIGLIT_FRAMEWORK_FBO_USE_WAFFLE
+#elif defined(USE_GLX)
+# define PIGLIT_FRAMEWORK_FBO_USE_GLX
+#else
+# define PIGLIT_FRAMEWORK_FBO_DISABLED
+#endif
+
+#include <assert.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "piglit-util.h"
+#include "piglit-framework.h"
+#include "piglit-framework-fbo.h"
+
+#ifdef PIGLIT_FRAMEWORK_FBO_USE_GLX
+#include "piglit-glx-util.h"
+#endif
+
+#ifdef PIGLIT_FRAMEWORK_FBO_USE_WAFFLE
+#include <waffle/waffle.h>
+#endif
+
+bool piglit_use_fbo = false;
+
+#ifdef PIGLIT_FRAMEWORK_FBO_USE_GLX
+Display *piglit_glx_dpy;
+Window piglit_glx_window;
+XVisualInfo *piglit_glx_visinfo;
+GLXContext piglit_glx_context;
+#endif
+
+#ifdef PIGLIT_FRAMEWORK_FBO_USE_WAFFLE
+static struct waffle_display *piglit_waffle_display;
+static struct waffle_window *piglit_waffle_window;
+static struct waffle_context *piglit_waffle_context;
+#endif
+
+#ifdef PIGLIT_FRAMEWORK_FBO_USE_GLX
+static void
+piglit_framework_fbo_glx_init()
+{
+ piglit_glx_dpy = piglit_get_glx_display();
+
+ /* Unfortunately in GLX we need a drawable to bind our context
+ * to. Make an unmapped window.
+ */
+ piglit_glx_visinfo = piglit_get_glx_visual(piglit_glx_dpy);
+
+ piglit_glx_context = piglit_get_glx_context(piglit_glx_dpy,
+ piglit_glx_visinfo);
+
+ piglit_glx_window = piglit_get_glx_window_unmapped(piglit_glx_dpy,
+ piglit_glx_visinfo);
+
+ glXMakeCurrent(piglit_glx_dpy, piglit_glx_window, piglit_glx_context);
+}
+
+static void
+piglit_framework_fbo_glx_destroy()
+{
+ glXMakeCurrent(piglit_glx_dpy, None, None);
+ glXDestroyContext(piglit_glx_dpy, piglit_glx_context);
+ XFree(piglit_glx_visinfo);
+ XCloseDisplay(piglit_glx_dpy);
+}
+#endif
+
+#ifdef PIGLIT_FRAMEWORK_FBO_USE_WAFFLE
+/**
+ * \brief Print a description of the Waffle error and report test failure.
+ *
+ * The \a func_name is the name of the Waffle function that failed.
+ */
+static void
+fatal_waffle_error(const char *func_name)
+{
+ const struct waffle_error_info *info = waffle_error_get_info();
+ const char *error_name = waffle_error_to_string(info->code);
+
+ fflush(stdout);
+ fprintf(stderr, "%s failed with error: %s", func_name, error_name);
+ if (info->message_length > 0)
+ fprintf(stderr, ": %s", info->message);
+ fprintf(stderr, "\n");
+
+ piglit_report_result(PIGLIT_FAIL);
+}
+
+static void
+piglit_framework_fbo_waffle_init(void)
+{
+ int i;
+ bool ok = true;
+ const char *env_platform;
+ int32_t waffle_platform;
+ int32_t waffle_context_api;
+ int32_t init_attrib_list[64];
+ int32_t config_attrib_list[64];
+ struct waffle_config *config;
+
+ env_platform = getenv("WAFFLE_PLATFORM");
+
+ if (env_platform == NULL) {
+ waffle_platform = WAFFLE_PLATFORM_GLX;
+ } else if (!strcmp(env_platform, "glx")) {
+ waffle_platform = WAFFLE_PLATFORM_GLX;
+ } else if (!strcmp(env_platform, "x11_egl")) {
+ waffle_platform = WAFFLE_PLATFORM_X11_EGL;
+ } else if (!strcmp(env_platform, "wayland")) {
+ waffle_platform = WAFFLE_PLATFORM_WAYLAND;
+ } else {
+ fprintf(stderr, "environment var WAFFLE_PLATFORM has bad "
+ "value \"%s\"", env_platform);
+ }
+
+#if defined(USE_OPENGL)
+ waffle_context_api = WAFFLE_CONTEXT_OPENGL;
+#elif defined(USE_OPENGL_ES1)
+ waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES1;
+#elif defined(USE_OPENGL_ES2)
+ waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES2;
+#else
+# error
+#endif
+ i = 0;
+ init_attrib_list[i++] = WAFFLE_PLATFORM;
+ init_attrib_list[i++] = waffle_platform;
+ init_attrib_list[i++] = WAFFLE_NONE;
+
+ i = 0;
+ config_attrib_list[i++] = WAFFLE_CONTEXT_API;
+ config_attrib_list[i++] = waffle_context_api;
+ config_attrib_list[i++] = WAFFLE_RED_SIZE;
+ config_attrib_list[i++] = 1;
+ config_attrib_list[i++] = WAFFLE_GREEN_SIZE;
+ config_attrib_list[i++] = 1;
+ config_attrib_list[i++] = WAFFLE_BLUE_SIZE;
+ config_attrib_list[i++] = 1;
+ config_attrib_list[i++] = WAFFLE_DOUBLE_BUFFERED;
+ config_attrib_list[i++] = 1;
+ config_attrib_list[i++] = WAFFLE_NONE;
+
+ ok = waffle_init(init_attrib_list);
+ if (!ok)
+ fatal_waffle_error("waffle_init");
+
+ piglit_waffle_display = waffle_display_connect(NULL);
+ if (!piglit_waffle_display)
+ fatal_waffle_error("waffle_display_connect");
+
+ config = waffle_config_choose(piglit_waffle_display,
+ config_attrib_list);
+ if (!config)
+ fatal_waffle_error("waffle_config_choose");
+
+ piglit_waffle_context = waffle_context_create(config, NULL);
+ if (!piglit_waffle_context)
+ fatal_waffle_error("waffle_context_create");
+
+ piglit_waffle_window = waffle_window_create(config,
+ piglit_width,
+ piglit_height);
+ if (!piglit_waffle_window)
+ fatal_waffle_error("waffle_window_create");
+
+ ok = waffle_make_current(piglit_waffle_display,
+ piglit_waffle_window,
+ piglit_waffle_context);
+ if (!ok)
+ fatal_waffle_error("waffle_make_current");
+
+ // Cleanup.
+ ok = waffle_config_destroy(config);
+ if (!ok)
+ fatal_waffle_error("waffle_config_destroy");
+}
+
+static void
+piglit_framework_fbo_waffle_destroy(void)
+{
+ bool ok = true;
+
+ ok = waffle_make_current(piglit_waffle_display, NULL, NULL);
+ if (!ok)
+ fatal_waffle_error("waffle_make_current");
+
+ ok = waffle_context_destroy(piglit_waffle_context);
+ if (!ok)
+ fatal_waffle_error("waffle_context_destroy");
+
+ ok = waffle_display_disconnect(piglit_waffle_display);
+ if (!ok)
+ fatal_waffle_error("waffle_display_connect");
+
+ piglit_waffle_display = NULL;
+ piglit_waffle_context = NULL;
+}
+#endif
+
+static bool
+piglit_framework_fbo_gl_init()
+{
+#ifdef PIGLIT_FRAMEWORK_FBO_DISABLED
+ return false;
+#else
+ GLuint tex, depth = 0;
+ GLenum status;
+
+#ifdef USE_OPENGL
+ glewInit();
+
+ if (piglit_get_gl_version() < 20)
+ return false;
+#endif
+
+ glGenFramebuffers(1, &piglit_winsys_fbo);
+ glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
+
+ glGenTextures(1, &tex);
+ glBindTexture(GL_TEXTURE_2D, tex);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
+ piglit_width, piglit_height, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glFramebufferTexture2D(GL_FRAMEBUFFER,
+ GL_COLOR_ATTACHMENT0,
+ GL_TEXTURE_2D,
+ tex,
+ 0);
+
+ if (piglit_window_mode & (GLUT_DEPTH | GLUT_STENCIL)) {
+ GLenum depth_stencil;
+
+#ifdef USE_OPENGL
+ depth_stencil = GL_DEPTH_STENCIL;
+#else
+ depth_stencil = GL_DEPTH_STENCIL_OES;
+#endif
+
+ glGenTextures(1, &depth);
+ glBindTexture(GL_TEXTURE_2D, depth);
+ glTexImage2D(GL_TEXTURE_2D, 0, depth_stencil,
+ piglit_width, piglit_height, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glFramebufferTexture2D(GL_FRAMEBUFFER,
+ GL_DEPTH_ATTACHMENT,
+ GL_TEXTURE_2D,
+ depth,
+ 0);
+ glFramebufferTexture2D(GL_FRAMEBUFFER,
+ GL_STENCIL_ATTACHMENT,
+ GL_TEXTURE_2D,
+ depth,
+ 0);
+ }
+
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
+ if (status != GL_FRAMEBUFFER_COMPLETE) {
+ fprintf(stderr,
+ "-fbo resulted in incomplete FBO, falling back\n");
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+
+ glDeleteTextures(1, &depth);
+ glDeleteTextures(1, &tex);
+
+ piglit_framework_fbo_destroy();
+
+ return false;
+ }
+
+ return true;
+#endif /* PIGLIT_FRAMEWORK_FBO_DISABLED */
+}
+
+bool
+piglit_framework_fbo_init(void)
+{
+#if defined(PIGLIT_FRAMEWORK_FBO_USE_GLX)
+ piglit_framework_fbo_glx_init();
+#elif defined(PIGLIT_FRAMEWORK_FBO_USE_WAFFLE)
+ piglit_framework_fbo_waffle_init();
+#endif
+
+ return piglit_framework_fbo_gl_init();
+}
+
+void
+piglit_framework_fbo_destroy(void)
+{
+#ifdef USE_OPENGL
+ glDeleteFramebuffers(1, &piglit_winsys_fbo);
+#endif
+
+ piglit_winsys_fbo = 0;
+
+#if defined(PIGLIT_FRAMEWORK_FBO_USE_GLX)
+ piglit_framework_fbo_glx_destroy();
+#elif defined(PIGLIT_FRAMEWORK_FBO_USE_WAFFLE)
+ piglit_framework_fbo_waffle_destroy();
+#endif
+}
diff --git a/tests/util/piglit-framework-fbo.h b/tests/util/piglit-framework-fbo.h
new file mode 100644
index 0000000..af55472
--- a/dev/null
+++ b/tests/util/piglit-framework-fbo.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright © 2012 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include "piglit-util.h"
+
+extern bool piglit_use_fbo;
+
+bool piglit_framework_fbo_init(void);
+void piglit_framework_fbo_destroy(void);
diff --git a/tests/util/piglit-framework.c b/tests/util/piglit-framework.c
index dac04b7..adbac09 100644
--- a/tests/util/piglit-framework.c
+++ b/tests/util/piglit-framework.c
@@ -34,21 +34,17 @@
#include "piglit-util.h"
#include "piglit-framework.h"
+#include "piglit-framework-fbo.h"
+
#ifdef USE_GLX
#include "piglit-glx-util.h"
#endif
int piglit_automatic = 0;
-bool piglit_use_fbo = false;
unsigned piglit_winsys_fbo = 0;
+
static int piglit_window;
static enum piglit_result result;
-#ifdef USE_GLX
-Display *piglit_glx_dpy;
-Window piglit_glx_window;
-XVisualInfo *piglit_glx_visinfo;
-GLXContext piglit_glx_context;
-#endif
static void
display(void)
@@ -98,7 +94,13 @@ piglit_framework_glut_init(int argc, char *argv[])
glutInitDisplayMode(piglit_window_mode);
piglit_window = glutCreateWindow(argv[0]);
-#ifdef USE_GLX
+#if defined(USE_GLX) && !defined(USE_WAFFLE)
+ /* If using waffle, then the current platform might not be GLX.
+ * So we can't call any GLX functions.
+ *
+ * FIXME: Detect the waffle platform and handle piglit_automatic
+ * FIXME: appropriately.
+ */
if (piglit_automatic)
piglit_glx_set_no_input();
#endif
@@ -112,126 +114,6 @@ piglit_framework_glut_init(int argc, char *argv[])
#endif
}
-#ifdef USE_GLX
-static void
-piglit_framework_fbo_glx_init()
-{
- piglit_glx_dpy = piglit_get_glx_display();
-
- /* Unfortunately in GLX we need a drawable to bind our context
- * to. Make an unmapped window.
- */
- piglit_glx_visinfo = piglit_get_glx_visual(piglit_glx_dpy);
-
- piglit_glx_context = piglit_get_glx_context(piglit_glx_dpy,
- piglit_glx_visinfo);
-
- piglit_glx_window = piglit_get_glx_window_unmapped(piglit_glx_dpy,
- piglit_glx_visinfo);
-
- glXMakeCurrent(piglit_glx_dpy, piglit_glx_window, piglit_glx_context);
-}
-#endif
-
-static void
-piglit_framework_fbo_glx_destroy()
-{
-#ifdef USE_GLX
- glXMakeCurrent(piglit_glx_dpy, None, None);
- glXDestroyContext(piglit_glx_dpy, piglit_glx_context);
- XFree(piglit_glx_visinfo);
- XCloseDisplay(piglit_glx_dpy);
-#endif
-}
-
-static void
-piglit_framework_fbo_destroy()
-{
-#ifdef USE_OPENGL
- glDeleteFramebuffers(1, &piglit_winsys_fbo);
-#endif
- piglit_winsys_fbo = 0;
- piglit_framework_fbo_glx_destroy();
-}
-
-static bool
-piglit_framework_fbo_init()
-{
-#ifdef USE_GLX
- GLuint tex, depth = 0;
- GLenum status;
-
- piglit_framework_fbo_glx_init();
-
-#ifdef USE_OPENGL
- glewInit();
-
- if (piglit_get_gl_version() < 20)
- return false;
-#endif
-
- glGenFramebuffers(1, &piglit_winsys_fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
-
- glGenTextures(1, &tex);
- glBindTexture(GL_TEXTURE_2D, tex);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
- piglit_width, piglit_height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER,
- GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D,
- tex,
- 0);
-
- if (piglit_window_mode & (GLUT_DEPTH | GLUT_STENCIL)) {
- GLenum depth_stencil;
-
-#ifdef USE_OPENGL
- depth_stencil = GL_DEPTH_STENCIL;
-#else
- depth_stencil = GL_DEPTH_STENCIL_OES;
-#endif
-
- glGenTextures(1, &depth);
- glBindTexture(GL_TEXTURE_2D, depth);
- glTexImage2D(GL_TEXTURE_2D, 0, depth_stencil,
- piglit_width, piglit_height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER,
- GL_DEPTH_ATTACHMENT,
- GL_TEXTURE_2D,
- depth,
- 0);
- glFramebufferTexture2D(GL_FRAMEBUFFER,
- GL_STENCIL_ATTACHMENT,
- GL_TEXTURE_2D,
- depth,
- 0);
- }
-
- glBindTexture(GL_TEXTURE_2D, 0);
-
- status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- if (status != GL_FRAMEBUFFER_COMPLETE) {
- fprintf(stderr,
- "-fbo resulted in incomplete FBO, falling back\n");
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
- glDeleteTextures(1, &depth);
- glDeleteTextures(1, &tex);
-
- piglit_framework_fbo_destroy();
-
- return false;
- }
-
- return true;
-#else /* USE_GLX */
- return false;
-#endif /* USE_GLX */
-}
-
static void
delete_arg(char *argv[], int argc, int arg)
{
diff --git a/tests/util/piglit-util.c b/tests/util/piglit-util.c
index 6bde4af..ea51209 100644
--- a/tests/util/piglit-util.c
+++ b/tests/util/piglit-util.c
@@ -96,15 +96,17 @@ void piglit_glutInit(int argc, char **argv)
{
glutInit(&argc, argv);
-#if defined USE_EGLUT && defined USE_OPENGL
- glutInitAPIMask(GLUT_OPENGL_BIT);
-#elif defined USE_EGLUT && defined USE_OPENGL_ES1
- glutInitAPIMask(GLUT_OPENGL_ES1_BIT);
-#elif defined USE_EGLUT && defined USE_OPENGL_ES2
- glutInitAPIMask(GLUT_OPENGL_ES2_BIT);
-#elif defined USE_EGLUT
-# error
-#endif
+# if defined(USE_WAFFLE)
+# if defined(USE_OPENGL)
+ glutInitAPIMask(GLUT_OPENGL_BIT);
+# elif defined(USE_OPENGL_ES1)
+ glutInitAPIMask(GLUT_OPENGL_ES1_BIT);
+# elif defined(USE_OPENGL_ES2)
+ glutInitAPIMask(GLUT_OPENGL_ES2_BIT);
+# else
+# error
+# endif
+# endif
}
bool piglit_is_gles()
diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
index 51c3220..204a680 100755
--- a/tests/util/piglit-util.h
+++ b/tests/util/piglit-util.h
@@ -130,7 +130,7 @@ extern const unsigned int fdo_bitmap_width;
extern const unsigned int fdo_bitmap_height;
/**
- * Call glutInit() and, if EGLUT is used, also call glutInitAPIMask().
+ * Call glutInit() and, if glut_waffle is used, also call glutInitAPIMask().
*/
void piglit_glutInit(int argc, char **argv);