For random stuff not in src/util.h
util_bitmask is too heavyweight for what I was looking for.
v2: Make macros return 0 or 1 (@davidriley)
v3: static inline macros (@gerddie)
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
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)
Otherwise, a failure happens with gold linker:
../src/.libs/libvirglrenderer.so: error: undefined reference to 'drmPrimeHandleToFD'
https://errors.yoctoproject.org/Errors/Details/222046/
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Since this adds a new function to the library interface this also needs
a bump in the library version number.
Closes: #80
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This adds a string buffer implementation + unit tests with
the following features:
- growing reallocation on append
- variadic printf-like append function
- indenting
- error state tracking (stop appending on errors)
This will be used in the GLSL shader construction to clean up
the bad string length issues we have now.
The variadic append is based on one Erik Faye-Lund wrote.
v1.1: improve indenting
v1.2: fix includes + use memcpy
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
No real flags are defined, only the macros and functions.
VREND_DEBUG(flag, ctx, ...) translates to fprintf(stderr, ...)
that is enabled based on whether logging is enabled for flag
in context ctx
VREND_DEBUG_EXT(flag, ctx, X) can be used to add code sequenses
as X, e.g. specific logging calls like for streams.
v2: Make use of variadic macros to make the VREND_DEBUG macro more
like a call to *printf (Following a suggestion by Gurchetan)
v3: Already include debug header in vrend_renderer.c
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@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
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>
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>
The -I switch is meant for extending the list of paths searched
when looking for a header file. There's no justification in
having in linker flags.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>