In systems with more then one graphics card the rendernode is currently
picked based on the order in which they are listed in /dev/dri. Add an
command line option and a environment variable to make it possible to
specify the render node explicitely.
Fixes#135
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
The fuzzer series added a few warnings that need to be silenced.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: David Riley <davidriley@chromium.org>
Allow input to be changed from reading from a socket.
Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
This means we can change them a bit more easily, for instance... from
command-line arguments!
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
Let's be a little less conservative then QEMU -- fence only
on draw calls and possible fence creations.
Can we do even better, and fence only when Gallium requests
VIRGL_BIND_CUSTOM? Someone should look into this, but let's
get this landed to unblock the CQ.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Include stdint.h in virgl_hw.h, since it uses uint32_t.
Remove now duplicate structure virgl_box in vtest_renderer.c
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Turns out some files managed to have a mix between 2, 3, 4 and tabs for
indenting. The only way to really fix this was to do just a single commit
that fixes all of them.
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
run_renderer now uses an array to get the corresponding function
pointer for a command.
Some vtest_* function headers had to be uniformized.
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Nathan Gauer <nathan@gauer.org>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
With the main aim of making vtest's usage of virglrenderer more similar
to that of QEMU, this patch sets a backing store to each resource and
reads from or writes to at each transfer operation.
v2: - Instead of adding a callback on resource destruction, free the
iovec when we unref a resource as we know that we won't be doing
anything else with it. (Dave Airlie)
v3: - Store pointers to iovecs in the global to also release them
v4: - Add new commands for resource creation and transfers, to be used
when protocol version >= 1.
v5: - Replaced the global array of iovecs with a hash table because some
es31 tests create thousands of resources and reach any sane limit.
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit negotiates a common protocol version with the clients,
allowing for backwards compatibility on both sides.
v2: - Negotiate the version in a new command, so the client can probe
for its existence and stay compatible with older servers. (Dave
Airlie)
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
As we don't have yet a proper way of negotiating a common protocol
version to use between clients and the server, we introduce a command
without reply arguments that allows us to figure out if the server is
new enough to handle negotiation of the protocol version.
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Adds a VIRGL_RENDERER_USE_GLES flag for specifying the API to request
when creating the EGL context.
Users can enable this flag when using vtest with the VTEST_USE_GLES
environment variable.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
To make it easier to run the test suite on environments without graphics
hardware, add an environment variable VIRGL_EGL_SURFACELESS that will
force the use of the surfaceless platform.
Combined with the following flags, we can run virglrenderer and its
tests without any graphics hardware or windowing system present:
LIBGL_ALWAYS_SOFTWARE=true GALLIUM_DRIVER=llvmpipe VIRGL_EGL_SURFACELESS=yes
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
I've come up with a workaround on the mesa side that should be
backwards compatible with old vtests and vice-versa.
It involves sending both caps 2 and 1 queries back to back,
and taking the first response an indication of what to expect,
v1.1: Check max_size is > 0 before mallocing
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
This is useful to do some quite accurate comparative
benchmarks/profiling, and to run fuzzers, such as american fuzzy lop.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
For the same glmark2 "build" test, perf reports about half
instructions.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>