summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-06-04make: Make util libraries shared in non-windows systemsshared_piglit_utilPauli Nieminen4-1/+25
Incremental builds take long time linking tests if utilities are modified. The link time can be eliminate if libraries are made shared. Shared libraries need to specify symbols that are excepted to be declared in executeable as weak to allow linking without symbols that aren't used in runtime. Windows has limitation that shared library can't have programs main function that forces windows to use static libraries. Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-05-31generated_tests: Add positional argument specifiers.Vinson Lee2-4/+4
Fix build failure with Python 2.6 introduced at commit 8460edff15defcfd8e26c87989cf9c961a4b2434. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-05-30Add test to draw multisample polygons with GL_POLYGON_SMOOTH enabledAnuj Phogat3-0/+168
This test varifies that GL_POLYGON_SMOOTH is ignored in case of multisample polygons. Note: This test passes on AMD's catalyst and NVIDIA drivers. V2: Polygon smoothing is applied uniformly to all attached buffers. So, It is redundant to test on depth and stencil buffers. Made the changes to remove the redundant code. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-05-30Add test to draw multisample points with GL_POINT_SMOOTH enabledAnuj Phogat3-0/+167
This test varifies that GL_POINT_SMOOTH is ignored in case of multisample points. Note: This test passes on AMD and NVIDIA drivers. V2: Point smoothing is applied uniformly to all attached buffers. So, It is redundant to test on depth and stencil buffers. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-05-30Add test to draw multisample lines with GL_LINE_SMOOTH enabledAnuj Phogat3-0/+171
This test varifies that GL_LINE_SMOOTH is ignored in case of multisample lines. Note: Smooth lines and multisampling seems to work fine separately but this test fails on AMD catalyst drivers. Test passes on NVIDIA drivers. V2: Line smoothing is applied uniformly to all attached buffers. So, It is redundant to test on depth and stencil buffers. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-05-30Add new classes to draw points and lines in to multisample FBOAnuj Phogat2-0/+241
This patch adds following new classes to common.cpp file: - Points: Draws a sequence of points with varied sizes in color buffer. - Lines: Draws a sequence of lines with varied width in color buffer All above mentioned classes are used to verify drawing multisample points and lines in color, depth and sencil buffers. V2: Testing smooth lines and points on depth and stencil buffers seems redundant. So, trimmed down the patch to just add Points and Lines classes. Also made changes to draw points and lines with floating point sizes and sizes < 1.0. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-05-29arb_instanced_arrays: test instanced_arrays with VBOsJordan Justen2-6/+42
The new test named instanced_arrays-vbo which adds a vbo parameter when running the instanced_arrays test. This will cause the test to run while using VBOs. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-05-29primitive-restart: add VBO testingJordan Justen2-44/+204
primitive-restart can now test 5 scenarios which are selected by a command line parameter: * DISABLE_VBO * VBO_VERTEX_ONLY * VBO_INDEX_ONLY * VBO_SEPARATE_VERTEX_AND_INDEX * VBO_COMBINED_VERTEX_AND_INDEX All 5 scenarios are added to all.tests. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-05-29primitive-restart: cleanup index generation codeJordan Justen1-57/+57
Previously the code would build an array of GLuint for the indicies. This lead to extra processing at draw time. Now, we build an array of indicies of the size currently being tested. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-05-29primitive-restart: probe pixel 0, 0 to make sure it was not drawnJordan Justen1-0/+4
Since failures of primitive restart sometimes lead a vertex to appear at 0, 0, we test this pixel to make sure it was not drawn. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-05-23Merge branch 'waffle-v10' of git://people.freedesktop.org/~chadversary/piglitChad Versace103-1134/+973
Conflicts: tests/texturing/crossbar.c
2012-05-23glut_egl: Remove all references to glut_eglChad Versace2-4/+2
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-23cmake: Stop GLES tests from linking to glut_eglChad Versace8-8/+0
Many CMakeLists.gles{1,2}.txt explicitly linked to glut_egl. But all GLES tests should now use glut_waffle. This patch kills the directives to link to glut_egl, but does not replace them with a directive to link to glut_waffle. It is not needed, because `link_libraries(glut_waffle)` exists in the global GLES makefiles, $PIGLIT_TOP/cmake/target_api/gles{1,2}/CMakeLists.txt. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23cmake: Emit fatal error if BUILD_GLES{1,2}_TESTS is enabled without USE_WAFFLEChad Versace1-0/+8
glut_waffle is now required to build the GLES tests. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23util: If using Waffle, don't call piglit_glx_set_no_input()Chad Versace1-1/+7
Fixes a segfault when PIGLIT_PLATFORM=x11_egl or wayland. If using Waffle, then the current platform might not be GLX. So don't call any GLX functions. We still want to disable input, however, when using Waffle. So comment with a FIXME. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23util: Fix piglit_glutInit to initilialize GLUT with GL APIChad Versace1-9/+11
If USE_WAFFLE, then piglit_glutInit must call glutInitAPIMask to choose a GL API. This patch replaces USE_EGLUT with USE_WAFFLE, because eglut is no longer used. 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-23cmake: Use glut_waffle if USE_WAFFLE is enabledChad Versace4-15/+20
For GL tests (those built by CMakeLists.gl.txt), if USE_WAFFLE is enabled then freeglut is replaced with glut_waffle. For GLES1 and GLES2 tests, glut_waffle is now required. 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-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-05-23util: Add Waffle backend for piglit-framework-fbo.cChad Versace2-0/+154
If USE_WAFFLE and USE_GLX are both enabled, then Waffle takes precedence; the Waffle backend is used. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23util: Use piglit-framework-fbo.c and kill dead codeChad Versace4-129/+37
Link piglit-framework-fbo.c into libpiglitutil, and kill all code in piglit-framework.c which exists piglit-framework-fbo.c. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23util: Refactor #ifdef's in piglit-framework-fbo.cChad Versace1-12/+21
Define two macros at the top of the file: PIGLIT_FRAMEWORK_FBO_DISABLED PIGLIT_FRAMEWORK_FBO_USE_GLX Use these throughout the file to determine which code to use. Stop using USE_GLX and USE_OPENGL_ES1 for that purpose. We need separate macros for USE_GLX and PIGLIT_FRAMEWORK_FBO_USE_GLX, because USE_GLX and USE_WAFFLE can be enabled at the same time. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23util: Refactor piglit-framework-fbo.c, move functionsChad Versace1-13/+22
Move the functions piglit_framework_fbo_{init,destroy} to the bottom of the file. This will allow all GLX functions to reside in one #ifdef at the top of the file, all the Waffle functions in an #ifdef below that, and the platform-independent code at the bottom. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23util: Remove dead code from piglit-framework-fbo.cChad Versace1-151/+1
This file now contains only code prefixed with piglit_framework_fbo. The killed code exists in piglit-framework.c. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23util: Fork piglit-framework.cChad Versace1-0/+310
Copy piglit-framework.c to piglit-framework-fbo.c. The following commits will refactor each so that all the piglit_framework_fbo code is contained in piglit-framework-fbo.c. This copy is done before the refactor so that git merges go smoothly. The piglit_framework_fbo code needs to be relocated to its own file because following commits will add an implementation atop Waffle. Currently, the piglit_framework_fbo code is only implemented for GLX. The increase in code size and #ifdef complexity warrants moving it to its own file. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23cmake: If USE_WAFFLE, disable tests that use quirky GLUT functions [v2]Chad Versace3-5/+17
If USE_WAFFLE is enabled, do not build the tests below. The tests use quirky use GLUT functions that will not be implemented in Waffle. fbo-depth-sample-compare: Uses glutSolidSphere. windowoverlap: Uses glutCreateSubWindow. texwrap: Uses glutBitmapCharacter. texture-pakced-formats: Uses glutBitmapCharacter. Eventually, these tests need to be repaired so that they no longer require the quirky GLUT functions. However, the Waffle integration shouldn't be blocked by this small set of tests. Work on reparing these tests can proceed in tandem with the Waffle integration. v2: Fix indentation. 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-23cmake: Add option USE_WAFFLEChad Versace1-0/+8
If enabled, Piglit will use Waffle in place of GLUT. The option is disabled by default. As of this patch, however, enabling this option does nothing but require libwaffle. Future patches will integrate Waffl into Piglit. 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-23cmake: Add module FindWaffleChad Versace2-0/+45
This enables Piglit to call `find_package(Waffle REQUIRED)`. 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@chad.versace.us>
2012-05-23tests: Remove glutExtensionSupportedChad Versace16-36/+29
Replace it with piglit_is_extension_supported or piglit_require_extension, as appropriate. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> 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-23cmake: Relocate all GLUT directives into single locationChad Versace72-141/+6
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-23cmake: Clean up gles{1,2}/CMakeLists.txtChad Versace2-18/+14
Now that there are options to control building the GLES1 and GLES2 tests, there is no need for the 'if' guard in these CMakeLists. Remove the unneeded 'if' guards, and hence a level of indentation. 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-23cmake: Add options BUILD_GLES{1,2} tests [v2]Chad Versace2-2/+13
Default value for each is OFF. Before this patch, Piglit automatically built the GLES1 tests if libEGL and libGLESv1_CM were found. Ditto for GLES2 and libGLESv2. If these libraries were installed on the system, it was impossible to disable the tests. This patch adds options to explicitly enable the tests. v2: Fix typo GLES1 -> GLES2. 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-23Reproduce a constant propagation bug in Mesa (indexing into vectors).Paul Berry2-0/+80
As of 5/19/12, Mesa's constant propagation optimization pass fails to properly account for the behaviour of array indexing applied to vectors. If v is a vector and i is an integer, it assumes that v[i] = ...; kills the x component of v. This is not necessarily the case--it might kill any component of v, depending on the value of i. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-05-22glsl-1.30: Add another switch expression variant showing a mesa bug.Eric Anholt1-0/+18
2012-05-22glsl-1.30: Add a test for switching on a uint value.Eric Anholt1-0/+33
Catches this mesa failure: ir_validate.cpp:360: virtual ir_visitor_status ir_validate::visit_leave(ir_expression*): Assertion `ir->operands[0]->type == ir->operands[1]->type' failed.
2012-05-22glsl-1.10: Add tests for this assertion failure in i965:Eric Anholt2-0/+70
shader_runner: brw_vec4_visitor.cpp:1642: virtual void brw::vec4_visitor::visit(ir_assignment*): Assertion `src.swizzle == (ir->rhs->type->is_matrix() ? swizzle_for_size(ir->rhs->type->vector_elements) : (((0)<<0) | ((1)<<2) | ((2)<<4) | ((3)<<6)))' failed.
2012-05-22GL_ARB_shader_objects: Test for error on glGetActiveUniform() in begin/end.Eric Anholt3-0/+84
Based on an error report from oglconform.
2012-05-22builtin tests: Make glsl_version be a number instead of a string.Eric Anholt3-135/+135
Note that it's not a float number -- we go with the integer like is used in #version.
2012-05-22generated tests: Fix the "#version 110" skipping I broke.Eric Anholt1-1/+1
The float changes I did for a bunch of the >= comparisons were not fully done here, and the comparison was always false, so we got a bunch of extra #version 110 statements.
2012-05-22GL_ARB_ubo: Add a test for the minimum maximums.Eric Anholt3-0/+101
This is closely related to the tests in gl-3.1/minmax, but I included the logic for geometry shaders that isn't in the 3.1 spec.
2012-05-22Move minmax test infrastructure to piglitutil.Eric Anholt7-621/+447
This also uses an obvious default value in the getters in case there's a GL error and the value isn't written to the pointer.
2012-05-22Test that MSAA blits work properly even when unaligned.Paul Berry3-0/+239
This test verifies that blits involving MSAA buffers work properly even if the source and destination rectangles are located in different parts of their respective framebuffers, and even if the source and destination rectangles are not aligned to powers of two. These are necessary corner cases to check in i965, where blits that involve MSAA buffers frequently require special handling when the source and destination rectangles are different, or are not nicely aligned. v2: Use a tile size of 49 instead of 50, so that source and destination rectangles are even more poorly aligned. This exposed a bug in i965/gen6. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-05-19texgen: Convert to use piglit frameworkChad Versace1-49/+38
It seems that this was written long ago before the piglit framework existed. Remove the test's main() and convert it to use piglit_init() and piglit_display(). Some of the code from main() is moved into piglit_init(). Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-19crossbar: Convert test to use piglit frameworkChad Versace1-60/+22
It seems that this test was written long ago before the piglit framework existed. Remove the test's main() and convert it to use piglit_init() and piglit_display(). Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-19tests: Remove use of glutExtensionSupportedChad Versace16-36/+29
Replace it with piglit_is_extension_supported or piglit_require_extension, as appropriate. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-16triangle-rasterization-overdraw: s/vector::data/&vector::front/Vinson Lee1-1/+1
std::vector::data is in C++11 and not in C++03. Fixes build with Solaris Studio. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-05-16triangle-rasterization-overdraw: Invert using blending instead of stencil.José Fonseca1-16/+8
Stencil buffer is not normally visible, so it's much easier to debug this if the color inversion is done through blending. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-05-15fbo-viewport: exercise glViewport with FBOsBrian Paul3-0/+196
In particular, make sure viewports that extend beyond the surface bounds are handled correctly. Also, if the FBO surface is stored inverted, this should detect flipped viewport bugs too. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-05-15triangle-rasterization-overdraw: Fix MSVC build.José Fonseca1-2/+2