diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2014-06-12 15:33:52 -0700 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2014-06-23 02:37:37 -0700 |
commit | 9bfd7de58d73e8ab5ad5cee76f612c599533a867 (patch) | |
tree | e76b62da6b9df4f444bfd9d00275fbd434eee48b | |
parent | a3b67e2c6a68783ac3e46f15d932e3c3b6f567dc (diff) |
dispatch: Use piglit-dispatch for GLES1
After having migrated piglit-dispatch to the Khronos XML,
moving GLES1 to piglit-dispatch was easy. This patch:
1. Fixes gl_wrap.h to include piglit-dispatch-gen.h instead of
<GLES/*.h>.
2. Deletes some ugly macro workarounds for GLES1 that piglit-dispatch
obsoletes.
3. Add piglit-dispatch*.c to libpiglitutil_gles1 in the CMake.
4. Call piglit_dispatch_init(PIGLIT_DISPATCH_ES1).
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r-- | src/piglit/gl_wrap.h | 68 | ||||
-rw-r--r-- | tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c | 9 | ||||
-rw-r--r-- | tests/util/CMakeLists.gl.txt | 2 | ||||
-rw-r--r-- | tests/util/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/util/piglit-framework-gl/piglit_wfl_framework.c | 4 | ||||
-rw-r--r-- | tests/util/piglit-shader.h | 45 |
6 files changed, 7 insertions, 123 deletions
diff --git a/src/piglit/gl_wrap.h b/src/piglit/gl_wrap.h index e8bbbcdec..56492a7da 100644 --- a/src/piglit/gl_wrap.h +++ b/src/piglit/gl_wrap.h @@ -1,67 +1 @@ -/* - * Copyright (c) 2010 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. - * - * Authors: - * Chad Versace <chad.versace@intel.com> - */ - -/** - * \file gl_wrap.h - * \brief Convenience header that includes the actual OpenGL headers. - * - * The actual OpenGL headers are chosen according to the macro definitions - * PIGLIT_USE_OPENGL, PIGLIT_USE_OPENGL_ES1, and PIGLIT_USE_OPENGL_ES2. - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef _WIN32 -#include <windows.h> -#endif - -#if (defined(PIGLIT_USE_OPENGL) || \ - defined(PIGLIT_USE_OPENGL_ES2) || \ - defined(PIGLIT_USE_OPENGL_ES3)) -# include "piglit-dispatch.h" - -#elif defined(PIGLIT_USE_OPENGL_ES1) -# define GL_GLEXT_PROTOTYPES -# include <GLES/gl.h> -# include <GLES/glext.h> - - /* for source level compatibility */ -# define GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES -# define GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES -# define GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES -# define GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES -# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES -# define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES - -#endif - -#ifdef __cplusplus -} /* end extern "C" */ -#endif +#include "piglit-dispatch.h" diff --git a/tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c b/tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c index 688bbbd16..a87dd12ca 100644 --- a/tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c +++ b/tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c @@ -56,15 +56,6 @@ PIGLIT_GL_TEST_CONFIG_BEGIN PIGLIT_GL_TEST_CONFIG_END -#if defined PIGLIT_USE_OPENGL_ES1 -#define GL_TEXTURE_CUBE_MAP GL_TEXTURE_CUBE_MAP_OES -#define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES -#define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES -#define GL_UNSIGNED_INT_24_8 GL_UNSIGNED_INT_24_8_OES -#define GL_TEXTURE_3D 0x806F -#define glTexStorage2D glTexStorage2DEXT -#endif - static bool has_texture_3d = false; static bool has_texture_cube_map = false; static bool has_depth_texture_cube_map = false; diff --git a/tests/util/CMakeLists.gl.txt b/tests/util/CMakeLists.gl.txt index d414dd9e8..67833c93e 100644 --- a/tests/util/CMakeLists.gl.txt +++ b/tests/util/CMakeLists.gl.txt @@ -1,7 +1,5 @@ set(UTIL_GL_SOURCES ${UTIL_GL_SOURCES} - piglit-dispatch.c - piglit-dispatch-init.c piglit-matrix.c piglit-shader.c piglit-shader-gl.c diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt index 4443709e0..c36bab590 100644 --- a/tests/util/CMakeLists.txt +++ b/tests/util/CMakeLists.txt @@ -29,6 +29,8 @@ set(UTIL_GL_INCLUDES set(UTIL_GL_SOURCES fdo-bitmap.c + piglit-dispatch.c + piglit-dispatch-init.c piglit-util-gl-common.c piglit-framework-gl/piglit_gl_framework.c piglit-framework-gl.c diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.c b/tests/util/piglit-framework-gl/piglit_wfl_framework.c index 66643281c..e443f1b3e 100644 --- a/tests/util/piglit-framework-gl/piglit_wfl_framework.c +++ b/tests/util/piglit-framework-gl/piglit_wfl_framework.c @@ -516,8 +516,12 @@ make_context_current_singlepass(struct piglit_wfl_framework *wfl_fw, #ifdef PIGLIT_USE_OPENGL piglit_dispatch_default_init(PIGLIT_DISPATCH_GL); +#elif defined(PIGLIT_USE_OPENGL_ES1) + piglit_dispatch_default_init(PIGLIT_DISPATCH_ES1); #elif defined(PIGLIT_USE_OPENGL_ES2) || defined(PIGLIT_USE_OPENGL_ES3) piglit_dispatch_default_init(PIGLIT_DISPATCH_ES2); +#else +# error #endif ok = check_gl_version(test_config, flavor, ctx_desc); diff --git a/tests/util/piglit-shader.h b/tests/util/piglit-shader.h index e0503e65d..e2eef0393 100644 --- a/tests/util/piglit-shader.h +++ b/tests/util/piglit-shader.h @@ -52,51 +52,6 @@ GLint piglit_build_simple_program_multiple_shaders(GLenum target1, extern GLboolean piglit_program_pipeline_check_status(GLuint pipeline); extern GLboolean piglit_program_pipeline_check_status_quiet(GLuint pipeline); -#if defined(PIGLIT_USE_OPENGL_ES1) -#define glAttachShader assert(!"glAttachShader does not exist in ES1") -#define glBindAttribLocation assert(!"glBindAttribLocation does not exist in ES1") -#define glCompileShader assert(!"glCompileShader does not exist in ES1") -#define glCreateProgram assert(!"glCreateProgram does not exist in ES1") -#define glCreateShader assert(!"glCreateShader does not exist in ES1") -#define glDeleteProgram assert(!"glDeleteProgram does not exist in ES1") -#define glDeleteShader assert(!"glDeleteShader does not exist in ES1") -#define glGetActiveUniform assert(!"glGetActiveUniform does not exist in ES1") -#define glGetAttribLocation assert(!"glGetAttribLocation does not exist in ES1") -#define glGetProgramInfoLog assert(!"glGetProgramInfoLog does not exist in ES1") -#define glGetProgramiv assert(!"glGetProgramiv does not exist in ES1") -#define glGetShaderInfoLog assert(!"glGetShaderInfoLog does not exist in ES1") -#define glGetShaderiv assert(!"glGetShaderiv does not exist in ES1") -#define glGetUniformLocation assert(!"glGetUniformLocation does not exist in ES1") -#define glLinkProgram assert(!"glLinkProgram does not exist in ES1") -#define glShaderSource assert(!"glShaderSource does not exist in ES1") -#define glUseProgram assert(!"glUseProgram does not exist in ES1") -#define glUniform1f assert(!"glUniform1f does not exist in ES1") -#define glUniform2f assert(!"glUniform2f does not exist in ES1") -#define glUniform3f assert(!"glUniform3f does not exist in ES1") -#define glUniform4f assert(!"glUniform4f does not exist in ES1") -#define glUniform1fv assert(!"glUniform1fv does not exist in ES1") -#define glUniform2fv assert(!"glUniform2fv does not exist in ES1") -#define glUniform3fv assert(!"glUniform3fv does not exist in ES1") -#define glUniform4fv assert(!"glUniform4fv does not exist in ES1") -#define glUniform1i assert(!"glUniform1i does not exist in ES1") -#define glUniform2iv assert(!"glUniform2iv does not exist in ES1") -#define glUniform3iv assert(!"glUniform3iv does not exist in ES1") -#define glUniform4iv assert(!"glUniform4iv does not exist in ES1") -#define glUniformMatrix2fv assert(!"glUniformMatrix2fv does not exist in ES1") -#define glUniformMatrix3fv assert(!"glUniformMatrix3fv does not exist in ES1") -#define glUniformMatrix4fv assert(!"glUniformMatrix4fv does not exist in ES1") -#define glGetUniformfv assert(!"glGetUniformfv does not exist in ES1") -#define glVertexAttribPointer assert(!"glVertexAttribPointer does not exist in ES1") -#define glEnableVertexAttribArray assert(!"glEnableVertexAttribArray does not exist in ES1") -#define glDisableVertexAttribArray assert(!"glDisableVertexAttribArray does not exist in ES1") -#define glUniformMatrix2x3fv assert(!"glUniformMatrix2x3fv does not exist in ES1") -#define glUniformMatrix2x4fv assert(!"glUniformMatrix2x4fv does not exist in ES1") -#define glUniformMatrix3x2fv assert(!"glUniformMatrix3x2fv does not exist in ES1") -#define glUniformMatrix3x4fv assert(!"glUniformMatrix3x4fv does not exist in ES1") -#define glUniformMatrix4x2fv assert(!"glUniformMatrix4x2fv does not exist in ES1") -#define glUniformMatrix4x3fv assert(!"glUniformMatrix4x3fv does not exist in ES1") -#endif - /** * Require a specific version of GLSL. * |