From 70fefe33df3cd39239f16cd626094c391c9a82b4 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 31 Jan 2019 13:17:31 +0100 Subject: [PATCH] virgl: expose function to set output callback 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 Reviewed-by: David Riley Reviewed-by: Zach Reizner Signed-off-by: Dave Airlie --- src/Makefile.am | 2 +- src/virglrenderer.c | 5 +++++ src/virglrenderer.h | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index a9fb39a..9a0a44e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,7 +51,7 @@ endif lib_LTLIBRARIES = libvirglrenderer.la noinst_LTLIBRARIES = libvrend.la -GM_LDFLAGS = -Wl,-Bsymbolic -version-number 0:2 -no-undefined +GM_LDFLAGS = -Wl,-Bsymbolic -version-number 0:3 -no-undefined libvirglrenderer_la_SOURCES = virglrenderer.c libvirglrenderer_ladir = $(libdir) diff --git a/src/virglrenderer.c b/src/virglrenderer.c index c8d171f..f7a0899 100644 --- a/src/virglrenderer.c +++ b/src/virglrenderer.c @@ -391,3 +391,8 @@ int virgl_renderer_get_poll_fd(void) { return vrend_renderer_get_poll_fd(); } + +virgl_debug_callback_type virgl_set_debug_callback(virgl_debug_callback_type cb) +{ + return vrend_set_debug_callback(cb); +} diff --git a/src/virglrenderer.h b/src/virglrenderer.h index 609f447..ffe59db 100644 --- a/src/virglrenderer.h +++ b/src/virglrenderer.h @@ -27,8 +27,11 @@ #ifndef VIRGLRENDERER_H #define VIRGLRENDERER_H +#include "vrend_debug.h" + #include #include +#include struct virgl_box; struct iovec; @@ -159,6 +162,8 @@ VIRGL_EXPORT void virgl_renderer_force_ctx_0(void); VIRGL_EXPORT void virgl_renderer_ctx_attach_resource(int ctx_id, int res_handle); VIRGL_EXPORT void virgl_renderer_ctx_detach_resource(int ctx_id, int res_handle); +VIRGL_EXPORT virgl_debug_callback_type virgl_set_debug_callback(virgl_debug_callback_type cb); + /* return information about a resource */ struct virgl_renderer_resource_info {