summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-06-23dispatch: Use piglit-dispatch for GLES1Chad Versace1-67/+1
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>
2013-11-26util/gl: Define GL_GLEXT_PROTOTYPES for all GLES1 testsChad Versace1-0/+1
If you're writing a test, you want the extension prototypes defined. Each GLES1 test shouldn't need to define this. To fix this, define GL_GLEXT_PROTOTYPES in gl_wrap.h. This makes Piglit's behavior for GLES1 more closely match its behavior for GL/GLES2/GLES3. because gl_wrap.h *does* define the extension prototypes for those non-GLES1 apis. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2013-06-17glapi: Build and use piglit-dispatch for GLES2.Eric Anholt1-7/+3
We still build separate binaries because we aren't dynamically loading the GL for multi-API test sources, but we can almost completely use the same source file for the two builds, relying on piglit-dispatch to make up most of the difference. Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-11-29util/gl: Include GLES3 headersChad Versace1-0/+3
Let gl_wrap.h include the GLES3 headers when feature macro PIGLIT_USE_OPENGL_ES3 is defined. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-10-09util,glut_waffle: Remove unused sources from old GL test frameworkChad Versace10-712/+0
Remove directory src/glut_waffle. Remove piglit-framework-{fbo,glut}*. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09cmake,util: Switch GL tests to use new frameworkChad Versace2-9/+1
- Stop building old framework sources, piglit-framework-{fbo,glut}.c. - Stop building libglut_waffle. - Wire up piglit_gl_test_run() to use the new framework. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09cmake: Prefix cmake options and feature macros with PIGLITChad Versace3-9/+9
Some cmake options and features macros had form USE_${feature}, others BUILD_${category}_TESTS. This patch consistently prefixes all such options and macros with PIGLIT. Piglit, be a good code citizen. Namespace your variables. This patch was created with find . -type f | xargs sed -i \ -e 's/\(^\|[^_]\)\(USE_\(GLX\|GLUT\|WAFFLE\|OPENGL\|OPENGL_ES1\|OPENGL_ES2\)\)\($\|[^_]\)/\1PIGLIT_\2\4/g' \ -e 's/\(^\|[^_]\)\(BUILD_\(CL\|GLX\|GLES1\|GLES2\)_TESTS\)\($\|[^_]\)/\1PIGLIT_\2\4/g' \ Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-06glut_waffle: Improve error messagesChad Versace3-12/+29
When a waffle functions fails, print the complete error message returned emitted by waffle. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-04glut_waffle: Add input support for X11 [v2]Chad Versace5-9/+199
Add support for input when using glut_waffle's GLX and X11/EGL backends. Tested with fbo-clean-formats; I cycled through the tests with the keyboard and then quit with the escape key. v2: - Rewrite x11_event_loop() without continue, per brianp. - Remove spurious waffle_window_swap_buffers from x11_event_loop. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-04glut_waffle: Refactor some code into common.[ch]Chad Versace5-65/+124
This is in preparation for adding support for input to glut_waffle. Input for each platform (X11, Wayland, etc) will be implemented in a separate file. This patch moves common code needed for each platform from glut_waffle.c into common.[ch]. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-04glut_waffle: Remove unused codeChad Versace2-71/+0
I created glut_waffle by forking Piglit's (now extinct) glut_egl. Much of the code that glut_waffle inherited from glut_egl has never been used. This patch kills it. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-23glut_waffle: Always choose a config with RGBAChad Versace1-9/+8
It is impossible to not request RGBA because GLUT_RGB and GLUT_RGBA are both 0. That is, (display_mode & (GLUT_RGB | GLUT_RGBA)) is unconditonally true. Signed-off-by: Chad Versace <chad@chad.versace.us>
2012-08-23cmake,waffle: Bump requirement to waffle>=1.0Chad Versace2-3/+2
If piglit is configured to use waffle, then use pkgconfig to require waffle>=1.0. Also, replace the custom cmake WAFFLE variables with those provided by the pkg_check_modules. Waffle 1.0 moved its header directory from $prefix/include/waffle to $prefix/include/waffle-1. So add '-I $prefix/include/waffle-1' to the CFLAGS and update the #include directives appropriately. Signed-off-by: Chad Versace <chad@chad.versace.us>
2012-07-15glut_waffle: Fix glutMainLoopChad Versace1-3/+0
Stop calling waffle_swap_buffers() from glutMainLoop. It breaks tests in non-auto mode. It's the test's responsibility to call swapBuffers, anyway. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23glut_egl: Remove all references to glut_eglChad Versace1-3/+1
This patch removes the last remaining references, which were in #ifdef's and comments. They were found with `grep -REi "eglut|glut_egl"`. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23glut_egl: Remove glut_eglChad Versace7-875/+0
This patch removes the glut_egl directory. It has been replaced by glut_waffle. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23piglit: Include glut_waffle.h if USE_WAFFLE is enabledChad Versace1-4/+4
Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23glut_waffle: Add libglut_waffle [v3]Chad Versace7-0/+526
This patch adds libglut_waffle to the build. No tests use it yet. glut_waffle is an implementation of the subset of GLUT used by Piglit. 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. v2: Remove else blocks in glutChooseConfig that just set default values, per Anholt. v3: Fix typo that set WAFFLE_ACCUM_BUFFER to false. CC: Eric Anholt <eric@anholt.net> Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> [v1] Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> [v1] Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> [v1] Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-03-23piglit-dispatch: Switch to using piglit-dispatch instead of GLEW.Paul Berry1-11/+1
Previous patches set up the piglit-dispatch infrastructure but did not use it. This patch enables piglit-dispatch and uses it instead of GLEW. - No piglit regressions on Intel SandyBridge (Linux) or the nVidia binary blob for Linux. - One regression on Mac OSX: after this patch, shaders/gpu_shader4_attribs incorrectly skips. This happens because the functions tested by shaders/gpu_shader4_attribs are defined in both EXT_gpu_shader4 and NV_vertex_program4 extensions. Piglit-dispatch is not yet capable of understanding that a function might be defined with the same name in multiple extension specs (because it is based on the gl.spec file from www.opengl.org, which fails to encode this information). I plan to address this in a future patch. - Spot checked on Microsoft Windows. v2: Remove redundant includes of GL headers.
2012-03-23cmake: Replace calls to add_{executable,library} with wrappersChad Versace1-1/+1
Replace add_executable -> piglit_add_executable add_library -> piglit_add_library For now, each wrapper function trivially wraps the function it replaces, and so this patch changes no behavior. This commit was created using the command: sed -i -e "s/add_executable/piglit_add_executable/" -e "s/add_library/piglit_add_library/" $(find src/ tests/ -name "*CMakeLists*") Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-03-23Fixup APIENTRY macro on ApplePaul Berry1-0/+7
The version of glut.h that ships on Mac OSX undefines the APIENTRY macro. APIENTRY is used on Windows builds to specify that GL functions use the __stdcall calling convention, so it needs to be defined to be the empty string on Mac OSX. Previously this hasn't been a problem because all of the GL function prototypes and typedefs are finished by the time glut.h is included. However, when we switch to using piglit-dispatch instead of GLEW, there will be at least one compilation unit (piglit-dispatch.c) which needs to use the APIENTRY macro after including glut.h. This patch works around the problem by redefining APIENTRY to the correct value (which is the empty string) after including glut.h on Apple builds.
2012-01-10Add missing include pathsIan Romanick1-0/+5
This prevents build issues when EGL/egl.h or GLES/gl.h are not installed in the "usual" places. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-09-09piglit: add defines to gl_wrap.h to improve portabilityChia-I Wu1-5/+11
Define GL_TEXTURE_CUBE_MAP_* to GL_TEXTURE_CUBE_MAP_*_OES for GLES1. This should help us port piglit-util.c or some of the cubemap tests to GLES1 without or with less #ifdef ugliness. Also make sure we cannot include more than one set of headers from GL, GLES1, and GLES2 headers. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-09piglit: add GLES1 support to gl_wrap.hChia-I Wu1-1/+6
Use GLES1 headers when USE_OPENGL_ES1 is defined. Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
2011-03-14s/WIN32/_WIN32/José Fonseca2-2/+2
The proper macro for Windows operating systems is _WIN32 and not WIN32. Thanks to Vinson Lee to remind me of that.
2011-03-13Portability build fixes for MinGW.José Fonseca2-0/+8
2011-02-26piglit: Add correct location of Mac OS X OpenGL header files.Vinson Lee1-3/+9
The OpenGL header files on Mac OS X are in the OpenGL framework.
2011-02-26cmake: Do not add target glut_egl if OPENGL_egl_LIBRARY is not foundChad Versace1-1/+3
Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25glut_egl: Impose uniformity on include guardsChad Versace2-8/+2
Inconsistent spelling, and a typo too, existed among include guards. Just clobber them all and replace '#pragma once'. Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25glut_egl: Replace relative #includes with absolute #includesChad Versace4-7/+7
For example, replace #include "glut_egl.h" with #include <glut_egl/glut_egl.h> Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25glut_egl: Impose uniform naming scheme on functionsChad Versace4-141/+141
Some functions used the prefix 'glut', other 'glut_egl'. This changes all functions to use prefix 'glut'. Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25glut_egl: Build library glut_eglChad Versace3-16/+10
2011-02-25glut_egl: Move from tests/util/glut_egl to src/glut_eglChad Versace5-0/+879
The util directory is getting crowded, and glut_egl is not dependent on Piglit in any way. It should belong in its own directory. Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25piglit: Add header <piglit/glut_wrap.h>Chad Versace1-0/+58
A convenience header that includes the actual GLUT headers, which are chosen according to the macro definitions USE_GLUT and USE_EGLUT. Note: This belongs to a series that adds GLES2 support to Piglit. Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25piglit: Add header <piglit/gl_wrap.h>Chad Versace1-0/+56
A convenience header that includes the actual OpenGL headers, which are chosen according to the macro definitions USE_OPENGL and USE_OPENGL_ES2. Note: This belongs to a series that adds GLES2 support to Piglit. Signed-off-by: Chad Versace <chad.versace@intel.com>