summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-31util: fix MSVC build failure in piglit_ktx.cHEADmasterBrian Paul1-1/+1
Using void pointers for pointer arithmetic doesn't work. Fixes: tests\util\piglit_ktx.c(333) : error C2036: 'void *' : unknown size Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53013 Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-07-31util: check for valid file type in piglit_load_text_file()Brian Paul1-0/+7
Piglit would segfault if piglit_load_text_file() was accidentally passed a directory name instead of a filename. Now return NULL if the file is not regular or a symlink.
2012-07-31remove glsl-vs-sqrt-zero testBrian Paul4-88/+0
As with the previous commit, but VS. Reviewed-by: Eric Anholt <eric@anholt.net>
2012-07-31remove glsl-fs-sqrt-zero testBrian Paul4-86/+0
This was only testing compile-time evaluation of sqrt(0). It's more interesting to do render-time testing, which is done in other tests. Reviewed-by: Eric Anholt <eric@anholt.net>
2012-07-27oes_standard_derivatives: Add touch tests for the extensionIan Romanick25-0/+341
Make sure that all the functions are available when they should be. This is currently broken in Mesa. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52003 Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-26framework: When a test catches a spurious window resize, re-run it.Eric Anholt1-8/+20
Otherwise, we'd see massive spam of WARN tests, due to the frequency of the bug (about 2% of testcases on my system). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-26util: Warn when we get a window resize during an auto run.Eric Anholt1-0/+8
We've got a bunch of instances of this happening intermittently during runs with gnome-shell. Because our tests are not generally able to handle resizes, they would show up as spurious failures that are hard to reproduce. Instead, provide a diagnostic message and report WARN. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-24Test scissoring of blits in both windows and fbos.Paul Berry3-0/+190
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-22all.tests: remove the bugs group, move the tests into spec/Marek Olšák1-23/+29
2012-07-20GL_ARB_ubo/maxblocks: New test for rendering with varying numbers of blocks.Eric Anholt3-0/+338
2012-07-20GL_ARB_ubo/row-major: New test for setting/getting matrix layout qualifiers.Eric Anholt3-0/+220
2012-07-20GL_ARB_ubo/referenced-by-shader: Test two glGetActiveUniformBlockiv enums.Eric Anholt3-0/+133
2012-07-20GL_ARB_ubo/getactiveuniformname: New test for API behavior.Eric Anholt3-0/+212
This is a lot like getactiveuniformblockname.
2012-07-20GL_ARB_ubo/getactiveuniformblockname: New test for API behavior.Eric Anholt3-0/+213
2012-07-20GL_ARB_ubo/uniformblockbinding: New test for setting/getting block bindings.Eric Anholt3-0/+161
2012-07-20GL_ARB_ubo/getprogramiv: New test for API behavior on linked programs.Eric Anholt3-0/+152
2012-07-20glx_arb_create_context_robustness: Require ARB_robustness for robust contextsIan Romanick3-0/+140
If any of the robustness flags are used, then the resulting context must support the GL_ARB_robustness extension. NVIDIA's closed-source driver passes this test. AMD's closed-source driver has not been tested. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: James Jones <jajones@nvidia.com>
2012-07-20glx_arb_create_context_robustness: Verify that invalid reset strategies are ↵Ian Romanick3-0/+80
rejected NVIDIA's closed-source driver passes this test. AMD's closed-source driver has not been tested. The spec doesn't explicitly say what error should be generated, but similar cases generate BadMatch. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: James Jones <jajones@nvidia.com>
2012-07-20glx_ext_create_context_es2_profile: Verify that the invalid ES versions are ↵Ian Romanick3-0/+113
rejected NVIDIA's closed-source driver passes this test. AMD's closed-source driver has not been tested. v2: Based on discussions whtih James Jones (NVIDIA), expect GLXBadProfileARB instead of BadMatch. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Cc: James Jones <jajones@nvidia.com>
2012-07-20glx_ext_create_context_es2_profile: Verify that indirect-rendering is impossibleIan Romanick3-0/+120
The spec doesn't forbid indirect rendering with OpenGL ES 2.0. There's no protocol defined, so it seems impossible that this could ever work. NVIDIA's closed-source driver fails this test because an unusable indirect-rendering ES2 context is created. AMD's closed-source driver has not been tested. v2: The test will pass if the indirect-rendering context can actually be used. For this we require that glGetShaderPrecisionFormat produce a valid result. v3: Fix the tests limits for mediump floats. Feedback from Chad. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: James Jones <jajones@nvidia.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-07-20glx_arb_create_context_profile: Verify that the profile is ignored pre-3.2Ian Romanick3-0/+117
The profile mechanism is only meaningful for OpenGL 3.2 or later. Verify that the profile setting is silently ignored when a version earlier than 3.2 is requested. NVIDIA's closed-source driver passes this test. AMD's closed-source driver has not been tested. v2: Try versions other than just 1.0. This catches a bug in recent xserver code. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> References: http://lists.x.org/archives/xorg-devel/2012-July/032440.html Cc: Chad Versace <chad.versace@linux.intel.com>
2012-07-20glx_arb_create_context_profile: Verify that the core profile is supported ↵Ian Romanick3-0/+159
for OpenGL 3.2 NVIDIA's closed-source driver passes this test. AMD's closed-source driver has not been tested. NVIDIA's closed-source driver supports both core and compatibility profiles. v2: Try to create a core profile both with and without the core profile mask. This was suggested by Chad Versace. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-07-20glx_arb_create_context_profile: Verify that invalid profiles are rejectedIan Romanick3-0/+110
NVIDIA's closed-source driver passes this test. AMD's closed-source driver has not been tested. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-07-20fbo-blit-stretch: test for stretched blitsJosé Fonseca3-0/+558
v2: More clip tests and comments.
2012-07-20util: Remove unused/non-portable headers.José Fonseca1-3/+0
sys/mman.h is not available on Windows.
2012-07-20fdo25614-genmipmap: fix gl version checkingMarek Olšák1-2/+2
2012-07-20crash-cubemap-order: check extension supportMarek Olšák1-0/+2
2012-07-18msaa: Add depth buffer testing to sample-alpha-to-coverage test caseAnuj Phogat2-20/+36
Tests the depth buffer only for coverage value equal to 0.0 and 1.0 because depth buffer behaviour is undefined for intermediate coverage values. This test found an issue with the current implemantation of msaa for i965 on mesa. Following patch on mesa makes this test to pass: [PATCH] i965/msaa: Set KILL_ENABLE when GL_ALPHA_TO_COVERAGE enabled commit 6c355cca9149e43850cf27f2d0821fab1e7a69f5 Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-07-18msaa: Add depth buffer testing support in draw-buffer-common.cppAnuj Phogat2-51/+149
Computes expected depth values and probes the depth buffer only for coverage value equal to 0.0 and 1.0 because depth buffer behaviour is undefined for intermediate coverage values. Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-07-18msaa: Rewrite sample-alpha-to-one test to utilize shared codeAnuj Phogat2-213/+46
Lot of the functions defined in this test case are also shared by draw-buffers-common.cpp. So this refactoring is done to avoid code duplication. Reviewed-by: Paul Berry<stereotype441@gmail.com>
2012-07-18msaa: Rewrite sample-alpha-to-coverage test to utilize the shared codeAnuj Phogat2-326/+49
Lot of the functions defined in this test case are also shared by draw-buffers-common.cpp. So this refactoring is done to avoid code duplication. Reviewed-by: Paul Berry<stereotype441@gmail.com>
2012-07-18msaa: Add test to verify sample-alpha-to-one with single sample FBOAnuj Phogat3-0/+110
This test verifies that alpha values are not modified if GL_SAMPLE_ALPHA_TO_ONE is enabled and the buffer is single-sampled. Reviewed-by: Paul Berry<stereotype441@gmail.com>
2012-07-18msaa: Add test to verify sample-alpha-to-one with GL_MULTISAMPLE disabledAnuj Phogat3-0/+137
This test varifies that alpha values are not changed with GL_SAMPLE_ALPHA_TO_ONE enabled if GL_MULTISAMPLE is disabled. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Paul Berry<stereotype441@gmail.com>
2012-07-18msaa: Add test to verify sample-alpha-to-coverage with integer draw buffersAnuj Phogat3-0/+140
When draw buffer zero is bound to an integer format buffer, GL_SAMPLE_ALPHA_TO_COVERAGE should have no effect. This should work properly even if there are other draw buffers that are not in integer format. Note: Test passes on Sandybridge with following patch applied on mesa. Patch is under review on mesa-dev mailing list: [PATCH] i965/msaa: Disable alpha-to-{coverage, one} when drawbuffer zero is in integer format Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-07-18msaa: Add test to verify sample-alpha-to-one with integer draw buffersAnuj Phogat3-0/+137
When draw buffer zero is bound to an integer format buffer,` GL_SAMPLE_ALPHA_TO_ONE should have no effect. This should work properly even if there are other draw buffers that are not in integer format. Note: Test passes on Sandybridge with following patch applied on mesa. Patch is under review on mesa-dev mailing list: [PATCH] i965/msaa: Disable alpha-to-{coverage, one} when drawbuffer zero is in integer format Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-07-18msaa: Add test to verify sample-alpha-to-coverage with multiple draw buffersAnuj Phogat3-0/+147
When rendering to multiple draw buffers, the alpha value used by GL_SAMPLE_ALPHA_TO_COVERAGE should come from draw buffer zero, but it should have an effect on all the draw buffers. Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-07-18msaa: Add test to verify sample-alpha-to-one with multiple draw buffersAnuj Phogat3-0/+160
When rendering to multiple draw buffers, GL_SAMPLE_TO_ONE should modify the alpha values sent to each draw buffer. OpenGL 3.3 specification's section 4.1.3 is little unclear about the exact behavior in above mentioned case. So, this test assumes the behavior shown by NVIDIA's proprietary drivers. Reviewed-by: Paul Berry<stereotype441@gmail.com>
2012-07-18msaa: Add files containing the shared code to test multiple draw buffersAnuj Phogat2-0/+766
Functions defined in these files are utilized by following test cases: draw-buffers-alpha-to-one int-draw-buffers-alpha-to-one draw-buffers-alpha-to-coverage int-draw-buffers-alpha-to-coverage V2: Removed unnecessary conditional checks Switched to shared visualize_image function Updated few comments Reviewed-by: Paul Berry<stereotype441@gmail.com>
2012-07-18msaa: Share visualize_image function by moving it to common.cppAnuj Phogat3-67/+99
visualize_image function is utilized by multiple msaa test cases. Reviewed-by: Paul Berry<stereotype441@gmail.com>
2012-07-18linestipple: print what is testedMarek Olšák1-1/+10
2012-07-17msaa: Check for proper error for operations prohibited on MSAA buffers.Paul Berry2-2/+2
From the GL 3.0 spec, section 4.3.3, in the documentation for CopyPixels(): "An INVALID_OPERATION error will be generated if the object bound to READ_FRAMEBUFFER_BINDING is framebuffer complete and the value of SAMPLE_BUFFERS is greater than zero." The same applies to CopyTexImage...() and CopyTexSubImage...() functions, since they are defined in terms of CopyPixels(). Previously we were checking for an INVALID_FRAMEBUFFER_OPERATION error in these cases. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-17msaa: Test proper functioning when no color buffer is present.Paul Berry3-0/+242
This test reproduces a problem in Mesa's i965 driver as of 7/12/12 (commit 1a06e84): when no color buffer is present, but a multisampled depth or stencil buffer is present, Mesa fails to set up the rendering pipeline for multisampling. The test includes variants for testing both the stencil buffer and the depth buffer. The depth buffer test may be run in a "computed" mode, in which case the depth values are output by the fragment shader (this is an important corner case for i965). Verified on nVidia's proprietary binary driver for Linux. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-07-17msaa: Add the ability to test computed depths.Paul Berry2-8/+40
This patch modifies the common code for MSAA tests, so that when testing depth buffer behaviour, we can choose to either output the depth value from the vertex shader (using gl_Position) or from the fragment shader (using gl_FragDepth). Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-07-17msaa: Add the ability to run msaa tests without color/depth/stencil buffers.Paul Berry2-49/+76
This patch modifies the common code for MSAA tests, so that we can easily configure framebuffers that lack a color, depth, and/or stencil buffer. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-07-17msaa/formats: Test signed normalized formats.Paul Berry2-0/+31
The GL spec mandates that signed normalized color formats be clamped to [0, 1] when in GL_FIXED_ONLY mode, despite the fact that they can represent values in the range [-1, 1]. So, when testing these formats, we use a color clamping mode of GL_FALSE. Note: it would have been easier to simply use a color clamping mode of GL_FALSE for all formats, however since part of the purpose of the test is to verify that unnecessary clipping does not occur, we want to give as many opportunities as possible for the implementation to incorrectly clip. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-17msaa/formats: Use a wider color range in MSAA float tests.Paul Berry1-1/+17
Previously, the MSAA tests for floating-point color buffers only exercised color values in the range [0, 1]. This patch extends the range to [-10, 10], in order to verify that floating-point color values are not inadvertently clamped. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-16Modified tests to allow the test profiles to properly work on platforms ↵Kenney Phillis5-0/+11
where execfile() calls in python do not automatically declare variables as globals. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-07-16Changed all tests profile to automatically exclude glx on windows.Kenney Phillis1-1/+3
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-07-16Changed piglit-run.py to automatically correct previous test results on a ↵Kenney Phillis1-0/+2
platform where the os seperator is not '\'. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-07-16Changed test name generation so that regardless of OS path seperator, the ↵Kenney Phillis1-0/+2
test name will always use '/'. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>