Age | Commit message (Collapse) | Author |
|
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
|
|
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>
|
|
|
|
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.
|
|
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
|
|
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.
|
|
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.
|
|
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>
|
|
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>
|
|
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>
|
|
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
v2: Leave printfs in place.
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
v2: Leave previous printfs in place.
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
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>
|
|
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>
|
|
v2: Leave printfs in place.
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
|
|
|
|
This should make the NVIDIA driver not skip the test.
|
|
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>
|
|
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>
|
|
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>
|
|
depth-stencil formats are disallowed in glGenerateMipmap because the
stencil component is not filterable.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
|
|
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>
|
|
Instead of sizes less than 150x150.
No regressions seen with new size.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|
|
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.
|
|
|
|
The test doesn't use anything else.
|
|
This test could be converted not to use EXT_gpu_shader4.
|
|
|
|
|
|
|
|
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
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>
|
|
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
|