aboutsummaryrefslogtreecommitdiff
path: root/tests/glx
AgeCommit message (Collapse)Author
2013-04-24Add test for concurrent shader compiler use.Mathias Froehlich
Add a test that creates two contexts and concurrently compiles shader programs to test race conditions of the shader compiler. v3: (Tom Stellard) - Report pass at the end of the tests - Add as a concurrent test v4: (Mathias Froehlich) - Fix comment style Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2013-03-19glx-query-drawable: Remove unused window variable.Rico Schüller
Signed-off-by: Brian Paul <brianp@vmware.com>
2013-03-01glx-query-drawable: Add cases for all drawable typesAdam Jackson
Default is still the GLX 1.2 thing of using a raw Window not a GLXWindow. Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-03-01glx-query-drawable: Require GLX 1.3Adam Jackson
... since that's when it was added. Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-02-19glx-multithread-makecurrent-*: Write the expected value for alphaIan Romanick
The tests would previously write 0.0 to the alpha and expect to read 1.0 back. If the test got a visual without alpha (and it doesn't request alpha), this would happen to work. However, drivers are not required to expose visuals without alpha, so the test might get an RGBA visual afterall. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59738 Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-29glx-swap-pixmap: Expect alpha = 1.0 if there is no alpha in the pixmapIan Romanick
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59833 Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-12-01glx-string-sanity: Fix string length miscalculation.Vinson Lee
Reported by Coverity Scan. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-28glx-swap-events: initialize GL dispatchMarek Olšák
Fixes a crash.
2012-11-20glx-multithread: Replace glFlush calls with glFinishPaul Berry
Currently, in Mesa with the i965 driver, calling glFlush() forces all pending drawing operations to be sent to the kernel; this ensures that any subsequent drawing operations will be performed after those pending drawing operations, even if they come from other contexts. The glx-multithread test was relying on this behaviour, however, the GL and GLX specs do not garantee this. This patch modifies the glx-multithread test to use glFinish() instead of glFlush(). Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-11-20glx-multithread: use XInitThreadsPaul Berry
To use multithreading with xlib, you're supposed to call XInitThreads before any other xlib call. Without this, xlib and GLX calls won't be thread safe. (Based on a patch by Ian Romanick <ian.d.romanick@intel.com>)
2012-11-16glx: Sanity check the various GLX extension strings that an app can queryIan Romanick
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56057
2012-11-14util: Kill macro glewInitChad Versace
No test actually called glewInit(), because piglit-dispatch #define'd it to piglit_dispatch_default_init(). This patch removes the macro and replaces each call to glewInit() with piglit_dispatch_default_init(). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09cmake: Prefix cmake options and feature macros with PIGLITChad Versace
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-06-28util: Move piglit-util to piglit-util-gl-commonBlaž Tomažič
Move piglit-util.* to piglit-util-gl-common.* Signed-off-by: Blaž Tomažič <blaz.tomazic@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23cmake: Relocate all GLUT directives into single locationChad Versace
Nearly all CMakeLists.gl.txt contained the following: include_directories(${GLUT_INCLUDE_DIR}) link_libraries(${GLUT_glut_LIBRARY}) This patch relocates them to cmake/target_api/gl/CMakeLists.txt. 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-03cmake: Fix piglit build when BUILD_GLX_TESTS=TrueAaron Watry
Commit ebf571b7959ab7b15b4588474a8613e110fab5a5 causes the piglitglxutil library to be after the glut library on the link command line, which causes the glutInit function to not be found. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-04-29cmake: only link X11 libraries when building GLX testsDylan Noblesmith
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-04-29cmake: add an option for building GLX testsDylan Noblesmith
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-04-09glx: Verify that GLX_DONT_CARE can be used with bitmask attributes (this ↵Ian Romanick
time for sure) This reproduces Mesa bugzilla #47478. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-04-06glx: Verify that GLX_DONT_CARE can be used with bitmask attributesIan Romanick
This reproduces Mesa bugzilla #47478. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-03-23cmake: Replace calls to add_{executable,library} with wrappersChad Versace
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-23Add glewInit() calls to glx tests.Paul Berry
Previously these tests didn't initialize GLEW, presumably because they only use (a) GL 1.0 functions, which bypass GLEW, and (b) GLX functions, which they bind to using glXGetProcAddressARB(). Once we switch to using piglit-dispatch instead of GLEW, we will need to initialize it in order for the GL 1.0 functions to work. This patch adds a call to glewInit() in the place where a call to piglit_dispatch_default_init() will eventually be needed. Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-07Stop using GLEW extension macrosPaul Berry
Several tests were checking for the presence of GL extensions using GLEW macros. This patch changes the tests to use piglit_is_extension_supported(), which provides the same functionality in a way that is not dependent on GLEW. v2: Follow piglit convention of including "GL_" in the string passed to piglit_is_extension_supported(). Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-07Stop using GLEW_VERSION_* macrosPaul Berry
Several tests were checking the GL version using GLEW's GLEW_VERSION_* macros. This patch changes the tests to use piglit_get_gl_version(), which provides the same functionality in a way that is not dependent on GLEW. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-03-03cmake: check for glproto headersDylan Noblesmith
And error out when they're not found, rather than failing to compile later when GL/glxproto.h can't be found.
2012-03-03tests/glx: fix Xrender detectionDylan Noblesmith
Use the variables CMake provides so that compilation won't break if Xrender is in a different include directory. v2: Just don't build the one test that needs it if it's not found.
2012-03-03don't write generated header to the source directoryDylan Noblesmith
It was impossible to have the source directory read-only. Also add the include_directories() directive for tests/util in just one place, under tests/, so that all subdirectories inherit it. A bunch of CMakeLists.txt files duplicate it, so delete those redundant include flags: sed -i -e "/^\t\${piglit_SOURCE_DIR}\/tests\/util/ d" \ `grep piglit_SOURCE_DIR -rl tests/ | grep "CMakeLists\.gl"`
2012-01-27glx-visuals-{depth,stencil}: Quiet warnings about main() return value.Eric Anholt
2012-01-27glx: Add variants of the glx-visuals-{depth,stencil} using pixmap FBConfigs.Eric Anholt
This ensures coverage of the 16-bit-depth FBconfigs on the Intel driver, which otherwise are untested.
2012-01-27glx-visuals-depth: New test for basic depth functionality per visual.Eric Anholt
There have been concerns that some changes in the intel driver might break specific visuals.
2012-01-20glx-swap-event: Silence declaration-after-statement warning.José Fonseca
This seems to be the only outstanding use of this feature in the source. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-12-26glx-multi-context-ib-1: Remove unnecessary header.Vinson Lee
Fixes Coverity unnecessary header file defect. Signed-off-by: Vinson Lee <vlee@vmware.com>
2011-12-01glx-swap-event: Remove unused variable.Vinson Lee
Fixes this GCC warning. glx-swap-event.c: In function ‘draw_frame’: glx-swap-event.c:122:12: warning: variable ‘dt’ set but not used [-Wunused-but-set-variable] Signed-off-by: Vinson Lee <vlee@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-29glx-query-drawable: Fix printf format warning.Vinson Lee
Fixes this GCC warning. glx-query-drawable.c: In function ‘usage_error’: glx-query-drawable.c:51: warning: format not a string literal and no format arguments Signed-off-by: Vinson Lee <vlee@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-14glx-swap-pixmap-bad: add missing return statement, remove unused varBrian Paul
2011-11-14glx-query-drawable: fix bad string declarationsBrian Paul
2011-11-08glx: Test behavior of glXQueryDrawable()Chad Versace
Add the following tests: * glx-query-drawable-GLXBadDrawable Calls glXQueryDrawable(draw=0) and expects that the GLXBadDrawable error is generated. * glx-query-drawalbe-GLX_WIDTH * glx-query-drawalbe-GLX_HEIGHT Calls glXQueryDrawable() with the given attribute. Tested on Fedora 15 with Xserver 1.10.14. With the proprietary Nvidia driver, all tests pass. With Mesa 7.11, the GLXBadDrawable test passes but the other two fail. All tests fail on Fedora 16. All tests pass, however, with the proprietary Nvidia driver on Fedora 15. Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-11-01glx-swap-pixmap-bad: New testAdam Jackson
Cloned from glx-swap-pixmap, with the original logic error of trying to swap the Pixmap not the GLXPixmap. It turns out the server code should throw GLXBadDrawable for this but is instead throwing BadMatch. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-11-01glx-swap-pixmap: Fix test to do something legalAdam Jackson
glXSwapBuffers() takes a GLXDrawable. Pixmaps are not GLXDrawables, although GLXPixmaps are. Fix the test to pass the GLXPixmap not the Pixmap. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-07-25glx-multi-context-ib-1: New test for a regression in the i965 driver.Eric Anholt
2011-07-21Update some commets in the swap event test.Jian Zhao
Signed-off-by: Jian Zhao <jian.j.zhao@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Acked-by: Chad Versace <chad@chad-versace.us>
2011-07-21The initial value for interval should be 0 to get the correct value.Jian Zhao
There is some modification to the test before and now we need to adjust the intial value of the interval. Signed-off-by: Jian Zhao <jian.j.zhao@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Acked-by: Chad Versace <chad@chad-versace.us>
2011-06-30glx-close-display: Correctly check the return value of glXChooseFBConfig.Vinson Lee
2011-06-15glx-fbo-binding: test FBO binding state across glXMakeCurrent() callsBrian Paul
2011-06-08glx-swap-pixmap: New test for no-op glXSwapBuffers().Eric Anholt
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-06-08glx-swap-singlebuffer: New test for no-op glXSwapBuffers().Eric Anholt
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-06-07glx-tfp: Use XRender to correctly set up alpha channel.Eric Anholt
The previous way of initializing the "alpha" channel of the pixmap was to just set the pixel bits other than r, g, b, to 1.0 or 0.5 times their maximum value. However, thanks to the delights of xlib, a pixel value is a long, not a sized integer. So, when we set alpha to half of ~(r, g, b,), on 64-bit that was half of 0xffffffffff000000 instead of half of 0xff000000, which resulted in black. XRender is the correct X rendering API for working with alpha channels, so use that instead. The ugly bit here is that to preserve the existing test behavior, we have one of the colors filled be (1.0, 0.0, 0.0, 0.5), which is non-premultiplied and thus not really proper Render rendering. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=24491
2011-06-07glx-tfp: Swap after checking results.Eric Anholt
Fixes failures under a compositing wm due to readback of undefined values.
2011-06-05glx-multithread-makecurrent-*: Fix use-after-free.xoddark@gmail.com
We use visinfo to create contexts inside of the draw function.
2011-05-23glx-close-display: New test for reusing GLX after XCloseDisplay.José Fonseca
Exercises an issue reloading LLVM enabled DRI drivers on Fedora 15. Reviewed-by: Brian Paul <brianp@vmware.com>