This implements accepting a marker message string from the
guest and passing it to the host implementation.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
An untyped resource is a virgl_resource without pipe_resource while
vrend_context works with pipe_resources exclusively. When an untyped
resource is attached, we defer the insersion into res_hash until
VIRGL_CCMD_PIPE_RESOURCE_SET_TYPE is submitted.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Gurchetan Singh <gurchetansingh@chromium.org> (protocol)
This was hard coded as zero before and can't be changed at runtime.
Change to use the "VREND_DEBUG" environment variable to control this
behavior.
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
When VIRGL_LOG_FILE gets set, put log into it. This is similar
with MESA_LOG_FILE. An improvement over MESA_LOG_FILE is that
it supports "%PID%" in file name and will replace it with pid
of the current process.
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Add protocol definitions for the copy_transfer3d command and also
for the associated virgl capability.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This is helpful to get the name of the guest program that may trigger a
memory leak. One can also pass a custom string as program name by setting
the environment variable GALLIUM_PROCESS_NAME in the guest accordingly.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This patch adds the infrastructure and replaces the debug calls to fprintf
by calls to vrend_printf that internally may be redirected.
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>
Add an 'all' flag to enable all logging (but don't include logging
initialted by the guest in this flag)
Logging can only enabled in debug builds and the logging parameters are
set by the environment variable VREND_DEBUG
Closes: #30
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>
For this to work to host will have to add "guestallow" to the
debug flags.
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>
Two flags are added: one to trace the features that are identified
as supported on the host, and another one that is then used to trace
the use of features. The latter one is only enabled after the
inititalization phase to avoid that the tests used for setting the caps
clobber the log.
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>
Add flag blit and copy to add logging for the resource copy and blit path.
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>
Add flags cmd and obj to allow logging of the commands send by the guest
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>
Add flags tgsi,glsl,stream, and shader and change the corresponding
logging code.
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>
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>
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>
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.