Running "make check" is quite slow if valgrind is enabled, and most of the time
failures is the result of a leak in the GL driver. Since when building packages
testing is enabled, this will make the package build fail when valgrind is
installed. So instead of automagically enabling valgrind when it is installed,
make it a configure option that also may fail if valgrind is not installed, but
requested.
v2: Use some lowercase variable to report enabled valgrind (Gurchetan)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Also add ARB_clip_control to the supported extensions.
v2: Correct soname because of abi changes:
- since we now use the visibility('hidden') for internal functions
many functions are no longer exposed with the public interface
- some functions were added to the public interface
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> (v1)
Use case: allocate buffers from gbm, import into EGL, and pass to the
display to reduce copies.
Reviewed-by: David Riley <davidriley@chromium.org>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
It's a pkg-config 0.28 feature and Travis-CI ships with an older version.
Do the trivial task of writing it out manually ;-)
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
1) We use the preprocessor flag HAVE_EPOXY_GLX_H, but never
set it.
2) WITH_GLX diverges with HAVE_EPOXY_EGL_H.
3) virgl_test_server needs to link with X11 when using a GLX
backend.
To fix this, query epoxy for GLX support and allow the user to
disable it as well.
TEST=./autogen.sh --disable-egl
Use LLVM's libFuzzer to fuzz the virgl_renderer_submit_cmd API.
Signed-off-by: David Riley <davidriley@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
v3: Turn check for -Wint-to-pointer-cast into check for
-Werror=int-to-pointer-cast
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Make EGL optional since it's use in virglrenderer isn't always
compatible with drivers on linux, for example nVidia does not
provide a GBM implementation (used by virgl_egl*) with their
linux drivers.
Signed-off-by: Joe M. Kniss <djmk@google.com>
v2: Fix typo (Dave)
(still would much rather this was done at runtime as well)
Signed-off-by: Dave Airlie <airlied@redhat.com>
If libepoxy is installed in a non-standrad location AC_CHECK_HEADERS_ONCE will
fail to find the header. I did it this way because trying to get
AC_CHECK_HEADERS_ONCE to find it involved setting and unsetting CFLAGS.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
apitrace & epoxy with EGL don't work nicely together, using glx works
around this issue for now (disabled by default).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
We use the library unconditionally, however not check it in
configure phase. Let's produce an error there and not at
compilation phase.
And while at it, drop -ldl from LDFLAGS too. I suspect it's
coming from the same source because in the gbm pkg-config file
private libs are to be linked with dl. But not only we are not a
gbm private library, we don't use dl*() anywhere.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Instead of polling the fences regularly, have a thread
that blocks for a single fence using a separate shared
context, then uses eventfd to wake up the main thread
when something happens.
Inside the guest, glmark2 typicially runs twice as fast with the thread
sync. Although in general, the performances seems to be about +30%. The
benefits is mostly for CPU-bounds tasks (when main the thread hits 100%)
A naive perf stat of the vtest renderer with glmark2 "build" test with a
fixed number of frames (500) results in the following stats data:
(do not value timing related informations, since the renderer is ran and
stopped manually)
without thread:
3032.282265 task-clock (msec) # 0.420 CPUs utilized
4,277 context-switches # 0.001 M/sec
102 cpu-migrations # 0.034 K/sec
9,020 page-faults # 0.003 M/sec
7,884,098,254 cycles # 2.600 GHz
4,440,126,451 stalled-cycles-frontend # 56.32% frontend cycles idle
<not supported> stalled-cycles-backend
11,024,091,578 instructions # 1.40 insns per cycle
# 0.40 stalled
# cycles per insn
1,091,831,588 branches # 360.069 M/sec
5,426,846 branch-misses # 0.50% of all branches
with thread:
3403.592921 task-clock (msec) # 0.452 CPUs utilized
7,145 context-switches # 0.002 M/sec
410 cpu-migrations # 0.120 K/sec
6,191 page-faults # 0.002 M/sec
7,475,038,064 cycles # 2.196 GHz
4,487,043,071 stalled-cycles-frontend # 60.03% frontend cycles idle
<not supported> stalled-cycles-backend
9,925,205,494 instructions # 1.33 insns per cycle
# 0.45 stalled
# cycles per insn
834,375,503 branches # 245.146 M/sec
4,919,995 branch-misses # 0.59% of all branches
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
The idea is to have a unix socket and possible shmem protocol
between a renderering server and local gallium sw driver.
This could be used to validate virgl without qemu with piglit.
we don't need the accessor methods in virgl so far, only
the description tables, so drop all the extra stuff for now.
this introduces the python from mesa to generate our cut down
table