aboutsummaryrefslogtreecommitdiff
path: root/tests/fbo
AgeCommit message (Collapse)Author
2013-04-16Rework the PIGLIT_GL_VISUAL flags, fix RGB vs RGBA vs ALPHA confusionMarek Olšák
Changes: - SINGLE is removed, because its value was 0 - ALPHA is removed, because it becomes redundant with this change - RGB asks for an RGB visual - RGBA asks for an RGBA visual - if RGB and RGBA are unset, it asks for a visual without RGB(A) Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> v2: fix glut
2013-03-19fbo-clear-formats: clean up error handlingBrian Paul
Use piglit_check_gl_error(). Note: we're getting an INVALID_OPERATION error from glBlitFramebuffer() with NVIDIA's driver. That'll be investigated/fixed separately. At least the test now reports FAIL instead of dying on an assertion. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-03-11fbo-maxsize: use piglit_get_gl_enum_name()Brian Paul
2013-03-11fbo-maxsize: minor test improvementsBrian Paul
Clear the large FBO to a non-black color and probe for it in the final test. This uncovers a bug in Mesa's llvmpipe driver where we ran out of bin commmand memory and skipped some tiles, leaving them black. Setting the clear color to white (and actually clearing the FBO) helps to detect that.
2013-02-26fbo-blit: test BlitFramebuffer with GL_TEXTURE_RECTANGLEMarek Olšák
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-01-23fbo-alphatest-formats: Skip testing for ALPHA-only formatsCarl Worth
The test uses an RGB probe to determine whether a pixel was rendered or not. By definition, an RGB proble will always return values of 0 whether or not the pixel was rendered. So the results are meaningless for an alpha-only format.
2013-01-23fbo-blending-formats: Fixup expected Luminance value for DST_ALPHA blendingCarl Worth
When a format is used with LUMINANCE and no ALPHA, our computation of the expected result should use an implicit destination alpha value of 1.0 rather than the alpha value of the rendered color.
2013-01-23fbo-blending-formats: Fix expected color values for DST_ALPHA blendingCarl Worth
In the case where there are 0 bits of destination alpha, we need to compute different expected results for the color when rendering with DST_ALPHA. The results are initialized with calculations that blend src and destination color such as: res4[X] = dst4[X]*(1-dst4[ALPHA]) + src4[X]*dst4[ALPHA] But when there is no destination alpha channel, instead of the blend factor dst4[ALPHA] in the above, the result should be computed with this value replaced with 1.0. In other words, the correct calculation for the expected result color becomes: res4[X] = src4[X] Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-01-23fbo-blending-formats: Test DST_ALPHA blending when destination has no alphaCarl Worth
It may sound silly to test the blending of DST_ALPHA when the destination has no alpha channel, but in fact this is a not uncommon source of errors in implementations. Some implementations will implement a non-alpha format with an internal buffer that actually does have bits for the alpha channel. These implementations must then ensure that these alpha bits never leak out, and must have additional code to smash alpha to 1.0 for things like ReadPixels, TexImage, and DST_ALPHA blending. So, fix the test to not avoid this important testing. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-01-21fbo-colormask-formats: Report subtest results.Eric Anholt
v2: Leave printfs in place, get the name for the enum. Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-storage-completeness: Fix doxygen name.Eric Anholt
Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-clear-formats: Report subtest results.Eric Anholt
v2: Leave printfs in place. Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-storage-formats: Report subtest results.Eric Anholt
Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-storage-*: de-StudlyCaps.Eric Anholt
Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-storage-*: Use piglit_check_gl_error().Eric Anholt
Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-storage-*: Reindent to normal piglit style.Eric Anholt
Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-readpixels-depth-formats: Report subtest results.Eric Anholt
v2: Leave previous printfs in place. Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-alphatest-formats: Report subtest results.Eric Anholt
v2: Leave previous printfs in place, get the name for the enum. Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-blending-formats: Report subtest results.Eric Anholt
v2: Leave previous printfs in place, get the name for the enum. Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21fbo-generate-mipmap-formats: Report subtest results.Eric Anholt
v2: Leave printfs in place. Reviewed-by: Carl Worth <cworth@cworth.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-18fbo-drawbuffers2-color: test masked clearMarek Olšák
2013-01-18fbo-drawbuffers: test masked clearMarek Olšák
2013-01-04fbo-clear-formats: set the depth attachment even though we only test stencilMarek Olšák
This should make the NVIDIA driver not skip the test.
2012-12-09fbo-blending-formats: Only query GL_TEXTURE_xxx_TYPE when ↵José Fonseca
GL_EXT_texture_snorm is supported Otherwise the test will fail due to GL_INVALID_ENUM errors. Fixes fdo bug 71136. Tested-by: Vinson Lee <vlee@freedesktop.org>
2012-12-06fbo-blending-formats: Correct precision of signed normalized types.José Fonseca
Signed types have less precision due to the sign bit. Without this it is impossible to devise an efficient way of lerping signed normalized types that makes this test happy -- it would require 32bit float/int multiply and divides to get exact results. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-30util/gl: Kill shader wrapper functionsChad Versace
This patch kills the wrapper functions defined in piglit-shader.h for GL. They are rendered obsolete by piglit-dispatch. A subset of the wrappers are kept for GLES1 and GLES2. - All GLES1 wrappers are kept and are renamed to match the core GL names. That is, piglit_$func is renamed to gl$func. As before, the wrappers simply raise an assertion failure because GLES1 does not suppport shaders. - The subset of GLES2 wrappers that raise an assertion, because the function is not supported on GLES2, are also kept and likewise renamed. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-11-12Skip testing textures with depth-stencil formats in glGenerateMipmapAnuj Phogat
depth-stencil formats are disallowed in glGenerateMipmap because the stencil component is not filterable. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-11-06fbo-gl_pointcoord: remove config.window_width/height and fix asst. bugsBrian Paul
The size of the window and the size of the FBO were mixed up in a few places. Add missing FBO binding calls so the window can be resized. Use an rb_size variable instead of hard-coded 100. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-06fbo: remove config.window_width/height assignmentsBrian Paul
Instead of sizes less than 150x150. No regressions seen with new size. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-26fbo-clear-formats: test stencil glClearMarek Olšák
The test visualizes the stencil buffer (unlike some other tests), which is very useful for debugging. Unfortunately, it throws a weird GL error when run multiple times in a row, which can be reproduced by running: ./fbo-clear-formats GL_EXT_packed_depth_stencil stencil -auto Commenting out the last glDeleteTextures call gets around the issue. I think it's a bug in Mesa.
2012-10-23fbo-depthstencil: don't check for FBO extensions if they're not neededMarek Olšák
2012-10-17fbo-scissor-blit: require ARB_fboMarek Olšák
The test doesn't use anything else.
2012-10-17fbo-integer: require ARB_fboMarek Olšák
This test could be converted not to use EXT_gpu_shader4.
2012-10-17fbo-fragcoord: require EXT_fbo instead of ARB_fboMarek Olšák
2012-10-17fbo-fragcoord: require ARB_fboMarek Olšák
2012-10-17fbo-deriv: require ARB_fboMarek Olšák
2012-10-15tests/fbo-blit-stretch: add a 1x1 -> nxm stretch test caseRoland Scheidegger
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-10-09util: Add fields to piglit_gl_test_config for listing supported GL flavors (v2)Chad Versace
This patch has 3 interrelated components. 1) Add the following fields to piglit_gl_test_config: supports_gl_core_version supports_gl_compat_version supports_gl_es1 supports_gl_es2 These allow a test to specify what GL flavors under which it can run. For details, see the documentation for struct piglit_gl_test_config. 2. In tests/util/piglit-framework-gl, implement support for the new fields. 3. In each GL test source, add one of the new fields to the PIGLIT_GL_TEST_CONFIG_BEGIN/END block. For GLES1 tests, add `supports_gl_es1 = true`. For GLES2 tests, add `supports_gl_es2 = true`. For desktop GL tests, add `supports_gl_compat_version = 10`. For an explanation of why version 1.0 is used for desktop GL tests, see the documentation for supports_gl_compat_version. No tests yet require a GL core context. v2: Replace silly sum of booleans with a logical conjuction. For Anholt. 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-09util: Convert GL tests to use PIGLIT_GL_CONFIG_BEGIN/ENDChad Versace
This patch has two components. 1. In tests/util/piglit-framework-gl.h, replace the definition of PIGLIT_GL_TEST_MAIN with the macro block PIGLIT_GL_CONFIG_BEGIN/END. The macro PIGLIT_GL_TEST_MAIN was very restrictive. It was a fixed-arity macro function that allowed a test to set only set 3 values: window width, height, and visual. It would have been difficult to shoehorn optional test attributes into such a fixed-arity macro function. Allowing optional attributes is an essential feature because a following commit adds optional fields to struct piglit_gl_test_config. The macro block PIGLIT_GL_TEST_CONFIG_BEGIN/END is more flexible. Within it the test is allowed to arbitrarilty modify the piglit_gl_test_config structure. 2. In each GL test source, replace PIGLIT_GL_TEST_MAIN with a PIGLIT_GL_TEST_CONFIG_BEGIN/END block. 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 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-10-09tests: Remove direct includes of piglit-framework.hChad Versace
This prepares for the next commit, which renames piglit-framework.h. All modified files included piglit-framework.h transitively. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-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-10-09util,tests: Replace GLUT visual enums with PIGLTI_GL_VISUAL enums (v2)Chad Versace
I'm trying to transition Piglit from using GLUT to using Waffle. That requires either killing or wrapping all GLUT code. Define enum piglit_gl_visual in piglit-framework.h, of which each value matches its corresponding GLUT visual enum. Do the following substitution in all util and test sources: GLUT_RGB -> PIGLIT_GL_VISUAL_RGB GLUT_RGBA -> PIGLIT_GL_VISUAL_RGBA GLUT_DOUBLE -> PIGLIT_GL_VISUAL_DOUBLE GLUT_ACCUM -> PIGLIT_GL_VISUAL_ACCUM GLUT_ALPHA -> PIGLIT_GL_VISUAL_ALPHA GLUT_DEPTH -> PIGLIT_GL_VISUAL_DEPTH GLUT_STENCIL -> PIGLIT_GL_VISUAL_STENCIL v2: Remove GLUT_INDEX, for Ken. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-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-10-09tests,util: Wrap glutKeyboardFunc with piglit_set_keyboard_funcChad Versace
I'm trying to transition Piglit from using GLUT to using Waffle. This requires killing all uses of GLUT functions, one-by-one. This patch replaces all-but-one instance of glutKeyboardFunc with a new wrapper, piglit_set_keyboard_func. The one remaining test that uses glutKeyboardFunc is windowoverlap; but that tests doesn't use piglit-framework, anyway. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-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-10-08tests/fbo: remove unused err, error varsBrian Paul
2012-10-07Use piglit_check_gl_error() instead of block with [f]printf.Chris Forbes
Generated from the following semantic patch. @@ expression RET, MSG; @@ - RET = glGetError(); - if (RET != 0) { + if (!piglit_check_gl_error(GL_NO_ERROR)) ( - printf(MSG,RET); | - fprintf(stderr,MSG,RET); ) piglit_report_result(PIGLIT_FAIL); - } Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-20fbo-blit-stretch: add cast to silence signed/unsigned comparison warningBrian Paul
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2012-09-18fbo-colormask-formats: test glColorMask with all formatsMarek Olšák
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-12fbo-blit-stretch: add ability to choose a subtestMarek Olšák
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-10Convert simple if(piglit_get_gl_version() < N) { SKIP } to requireChris Forbes
Generated from the following semantic patch: @@ expression VER; expression MSG; @@ - if (piglit_get_gl_version() < VER) { - printf(MSG); - piglit_report_result(PIGLIT_SKIP); ( - exit(1); | ) - } + piglit_require_gl_version(VER); Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
2012-09-04Never call glutKeyboardFunc in -auto modeChris Forbes
Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>