Age | Commit message (Collapse) | Author | Files | Lines |
|
Fix Coverity evaluation order violation defect.
CID: 1374296
Fixes: e0048f4940f7 ("util: Add piglit_delay_ns() api")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
|
|
Fix MinGW build error.
piglit-util.c: In function 'piglit_time_is_monotonic':
piglit-util.c:583:18: error: storage size of 't' isn't known
struct timespec t;
^
Fixes: e0048f4940f7 ("util: Add piglit_delay_ns() api")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98486
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
|
|
Provides a utility for blocking the cpu for a requested time (best
effort) and returning the actual duration blocked.
This should e.g. be useful for comparing durations measured via arb
timer queries vs a monotonic system clock, where it's acceptable if we
don't achieve an exact reference delay on the cpu (say due to OS
signalling or scheduling conditions) so long as we get told accurately
how long the final delay ended up being.
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
|
|
The test required unreleased EGL headers. Oops. Add the needed header
extension snippets to piglit-util-egl.h.
v2: Move #define snippets to piglit-util-egl.h.
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu> (v1)
Reported-by: Mark Janes <mark.a.janes@intel.com>
|
|
If the args contain -h or --help, then print some help and exit.
The help test describes how to list and run subtests.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
|
|
If PIGLIT_HAS_GBM, then add GBM_LDFLAGS to the linker flags. Fixes
undefined symbol errors at link time for me, using Arch Linux.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
|
|
Like checkerboard, but allows specifying different colors for each quadrant
of a 2x2 tile block; basically a superset of the checkerboard and rgbw texture
functions.
|
|
window size
Commit 0f163d1 removed the non-default window size from many tests.
However, quite a few of these tests had power-of-two window sizes for
drivers that do not support GL_ARB_texture_non_power_of_two.
Fixes
fbo-nodepth-test on NV20 and i865G
fbo-nostencil-test on NV20 and i865G
fbo-alphatest-formats on i865G
fbo-blending-formats on NV20 and i865G
Somehow fbo-alphatest-formats was previously passing on NV20.
There are still a few failures in fbo-blending-formats on i865G, but the
test mostly passes. The remaining failures there are likely legitimate
problems.
None of the tests were fixed on R200, and both fbo-alphatest-formats and
fbo-blending-formats go from FAIL to CRASH. Both hit an assertion:
main/format_utils.c:178: _mesa_compute_rgba2base2rgba_component_mapping: Assertion `!&"Unexpected base format"' failed.
This should also fix these tests on NV10, NV30, and r100. I suspect
r100 will have the same troubles as r200.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
|
|
|
|
|
|
this no longer crashes:
- create context (calls atexit)
- teardown context
- create context 2 (calls atexit)
- exit()
|
|
This patch fixes this build error.
transcode-nv12-as-r8-gr88.c: In function ‘create_textures’:
transcode-nv12-as-r8-gr88.c:178:7: error: ‘DRM_FORMAT_R8’ undeclared (first use in this function)
DRM_FORMAT_R8, r8_pixels);
^
Fixes: 0222f5db00fd ("dmabuf: fix YUV tests for drivers other than intel")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97951
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
|
|
If they're not defined by the installed libdrm already.
This moves code already defined in transcode-nv12-as-r8-gr88 to the
utils level, so that all tests that require these formats get them, and also
adds on additional define that wasn't in the mentioned test.
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97951
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
|
|
Ok, so the basic problem with the YUV tests is that they currently
completely ignore driver/hw pitch requirements, since the code that
allocates the buffer doesn't know the pixel format, only the 'cpp'.
The yuv test creates a small 4x4 yuv eglimage. If, say, the hardware
requires the pitch to be aligned to, say, 32pixels, everything is fine
for the Y plane, but the subsampled U/V or U+V plane has half as many
pixels. (This did help me catch a bug in driver, not rejecting the
dmabuf import with invalid pitch, but that doesn't help to get the
piglit tests running.)
The best approach I could come up with to fix this is to pass the
fourcc all the way down to the code that creates the dmabuf (and copies
src data into the dmabuf). Unfortunately this makes the patch a bit
bigger than I was hoping, and not really sure a good way to split it
up.
This is tested on i965 (with the intel dma-buf backend) and freedreno
(with the gbm dma-buf backend). In the gbm case, it requires new
gbm format values for R8 and GR88, which is on mesa master as of
this morning. (So I bumped the gbm version dependency to 12.1.)
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
|
|
Fixes sometimes-uninitialized warning.
piglit-util-cl.c:1052:13: warning: variable 'errNo' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (desc->image_type == CL_MEM_OBJECT_IMAGE3D) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
piglit-util-cl.c:1062:28: note: uninitialized use occurs here
if(!piglit_cl_check_error(errNo, CL_SUCCESS)) {
^~~~~
piglit-util-cl.c:1052:9: note: remove the 'if' if its condition is always true
} else if (desc->image_type == CL_MEM_OBJECT_IMAGE3D) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
piglit-util-cl.c:1040:14: note: initialize the variable 'errNo' to silence this warning
cl_int errNo;
^
= 0
Fixes: 910cd6c222930 ("cl: add image and sampler utility functions")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
|
|
This reverts commit 5b037e06730fb4d219c3e5f374ad96594e10e3b1.
Sorry I pushed the wrong version.
|
|
Fixes sometimes-uninitialized warning.
piglit-util-cl.c:1052:13: warning: variable 'errNo' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (desc->image_type == CL_MEM_OBJECT_IMAGE3D) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
piglit-util-cl.c:1062:28: note: uninitialized use occurs here
if(!piglit_cl_check_error(errNo, CL_SUCCESS)) {
^~~~~
piglit-util-cl.c:1052:9: note: remove the 'if' if its condition is always true
} else if (desc->image_type == CL_MEM_OBJECT_IMAGE3D) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
piglit-util-cl.c:1040:14: note: initialize the variable 'errNo' to silence this warning
cl_int errNo;
^
= 0
Fixes: 910cd6c222930 ("cl: add image and sampler utility functions")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
|
|
Without this linking CXX executables (e.g. fbo-blit-stretch) fails
with gold linker:
| libpiglitutil_gl.so.0: error: undefined reference to 'dlsym'
| libpiglitutil_gl.so.0: error: undefined reference to 'dlerror'
| libpiglitutil_gl.so.0: error: undefined reference to 'dlopen'
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Linking CXX executables with gold linker leads to:
libpiglitutil_gl.so.0: error: undefined reference to 'xcb_connect'
libpiglitutil_gl.so.0: error: undefined reference to 'xcb_get_setup'
libpiglitutil_gl.so.0: error: undefined reference to 'xcb_setup_roots_iterator'
This may have appeared now because xcb-dri2 used to overlink publicly
but now does not.
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
|
|
Fixes glslparsertest with an argument of 4.40 / 4.50.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
|
|
Previously the dmabuf tests only worked on the intel driver. However,
thanks to the new GBM BO mapping interface by Rob Herring, we can make
a generic framework for other drivers.
Reviewed-by: Rob Clark <robdclark@gmail.com>
|
|
Use explicit conversion from regexp matched array values
v2: distance between two half numbers is 8192 single float ulps
no need to place converted float in the middle of single precision range
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Tom Stellard <thomas.stellard@amd.com>
|
|
Drop the const qualifier from the output variable.
Copy/paste mistake introduced with commit 5e78dd43e4b ("util/wfl: fold
make_config_attrib_list and make_context_description").
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97063
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Since each case of the (enum context_flavor) flavor is handled we can
drop the default case.
This will resolve a compiler warning caused by earlier refactoring with
commit 5e78dd43e4b ("util/wfl: fold make_config_attrib_list and
make_context_description")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97063
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
|
|
The latter tends to reverse what was done by the former, in order to
produce a human-readable string.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Those symbols are part of the ABI/API and cannot change. Just define
them locally when needed.
v2: Drop the fall-back definitions (Ilia).
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
|
|
This allows to set data of u/byte, u/short and half types for
attributes with the shader runner.
For example:
0/byte/int attname1/ushort/uint attname3/half/float
The syntax has been extended so the recommended way has replaced the
old COUNT field in the [vertex data] header line with the
corresponding GLSL type for the old TYPE field.
In any case, the extended syntax is backward compatible so it is still
possible to specify a vec3 attribute like:
attname/float/3
In addition to the now recommended format:
attname/float/vec3
Due to this, the arb_vertex_attrib_64bit input tests generator has
been also adapted to the new syntax.
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
|
|
For some cases we want to have shaders where we load an exact bit
pattern into a half float.
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
|
|
For some cases we want to have shaders where we load an exact bit
pattern into a signed int.
If we would just use strtol, the negative values would have to include
the sign, as in -0x7fffffff, and not the exact bit pattern, which
would be 0x80000000, to avoid an ERANGE out of range errno value on
32-bit systems.
Hence, we were using strtoll but that was also causing that we would
lose the internal range check performed by strtol.
Now, we use an implementation that would accept exact bit patterns,
including a proper internal range check and, also, the other
alternative formats allowed by strtol.
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
|
|
WAFFLE_RED_SIZE=1 (for example) gets passed to glXChooseFBConfig as
GLX_RED_SIZE=1. GLX chooses the deepest pixel format which meets that
minimum value so we typically get an 8 bit/channel format.
But with wglChoosePixelFormatARB() we may get the shallowest pixel
format that meets that value so we may wind up getting a 5/6/5 format.
Many piglit tests aren't prepared for that and report failures because
the color tolerances are too tight. In any case, we really want to test
8-bit formats.
This change tells waffle to first try 8/8/8 color, 24-bit Z. And if
that fails, try 5/6/5 with 16-bit Z.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
|
|
For now we just ignore it rather than trying to teach piglit about it.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
piglit-vbo.cpp:310:26: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (this->matrix_index < 0 || this->matrix_index > 3) {
~~~~~~~~~~~~~~~~~~ ^ ~
vertex_attrib_description::matrix_index has type size_t.
Fixes: 8e71b836e8ea ("util: Add new headed matrix_index header to [vertex data]")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Andres Gomez <agomez@igalia.com>
|
|
The new ARB_vertex_attrib_64bit tests specify integer vertex attributes
with hex values, such as 0xc21620c5. As an integer value, this is
beyond LONG_MAX on 32-bit systems. The intent is to parse it as an
unsigned hex value and bitcast it.
However, we still need to handle parsing values with negative signs.
Using strtoll and truncating should work. It breaks the errno-based
range validation. We may want to fix that some day.
v2: Drop bogus range checking attempt.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antia Puentes <apuentes@igalia.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
|
|
The correct symbols are in libpiglitutil_cl.so
Reported-by: Jose Luis Cercós <jlcercos@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Serge Martin <edb+mesa@sigluy.net>
|
|
|
|
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
|
|
2D textures worked fine without defining these filters but
3D textures don't work.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
|
|
For cubemaps and cubemap arrays this should be 6. For non cubemaps
this should be 1.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
|
|
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Serge Martin <edb+piglit@sigluy.net>
|
|
This allows data to be set for arbitrary array sized attributes in
shader runner.
For example to set mat2x3[2]:
attname[0]/mat2x3/3/1 attname[0]/mat2x3/3/2 attname[1]/mat2x3/3/1 attname[1]/mat2x3/3/2
The syntax has been extended so the recommended type to specify in the
[vertex data] header line is the GLSL corresponding one, not just
"float", "double", "int" or "uint".
In any case, the extended syntax is backward compatible so it is still
possible to specify a vec3 attribute like:
attname/float/3
In addition to the now recommended format:
attname/vec3/3
v2: Added more verbose comments and documentation as requested by
Alejandro Piñeiro.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
|
|
We used to always use GL_TEXTURE_RECTANGLE which we may not actually want.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
|
|
|